IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
Point Class Reference
Inheritance diagram for Point:

Public Member Functions

 __init__ (self, Union[int, float] x, Union[int, float] y)
 Initializes a Point instance.
 
bool __eq__ (self, Any other)
 Determines if this point is equal to another point or coordinate pair.
 
bool __ne__ (self, Any other)
 Determines if this point is not equal to another point or coordinate pair.
 
str __str__ (self)
 Returns a string representation of the Point.
 
str __repr__ (self)
 Return an unambiguous string of the Point object.
 
Union[int, float] x (self)
 
Union[int, float] y (self)
 

Data Fields

 x = 2:
 
 y
 

Protected Attributes

Union[int, float] _x = x
 
Union[int, float] _y = y
 

Detailed Description

Represents a point in 2D space with x and y coordinates.

Definition at line 6 of file point.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
Union[int, float] x,
Union[int, float] y )

Initializes a Point instance.

Parameters
xx coordinate
yy coordinate

Reimplemented in BinningFactor.

Definition at line 14 of file point.py.

Member Function Documentation

◆ __eq__()

bool __eq__ ( self,
Any other )

Determines if this point is equal to another point or coordinate pair.

Parameters
otherAnother Point object OR List of coordinates [x,y] OR Tuple of coordinates (x,y)
Returns
True if points are equal, False otherwise

Definition at line 26 of file point.py.

◆ __ne__()

bool __ne__ ( self,
Any other )

Determines if this point is not equal to another point or coordinate pair.

Parameters
otherAnother Point instance, or a list/tuple with two numeric elements [x, y] or (x, y).
Returns
True if points are not equal, False otherwise

Definition at line 43 of file point.py.

◆ __repr__()

str __repr__ ( self)

Return an unambiguous string of the Point object.

Definition at line 63 of file point.py.

◆ __str__()

str __str__ ( self)

Returns a string representation of the Point.

A string in the format "(x: <x_value>, y: <y_value>)".

Definition at line 54 of file point.py.

◆ x()

Union[int, float] x ( self)

Definition at line 71 of file point.py.

◆ y()

Union[int, float] y ( self)

Definition at line 75 of file point.py.

Field Documentation

◆ _x

Union[int, float] _x = x
protected

Definition at line 23 of file point.py.

◆ _y

Union[int, float] _y = y
protected

Definition at line 24 of file point.py.

◆ x

x = 2:

Definition at line 36 of file point.py.

◆ y

y

Definition at line 36 of file point.py.