IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
Range Class Reference
Inheritance diagram for Range:

Public Member Functions

 __init__ (self, Union[int, float] minimum, Union[int, float] maximum, Union[int, float] increment)
 Creates a range with specified minimum, maximum, and increment values.
 
bool __eq__ (self, Any other)
 
Union[int, float] increment (self)
 Retrieves the increment value associated with this range.
 
str __str__ (self)
 Returns a string representation of the Range object.
 
str __repr__ (self)
 Return an unambiguous string of the Range object.
 

Data Fields

 minimum
 
 increment
 

Protected Attributes

Union[int, float] _increment = increment
 

Detailed Description

Represents a numeric range with defined boundaries and a fixed increment.

A Range models a continuous sequence of values starting from a minimum value, ending at a maximum value, and progressing in steps defined by an increment. It supports integers and floating-point numbers.

This class ensures that the increment does not exceed the total span between the minimum and maximum bounds. The range is inclusive of its boundary values.

Definition at line 8 of file range.py.

Constructor & Destructor Documentation

◆ __init__()

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

Creates a range with specified minimum, maximum, and increment values.

Exceptions
InvalidParameterExceptionIf minimum is greater than maximum, or if increment exceeds the total range span.
Parameters
minimumThe inclusive starting (lower) boundary of the range.
maximumThe inclusive ending (upper) boundary of the range.
incrementThe step size or increment between values within the range.

Definition at line 21 of file range.py.

Member Function Documentation

◆ __eq__()

bool __eq__ ( self,
Any other )

Definition at line 41 of file range.py.

◆ __repr__()

str __repr__ ( self)

Return an unambiguous string of the Range object.

Definition at line 68 of file range.py.

◆ __str__()

str __str__ ( self)

Returns a string representation of the Range object.

Returns
String representation of the Range object.

Definition at line 59 of file range.py.

◆ increment()

Union[int, float] increment ( self)

Retrieves the increment value associated with this range.

Definition at line 52 of file range.py.

Field Documentation

◆ _increment

_increment = increment
protected

Definition at line 39 of file range.py.

◆ increment

increment

Definition at line 43 of file range.py.

◆ minimum

minimum

Definition at line 37 of file range.py.