IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
Interval Class Reference
Inheritance diagram for Interval:

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
 

Detailed Description

Represents an interval with lower and upper boundaries.

Definition at line 7 of file interval.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
Union[int, float] minimum,
Union[int, float] maximum )

Creates an interval.

Parameters
minimumThe lower boundary.
maximumThe upper boundary.
Exceptions
OutOfRangeExceptionIf maximum is less than minimum.

Reimplemented in Range.

Definition at line 15 of file interval.py.

Member Function Documentation

◆ __eq__()

bool __eq__ ( self,
Any other )

Check if two intervals are equal.

Parameters
otherAnother Interval object OR List of boundaries [minimum, maximum] OR Tuple of boundaries (minimum, maximum)
Returns
True if intervals are equal, False otherwise

Reimplemented in Range.

Definition at line 34 of file interval.py.

◆ __ne__()

bool __ne__ ( self,
Any other )

Check if two intervals are not equal.

Parameters
otherAnother Interval object OR List of boundaries [minimum, maximum] OR Tuple of boundaries (minimum, maximum)
Returns
True if intervals are not equal, False otherwise

Definition at line 51 of file interval.py.

◆ __repr__()

str __repr__ ( self)

Return an unambiguous string of the Interval object.

Reimplemented in Range.

Definition at line 90 of file interval.py.

◆ __str__()

str __str__ ( self)

Returns a string representation of the Interval object.

Returns
String representation of the Interval object.

Reimplemented in Range.

Definition at line 81 of file interval.py.

◆ _is_negative()

bool _is_negative ( self)
protected

Definition at line 62 of file interval.py.

◆ maximum()

Union[int, float] maximum ( self)

Returns the upper boundary of the interval.

Definition at line 74 of file interval.py.

◆ minimum()

Union[int, float] minimum ( self)

Returns the lower boundary of the interval.

Definition at line 66 of file interval.py.

Field Documentation

◆ _maximum

_maximum = maximum
protected

Definition at line 32 of file interval.py.

◆ _minimum

_minimum = minimum
protected

Definition at line 31 of file interval.py.