Top Description Fields Constructors Methods
org.apache.commons.math3.geometry.partitioning

pack-priv Class Characterization<S extends Space>

extends Object
Class Inheritance
Type Parameters
<S>
Type of the space.
Imports
java.util.ArrayList, .List, org.apache.commons.math3.exception.MathInternalError, org.apache.commons.math3.geometry.Space

Cut sub-hyperplanes characterization with respect to inside/outside cells.
Since
3.4
See Also
BoundaryBuilder

Field Summary

Modifier and TypeField and Description
private final NodesSet<S>
insideSplitters

Nodes that were used to split the outside touching part.

private SubHyperplane<S>
insideTouching

Part of the cut sub-hyperplane that touch inside cells.

private final NodesSet<S>
outsideSplitters

Nodes that were used to split the outside touching part.

private SubHyperplane<S>
outsideTouching

Part of the cut sub-hyperplane that touch outside cells.

Constructor Summary

AccessConstructor and Description
pack-priv
Characterization(final BSPTree<S>
current BSP tree node
node
,
final SubHyperplane<S>
sub-hyperplane to characterize
sub
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
private void
addInsideTouching(final SubHyperplane<S>
part of the cut sub-hyperplane known to touch an inside cell
sub
,
final List<BSPTree<S>>
sub-hyperplanes that did split the current one
splitters
)

Add a part of the cut sub-hyperplane known to touch an inside cell.

private void
addOutsideTouching(final SubHyperplane<S>
part of the cut sub-hyperplane known to touch an outside cell
sub
,
final List<BSPTree<S>>
sub-hyperplanes that did split the current one
splitters
)

Add a part of the cut sub-hyperplane known to touch an outside cell.

private void
characterize(final BSPTree<S>
current BSP tree node
node
,
final SubHyperplane<S>
sub-hyperplane to characterize
sub
,
final List<BSPTree<S>>
nodes that did split the current one
splitters
)

Filter the parts of an hyperplane belonging to the boundary.

public NodesSet<S>

Returns:

nodes that were used to split the inside touching part
getInsideSplitters
()

Get the nodes that were used to split the inside touching part.

public NodesSet<S>

Returns:

nodes that were used to split the outside touching part
getOutsideSplitters
()

Get the nodes that were used to split the outside touching part.

public SubHyperplane<S>

Returns:

parts of the cut sub-hyperplane known to touch inside cells (may be null or empty)
insideTouching
()

Get all the parts of the cut sub-hyperplane known to touch inside cells.

public SubHyperplane<S>

Returns:

parts of the cut sub-hyperplane known to touch outside cells (may be null or empty)
outsideTouching
()

Get all the parts of the cut sub-hyperplane known to touch outside cells.

public boolean

Returns:

true if the cut sub-hyperplane touches inside cells
touchInside
()

Check if the cut sub-hyperplane touches inside cells.

public boolean

Returns:

true if the cut sub-hyperplane touches outside cells
touchOutside
()

Check if the cut sub-hyperplane touches outside cells.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

insideSplittersback to summary
private final NodesSet<S> insideSplitters

Nodes that were used to split the outside touching part.

insideTouchingback to summary
private SubHyperplane<S> insideTouching

Part of the cut sub-hyperplane that touch inside cells.

outsideSplittersback to summary
private final NodesSet<S> outsideSplitters

Nodes that were used to split the outside touching part.

outsideTouchingback to summary
private SubHyperplane<S> outsideTouching

Part of the cut sub-hyperplane that touch outside cells.

Constructor Detail

Characterizationback to summary
pack-priv Characterization(final BSPTree<S> node, final SubHyperplane<S> sub)

Simple constructor.

Characterization consists in splitting the specified sub-hyperplane into several parts lying in inside and outside cells of the tree. The principle is to compute characterization twice for each cut sub-hyperplane in the tree, once on the plus node and once on the minus node. The parts that have the same flag (inside/inside or outside/outside) do not belong to the boundary while parts that have different flags (inside/outside or outside/inside) do belong to the boundary.

Parameters
node:BSPTree<S>

current BSP tree node

sub:SubHyperplane<S>

sub-hyperplane to characterize

Method Detail

addInsideTouchingback to summary
private void addInsideTouching(final SubHyperplane<S> sub, final List<BSPTree<S>> splitters)

Add a part of the cut sub-hyperplane known to touch an inside cell.

Parameters
sub:SubHyperplane<S>

part of the cut sub-hyperplane known to touch an inside cell

splitters:List<BSPTree<S>>

sub-hyperplanes that did split the current one

addOutsideTouchingback to summary
private void addOutsideTouching(final SubHyperplane<S> sub, final List<BSPTree<S>> splitters)

Add a part of the cut sub-hyperplane known to touch an outside cell.

Parameters
sub:SubHyperplane<S>

part of the cut sub-hyperplane known to touch an outside cell

splitters:List<BSPTree<S>>

sub-hyperplanes that did split the current one

characterizeback to summary
private void characterize(final BSPTree<S> node, final SubHyperplane<S> sub, final List<BSPTree<S>> splitters)

Filter the parts of an hyperplane belonging to the boundary.

The filtering consist in splitting the specified sub-hyperplane into several parts lying in inside and outside cells of the tree. The principle is to call this method twice for each cut sub-hyperplane in the tree, once on the plus node and once on the minus node. The parts that have the same flag (inside/inside or outside/outside) do not belong to the boundary while parts that have different flags (inside/outside or outside/inside) do belong to the boundary.

Parameters
node:BSPTree<S>

current BSP tree node

sub:SubHyperplane<S>

sub-hyperplane to characterize

splitters:List<BSPTree<S>>

nodes that did split the current one

getInsideSplittersback to summary
public NodesSet<S> getInsideSplitters()

Get the nodes that were used to split the inside touching part.

Splitting nodes are internal nodes (i.e. they have a non-null cut sub-hyperplane).

Returns:NodesSet<S>

nodes that were used to split the inside touching part

getOutsideSplittersback to summary
public NodesSet<S> getOutsideSplitters()

Get the nodes that were used to split the outside touching part.

Splitting nodes are internal nodes (i.e. they have a non-null cut sub-hyperplane).

Returns:NodesSet<S>

nodes that were used to split the outside touching part

insideTouchingback to summary
public SubHyperplane<S> insideTouching()

Get all the parts of the cut sub-hyperplane known to touch inside cells.

Returns:SubHyperplane<S>

parts of the cut sub-hyperplane known to touch inside cells (may be null or empty)

outsideTouchingback to summary
public SubHyperplane<S> outsideTouching()

Get all the parts of the cut sub-hyperplane known to touch outside cells.

Returns:SubHyperplane<S>

parts of the cut sub-hyperplane known to touch outside cells (may be null or empty)

touchInsideback to summary
public boolean touchInside()

Check if the cut sub-hyperplane touches inside cells.

Returns:boolean

true if the cut sub-hyperplane touches inside cells

touchOutsideback to summary
public boolean touchOutside()

Check if the cut sub-hyperplane touches outside cells.

Returns:boolean

true if the cut sub-hyperplane touches outside cells