|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.geometry.partitioning.AbstractSubHyperplane<S,T>
S
- Type of the embedding space.T
- Type of the embedded sub-space.public abstract class AbstractSubHyperplane<S extends Space,T extends Space>
This class implements the dimension-independent parts of SubHyperplane
.
sub-hyperplanes are obtained when parts of an hyperplane
are chopped off by other hyperplanes that
intersect it. The remaining part is a convex region. Such objects
appear in BSP trees
as the intersection of a cut
hyperplane with the convex region which it splits, the chopping
hyperplanes are the cut hyperplanes closer to the tree root.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.commons.math3.geometry.partitioning.SubHyperplane |
---|
SubHyperplane.SplitSubHyperplane<U extends Space> |
Constructor Summary | |
---|---|
protected |
AbstractSubHyperplane(Hyperplane<S> hyperplane,
Region<T> remainingRegion)
Build a sub-hyperplane from an hyperplane and a region. |
Method Summary | |
---|---|
AbstractSubHyperplane<S,T> |
applyTransform(Transform<S,T> transform)
Apply a transform to the instance. |
protected abstract AbstractSubHyperplane<S,T> |
buildNew(Hyperplane<S> hyper,
Region<T> remaining)
Build a sub-hyperplane from an hyperplane and a region. |
AbstractSubHyperplane<S,T> |
copySelf()
Copy the instance. |
Hyperplane<S> |
getHyperplane()
Get the underlying hyperplane. |
Region<T> |
getRemainingRegion()
Get the remaining region of the hyperplane. |
double |
getSize()
Get the size of the instance. |
boolean |
isEmpty()
Check if the instance is empty. |
AbstractSubHyperplane<S,T> |
reunite(SubHyperplane<S> other)
Compute the union of the instance and another sub-hyperplane. |
abstract Side |
side(Hyperplane<S> hyper)
Compute the relative position of the instance with respect to an hyperplane. |
abstract SubHyperplane.SplitSubHyperplane<S> |
split(Hyperplane<S> hyper)
Split the instance in two parts by an hyperplane. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractSubHyperplane(Hyperplane<S> hyperplane, Region<T> remainingRegion)
hyperplane
- underlying hyperplaneremainingRegion
- remaining region of the hyperplaneMethod Detail |
---|
protected abstract AbstractSubHyperplane<S,T> buildNew(Hyperplane<S> hyper, Region<T> remaining)
hyper
- underlying hyperplaneremaining
- remaining region of the hyperplane
public AbstractSubHyperplane<S,T> copySelf()
The instance created is completely independent of the original one. A deep copy is used, none of the underlying objects are shared (except for the nodes attributes and immutable objects).
copySelf
in interface SubHyperplane<S extends Space>
public Hyperplane<S> getHyperplane()
getHyperplane
in interface SubHyperplane<S extends Space>
public Region<T> getRemainingRegion()
The returned region is expressed in the canonical hyperplane frame and has the hyperplane dimension. For example a chopped hyperplane in the 3D euclidean is a 2D plane and the corresponding region is a convex 2D polygon.
public double getSize()
getSize
in interface SubHyperplane<S extends Space>
public AbstractSubHyperplane<S,T> reunite(SubHyperplane<S> other)
reunite
in interface SubHyperplane<S extends Space>
other
- other sub-hyperplane to union (must be in the
same hyperplane as the instance)
public AbstractSubHyperplane<S,T> applyTransform(Transform<S,T> transform)
The instance must be a (D-1)-dimension sub-hyperplane with respect to the transform not a (D-2)-dimension sub-hyperplane the transform knows how to transform by itself. The transform will consist in transforming first the hyperplane and then the all region using the various methods provided by the transform.
transform
- D-dimension transform to apply
public abstract Side side(Hyperplane<S> hyper)
side
in interface SubHyperplane<S extends Space>
hyper
- hyperplane to check instance against
Side.PLUS
, Side.MINUS
, Side.BOTH
,
Side.HYPER
public abstract SubHyperplane.SplitSubHyperplane<S> split(Hyperplane<S> hyper)
split
in interface SubHyperplane<S extends Space>
hyper
- splitting hyperplane
public boolean isEmpty()
isEmpty
in interface SubHyperplane<S extends Space>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |