|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ru.sscc.util.BoundingBox
Provides the calculation of minimal bounding box around of a set of vectors in multidimensional space.
Field Summary | |
int |
dimension
A dimension of vector space. |
Constructor Summary | |
BoundingBox(int dimension)
Constructor. |
Method Summary | |
java.lang.Object |
clone()
Clones the bounding box. |
boolean |
contains(double[] vector,
int position)
Tests the bounding box to contain a vector specified. |
boolean |
contains(float[] vector,
int position)
Tests the bounding box to contain a vector specified. |
boolean |
contains(RealPointer vector)
Tests the bounding box to contain a vector specified. |
void |
enlargeBy(double[] vector,
int position)
Enlarges the bounding box to contain a vector specified. |
void |
enlargeBy(float[] vector,
int position)
Enlarges the bounding box to contain a vector specified. |
void |
enlargeBy(RealPointer vector)
Enlarges the bounding box to contain a vector specified. |
RealPointer |
getLowerCorner()
Returns the lower corner of the bounding box or |
RealPointer |
getUpperCorner()
Returns the upper corner of the bounding box or |
boolean |
isEmpty()
Tests the bounding box to be an empty set. |
double |
width(int i)
Return the width of the bounding box in i-th direction or 0 for empty bounding box. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public final int dimension
Constructor Detail |
public BoundingBox(int dimension)
dimension
- a dimension of vector spaceMethod Detail |
public void enlargeBy(double[] vector, int position)
vector
- an array containing the vectorposition
- a starting position of the vector in the arraypublic void enlargeBy(float[] vector, int position)
vector
- an array containing the vectorposition
- a starting position of the vector in the arraypublic void enlargeBy(RealPointer vector)
vector
- a pointer to the vectorpublic boolean contains(double[] vector, int position)
vector
- an array containing the vectorposition
- a starting position of the vector in the arraypublic boolean contains(float[] vector, int position)
vector
- an array containing the vectorposition
- a starting position of the vector in the arraypublic boolean contains(RealPointer vector)
vector
- a pointer to the vectorpublic final boolean isEmpty()
public RealPointer getLowerCorner()
public RealPointer getUpperCorner()
public double width(int i)
public java.lang.Object clone()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |