We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USet
I suggest to add USet and UInterval classes for simplyfing working with sets and intervals.
UInterval
from ufpy import USet, inf # Sets USet.U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 74} # set universal (in sys.environ) a = USet(1, 9, 2) b = Uset(9, 1, 12, 74) a & b # u{1, 9} a | b # u{1, 2, 9, 12, 74} a - b # u{2} -a # not op; eq. of "USet.U - a"; u{3, 4, 5, 6, 7, 8, 12, 74} # Note: if in b there are elements, that not in USet.U, USet.U += {this elements} automaticly # From bool logic a > b # a -> b; implication # Intervals a = UInterval(-inf, 5) # u(-∞, 5) b = UInterval([3], +inf) # u[3, +∞) a | b # u(-∞; +∞) a & b # u[3; 5) a - b # (-∞; 3) -a # u[5, +∞)
(optional)
In Math exercises.
The text was updated successfully, but these errors were encountered:
bleudev
Successfully merging a pull request may close this issue.
Description of new feature
I suggest to add
USet
andUInterval
classes for simplyfing working with sets and intervals.Use Case
(optional)
In Math exercises.
Suggest solution
(optional)
The text was updated successfully, but these errors were encountered: