Top Description Inners Methods
org.apache.commons.math3.geometry.partitioning

public Interface SubHyperplane<S extends Space>

Known Direct Implementers
org.apache.commons.math3.geometry.partitioning.AbstractSubHyperplane
Type Parameters
<S>
Type of the embedding space.
Imports
org.apache.commons.math3.geometry.Space

This interface represents the remaining parts of an hyperplane after other parts have been chopped off.

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.

Note that this interface is not intended to be implemented by Apache Commons Math users, it is only intended to be implemented within the library itself. New methods may be added even for minor versions, which breaks compatibility for external implementations.

Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SubHyperplane.SplitSubHyperplane<
Type of the embedding space.
U extends Space
>

Class holding the results of the split method.

Method Summary

Modifier and TypeMethod and Description
public SubHyperplane<S>

Returns:

a new sub-hyperplane, copy of the instance
copySelf
()

Copy the instance.

public Hyperplane<S>

Returns:

underlying hyperplane
getHyperplane
()

Get the underlying hyperplane.

public double

Returns:

the size of the instance (this is a length in 1D, an area in 2D, a volume in 3D ...)
getSize
()

Get the size of the instance.

public boolean

Returns:

true if the instance is empty
isEmpty
()

Check if the instance is empty.

public SubHyperplane<S>

Returns:

a new sub-hyperplane, union of the instance and other
reunite
(SubHyperplane<S>
other sub-hyperplane to union (must be in the same hyperplane as the instance)
other
)

Compute the union of the instance and another sub-hyperplane.

public Side
side(Hyperplane<S>
hyperplane to check instance against
hyperplane
)
Deprecated as of 3.6, replaced with split(Hyperplane).

Compute the relative position of the instance with respect to an hyperplane.

public SubHyperplane.SplitSubHyperplane<S>

Returns:

an object containing both the part of the instance on the plus side of the hyperplane and the part of the instance on the minus side of the hyperplane
split
(Hyperplane<S>
splitting hyperplane
hyperplane
)

Split the instance in two parts by an hyperplane.

Method Detail

copySelfback to summary
public SubHyperplane<S> copySelf()

Copy the instance.

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).

Returns:SubHyperplane<S>

a new sub-hyperplane, copy of the instance

getHyperplaneback to summary
public Hyperplane<S> getHyperplane()

Get the underlying hyperplane.

Returns:Hyperplane<S>

underlying hyperplane

getSizeback to summary
public double getSize()

Get the size of the instance.

Returns:double

the size of the instance (this is a length in 1D, an area in 2D, a volume in 3D ...)

isEmptyback to summary
public boolean isEmpty()

Check if the instance is empty.

Returns:boolean

true if the instance is empty

reuniteback to summary
public SubHyperplane<S> reunite(SubHyperplane<S> other)

Compute the union of the instance and another sub-hyperplane.

Parameters
other:SubHyperplane<S>

other sub-hyperplane to union (must be in the same hyperplane as the instance)

Returns:SubHyperplane<S>

a new sub-hyperplane, union of the instance and other

sideback to summary
public Side side(Hyperplane<S> hyperplane)

Deprecated

as of 3.6, replaced with split(Hyperplane).SplitSubHyperplane#getSide()

Compute the relative position of the instance with respect to an hyperplane.

Parameters
hyperplane:Hyperplane<S>

hyperplane to check instance against

Returns:Side

one of Side#PLUS, Side#MINUS, Side#BOTH, Side#HYPER

Annotations
@Deprecated
splitback to summary
public SubHyperplane.SplitSubHyperplane<S> split(Hyperplane<S> hyperplane)

Split the instance in two parts by an hyperplane.

Parameters
hyperplane:Hyperplane<S>

splitting hyperplane

Returns:SubHyperplane.SplitSubHyperplane<S>

an object containing both the part of the instance on the plus side of the hyperplane and the part of the instance on the minus side of the hyperplane

org.apache.commons.math3.geometry.partitioning back to summary

public Class SubHyperplane.SplitSubHyperplane<U extends Space>

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.commons.math3.geometry.partitioning.SubHyperplane.SplitSubHyperplane
Type Parameters
<U>
Type of the embedding space.

Class holding the results of the split method.

Field Summary

Modifier and TypeField and Description
private final SubHyperplane<U>
minus

Part of the sub-hyperplane on the minus side of the splitting hyperplane.

private final SubHyperplane<U>
plus

Part of the sub-hyperplane on the plus side of the splitting hyperplane.

Constructor Summary

AccessConstructor and Description
public
SplitSubHyperplane(final SubHyperplane<U>
part of the sub-hyperplane on the plus side of the splitting hyperplane
plus
,
final SubHyperplane<U>
part of the sub-hyperplane on the minus side of the splitting hyperplane
minus
)

Build a SplitSubHyperplane from its parts.

Method Summary

Modifier and TypeMethod and Description
public SubHyperplane<U>

Returns:

part of the sub-hyperplane on the minus side of the splitting hyperplane
getMinus
()

Get the part of the sub-hyperplane on the minus side of the splitting hyperplane.

public SubHyperplane<U>

Returns:

part of the sub-hyperplane on the plus side of the splitting hyperplane
getPlus
()

Get the part of the sub-hyperplane on the plus side of the splitting hyperplane.

public Side

Returns:

Side#PLUS if only getPlus() is neither null nor empty, Side#MINUS if only getMinus() is neither null nor empty, Side#BOTH if both getPlus() and getMinus() are neither null nor empty or Side#HYPER if both getPlus() and getMinus() are either null or empty
getSide
()

Get the side of the split sub-hyperplane with respect to its splitter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

minusback to summary
private final SubHyperplane<U> minus

Part of the sub-hyperplane on the minus side of the splitting hyperplane.

plusback to summary
private final SubHyperplane<U> plus

Part of the sub-hyperplane on the plus side of the splitting hyperplane.

Constructor Detail

SplitSubHyperplaneback to summary
public SplitSubHyperplane(final SubHyperplane<U> plus, final SubHyperplane<U> minus)

Build a SplitSubHyperplane from its parts.

Parameters
plus:SubHyperplane<U>

part of the sub-hyperplane on the plus side of the splitting hyperplane

minus:SubHyperplane<U>

part of the sub-hyperplane on the minus side of the splitting hyperplane

Method Detail

getMinusback to summary
public SubHyperplane<U> getMinus()

Get the part of the sub-hyperplane on the minus side of the splitting hyperplane.

Returns:SubHyperplane<U>

part of the sub-hyperplane on the minus side of the splitting hyperplane

getPlusback to summary
public SubHyperplane<U> getPlus()

Get the part of the sub-hyperplane on the plus side of the splitting hyperplane.

Returns:SubHyperplane<U>

part of the sub-hyperplane on the plus side of the splitting hyperplane

getSideback to summary
public Side getSide()

Get the side of the split sub-hyperplane with respect to its splitter.

Returns:Side

Side#PLUS if only getPlus() is neither null nor empty, Side#MINUS if only getMinus() is neither null nor empty, Side#BOTH if both getPlus() and getMinus() are neither null nor empty or Side#HYPER if both getPlus() and getMinus() are either null or empty

Since
3.6