mt.geond.hyperbox

Hyperrectangle.

Classes

  • Hyperbox: Axis-aligned n-dimensional hyperrectangle.

class mt.geond.hyperbox.Hyperbox(min_coords, max_coords=None, force_valid=False)

Axis-aligned n-dimensional hyperrectangle.

An axis-aligned n-dimensional box/hyperrectangle is defined as the set of points of the hypercube [-1,1]^n transformed by a dilatation.

Note that is is a many-to-one representation. For each box, there are up to 2^n dilatations that map the hypbercube [-1,1]^n to it.

Parameters:
  • min_coords (1d array or Dlt) – array of minimum coordinate values for all the dimensions, or the dilatation if self. In case of the latter, the max_coords argument is ignored.

  • max_coords (1d array) – array of maximum coordinate values for all the dimensions. If it is None, then min_coords represents max_coords and the minimum coordinate values are assumed 0.

  • force_valid (bool) – whether or not to sort out min_coords and max_coords to make the the minus point meet the min_coords and the plus point meet the max_coords.

dlt_tfm

the dilatation equivalent, which can be get/set

Type:

Dlt

dim

number of dimensions

Type:

int

minus_pt

the (-1,)^n point after being transformed by the dilatation

Type:

point

plus_pt

the (+1,)^n point after being transformed by the dilatation

Type:

point

min_coords

minimum coordinates

Type:

point

max_coords

maximum coordinates

Type:

point

center_pt

center point

Type:

point

size

box size

Type:

size/point

Inheritance

digraph inheritanceb6de48d3eb { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "GeometricObject" [URL="../mt.geo/mt.geo.object.html#mt.geo.object.GeometricObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A geometric object which lives in a d-dimensional Euclidean space."]; "Hyperbox" [URL="#mt.geond.hyperbox.Hyperbox",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Axis-aligned n-dimensional hyperrectangle."]; "GeometricObject" -> "Hyperbox" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
__init__(min_coords, max_coords=None, force_valid=False)
__repr__()

Return repr(self).

property center_pt

center point

property dim

The dimensionality

property dlt_tfm

the dilatation

property max_coords

maximum coordinates

property min_coords

minimum coordinates

property minus_pt

The (-1,)^n point after being transformed by the dilatation.

classmethod ndim()

The dimensionality

property plus_pt

The (+1,)^n point after being transformed by the dilatation.

property signed_volume

signed (hyper-)volume

property size

box size

validated()

Returns a validated version of the box.

property volume

absolute/unsigned (hyper-)volume