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

public Class BoundaryProjection<S extends Space>

extends Object
Class Inheritance
Type Parameters
<S>
Type of the space.
Imports
org.apache.commons.math3.geometry.Point, .Space

Class holding the result of point projection on region boundary.

This class is a simple placeholder, it does not provide any processing methods.

Instances of this class are guaranteed to be immutable

Since
3.3
See Also
AbstractRegion#projectToBoundary(Point)

Field Summary

Modifier and TypeField and Description
private final double
offset

Offset of the point with respect to the boundary it is projected on.

private final Point<S>
original

Original point.

private final Point<S>
projected

Projected point.

Constructor Summary

AccessConstructor and Description
public
BoundaryProjection(final Point<S>
original point
original
,
final Point<S>
projected point
projected
,
final double
offset of the point with respect to the boundary it is projected on
offset
)

Constructor from raw elements.

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

offset of the point with respect to the boundary it is projected on
getOffset
()

Offset of the point with respect to the boundary it is projected on.

public Point<S>

Returns:

original point
getOriginal
()

Get the original point.

public Point<S>

Returns:

projected point, or null if there are no boundary
getProjected
()

Projected point.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

offsetback to summary
private final double offset

Offset of the point with respect to the boundary it is projected on.

originalback to summary
private final Point<S> original

Original point.

projectedback to summary
private final Point<S> projected

Projected point.

Constructor Detail

BoundaryProjectionback to summary
public BoundaryProjection(final Point<S> original, final Point<S> projected, final double offset)

Constructor from raw elements.

Parameters
original:Point<S>

original point

projected:Point<S>

projected point

offset:double

offset of the point with respect to the boundary it is projected on

Method Detail

getOffsetback to summary
public double getOffset()

Offset of the point with respect to the boundary it is projected on.

The offset with respect to the boundary is negative if the original point is inside the region, and positive otherwise.

If there are no boundary, the value is set to either Double.POSITIVE_INFINITY if the region is empty (i.e. all points are outside of the region) or Double.NEGATIVE_INFINITY if the region covers the whole space (i.e. all points are inside of the region).

Returns:double

offset of the point with respect to the boundary it is projected on

getOriginalback to summary
public Point<S> getOriginal()

Get the original point.

Returns:Point<S>

original point

getProjectedback to summary
public Point<S> getProjected()

Projected point.

Returns:Point<S>

projected point, or null if there are no boundary