Public Member Functions | |
| __init__ (self, Union[int, float] minimum, Union[int, float] maximum) | |
| Creates an interval. | |
| bool | __eq__ (self, Any other) |
| Check if two intervals are equal. | |
| bool | __ne__ (self, Any other) |
| Check if two intervals are not equal. | |
| Union[int, float] | minimum (self) |
| Returns the lower boundary of the interval. | |
| Union[int, float] | maximum (self) |
| Returns the upper boundary of the interval. | |
| str | __str__ (self) |
| Returns a string representation of the Interval object. | |
| str | __repr__ (self) |
| Return an unambiguous string of the Interval object. | |
Protected Member Functions | |
| bool | _is_negative (self) |
Protected Attributes | |
| Union[int, float] | _minimum = minimum |
| Union[int, float] | _maximum = maximum |
Represents an interval with lower and upper boundaries.
Definition at line 7 of file interval.py.
| __init__ | ( | self, | |
| Union[int, float] | minimum, | ||
| Union[int, float] | maximum ) |
Creates an interval.
| minimum | The lower boundary. |
| maximum | The upper boundary. |
| OutOfRangeException | If maximum is less than minimum. |
Definition at line 15 of file interval.py.
| bool __eq__ | ( | self, | |
| Any | other ) |
Check if two intervals are equal.
| other | Another Interval object OR List of boundaries [minimum, maximum] OR Tuple of boundaries (minimum, maximum) |
Definition at line 34 of file interval.py.
| bool __ne__ | ( | self, | |
| Any | other ) |
Check if two intervals are not equal.
| other | Another Interval object OR List of boundaries [minimum, maximum] OR Tuple of boundaries (minimum, maximum) |
Definition at line 51 of file interval.py.
| str __repr__ | ( | self | ) |
Return an unambiguous string of the Interval object.
Definition at line 90 of file interval.py.
| str __str__ | ( | self | ) |
Returns a string representation of the Interval object.
Definition at line 81 of file interval.py.
|
protected |
Definition at line 62 of file interval.py.
| Union[int, float] maximum | ( | self | ) |
Returns the upper boundary of the interval.
Definition at line 74 of file interval.py.
| Union[int, float] minimum | ( | self | ) |
Returns the lower boundary of the interval.
Definition at line 66 of file interval.py.
|
protected |
Definition at line 32 of file interval.py.
|
protected |
Definition at line 31 of file interval.py.