torchsig.utils.coordinate_system.Rectangle

class torchsig.utils.coordinate_system.Rectangle(lower_coord: Coordinate, upper_coord: Coordinate)[source]

Bases: object

Represents an axis-aligned rectangle defined by two opposite corners.

The rectangle is built from a lower-left and an upper-right corner, from which the other two corners are inferred.

coord_lower_left

Lower-left corner.

Type:

Coordinate

coord_upper_right

Upper-right corner.

Type:

Coordinate

coord_upper_left

Upper-left corner.

Type:

Coordinate

coord_lower_right

Lower-right corner.

Type:

Coordinate

Methods

__init__(lower_coord: Coordinate, upper_coord: Coordinate)[source]

Initialize a Rectangle from two corner coordinates.

Parameters:
  • lower_coord (Coordinate) – Lower-left corner of the rectangle.

  • upper_coord (Coordinate) – Upper-right corner of the rectangle.