Class InteriorPointFinder<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- java.lang.Object
-
- org.hipparchus.geometry.partitioning.InteriorPointFinder<S,P,H,I>
-
- Type Parameters:
S
- Type of the space.P
- Type of the points in space.H
- Type of the hyperplane.I
- Type of the sub-hyperplane.
- All Implemented Interfaces:
BSPTreeVisitor<S,P,H,I>
public class InteriorPointFinder<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>> extends Object implements BSPTreeVisitor<S,P,H,I>
Finder for interior points.- Since:
- 4.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hipparchus.geometry.partitioning.BSPTreeVisitor
BSPTreeVisitor.Order
-
-
Constructor Summary
Constructors Constructor Description InteriorPointFinder(P defaultPoint)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BSPTree.InteriorPoint<S,P>
getPoint()
Get the point found.void
visitInternalNode(BSPTree<S,P,H,I> node)
Visit a BSP tree node having a non-null sub-hyperplane.void
visitLeafNode(BSPTree<S,P,H,I> node)
Visit a leaf BSP tree node node having a null sub-hyperplane.BSPTreeVisitor.Order
visitOrder(BSPTree<S,P,H,I> node)
Determine the visit order for this node.
-
-
-
Constructor Detail
-
InteriorPointFinder
public InteriorPointFinder(P defaultPoint)
Simple constructor.- Parameters:
defaultPoint
- default point to use for whole space
-
-
Method Detail
-
visitOrder
public BSPTreeVisitor.Order visitOrder(BSPTree<S,P,H,I> node)
Determine the visit order for this node.Before attempting to visit an internal node, this method is called to determine the desired ordering of the visit. It is guaranteed that this method will be called before
visitInternalNode
for a given node, it will be called exactly once for each internal node.- Specified by:
visitOrder
in interfaceBSPTreeVisitor<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- Parameters:
node
- BSP node guaranteed to have a non-null cut sub-hyperplane- Returns:
- desired visit order, must be one of
BSPTreeVisitor.Order.PLUS_MINUS_SUB
,BSPTreeVisitor.Order.PLUS_SUB_MINUS
,BSPTreeVisitor.Order.MINUS_PLUS_SUB
,BSPTreeVisitor.Order.MINUS_SUB_PLUS
,BSPTreeVisitor.Order.SUB_PLUS_MINUS
,BSPTreeVisitor.Order.SUB_MINUS_PLUS
-
visitInternalNode
public void visitInternalNode(BSPTree<S,P,H,I> node)
Visit a BSP tree node having a non-null sub-hyperplane.It is guaranteed that this method will be called after
visitOrder
has been called for a given node, it wil be called exactly once for each internal node.- Specified by:
visitInternalNode
in interfaceBSPTreeVisitor<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- Parameters:
node
- BSP node guaranteed to have a non-null cut sub-hyperplane- See Also:
BSPTreeVisitor.visitLeafNode(org.hipparchus.geometry.partitioning.BSPTree<S, P, H, I>)
-
visitLeafNode
public void visitLeafNode(BSPTree<S,P,H,I> node)
Visit a leaf BSP tree node node having a null sub-hyperplane.- Specified by:
visitLeafNode
in interfaceBSPTreeVisitor<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- Parameters:
node
- leaf BSP node having a null sub-hyperplane- See Also:
BSPTreeVisitor.visitInternalNode(org.hipparchus.geometry.partitioning.BSPTree<S, P, H, I>)
-
getPoint
public BSPTree.InteriorPoint<S,P> getPoint()
Get the point found.- Returns:
- found point (null if tree was empty)
-
-