public class Boundary
extends java.lang.Object
Constructor and Description |
---|
Boundary(int[] lower,
int[] size)
Initializes the boundary.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containedBy(Boundary b)
True if the current boundary is totally contained within b.
|
Boundary[] |
cut(int dim,
float cut)
Splits the bounding box according to a specified dimension and cut value.
|
Boundary[] |
cutHalf()
Splits the bounding box according to its largest dimension.
|
Boundary |
getAbsoluteSubregion(Boundary subregion)
For a given boundary, calculate the absolute offset of a
boundary contained within this boundary.
|
int |
getDimensionality() |
int |
getHalfSplit()
Returns the midpoint of the bounardy with the highest extent.
|
int[] |
getLower() |
Boundary |
getMinimalSubregion(Boundary region)
Returns the minimal sub-region of two boundaries.
|
int |
getNumberOfElements()
A multidimensional boundary has a number of n*m*k*... elements.
|
int[] |
getSize() |
int[] |
getUpper()
Calculates the upper boundary from internally stored lower and size.
|
boolean |
inside(int[] point)
Returns true if a point at integer coordinates is inside the boundary.
|
boolean |
non_overlapping(Boundary b)
Returns true if the bounding boxes are not overlapping.
|
void |
printBoundary(java.lang.String id)
Prints the boundary information to the console.
|
void |
setLower(int[] lower) |
void |
setSize(int[] size) |
public Boundary(int[] lower, int[] size)
lower
- size
- public int[] getLower()
public void setLower(int[] lower)
public int[] getSize()
public void setSize(int[] size)
public int[] getUpper()
public int getDimensionality()
public int getHalfSplit()
public int getNumberOfElements()
public Boundary[] cutHalf()
public Boundary[] cut(int dim, float cut)
public boolean inside(int[] point)
point
- public boolean non_overlapping(Boundary b)
b
- public boolean containedBy(Boundary b)
b
- public Boundary getAbsoluteSubregion(Boundary subregion)
subregion
- public Boundary getMinimalSubregion(Boundary region)
region
- public void printBoundary(java.lang.String id)
id
-