IDS peak ICV v1.4.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.

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.

Member Function Documentation

◆ __eq__()

bool __eq__ ( self,
Any other )

◆ __repr__()

str __repr__ ( self)

Return an unambiguous string of the Range object.

◆ __str__()

str __str__ ( self)

Returns a string representation of the Range object.

Returns
String representation of the Range object.

◆ increment()

Union[int, float] increment ( self)

Retrieves the increment value associated with this range.

Field Documentation

◆ _increment

_increment = increment
protected

◆ increment

increment

◆ minimum

minimum