Top Description Fields Constructors Methods
org.apache.commons.math3.geometry.euclidean.oned

public Class OrientedPoint

extends Object
implements Hyperplane<Euclidean1D>
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.geometry.partitioning.Hyperplane
Imports
org.apache.commons.math3.geometry.Point, .Vector, org.apache.commons.math3.geometry.partitioning.Hyperplane

This class represents a 1D oriented hyperplane.

An hyperplane in 1D is a simple point, its orientation being a boolean.

Instances of this class are guaranteed to be immutable.

Since
3.0

Field Summary

Modifier and TypeField and Description
private static final double
DEFAULT_TOLERANCE

Default value for tolerance.

private boolean
direct

Orientation.

private Vector1D
location

Vector location.

private final double
tolerance

Tolerance below which points are considered to belong to the hyperplane.

Constructor Summary

AccessConstructor and Description
public
OrientedPoint(final Vector1D
location of the hyperplane
location
,
final boolean
if true, the plus side of the hyperplane is towards abscissas greater than location
direct
,
final double
tolerance below which points are considered to belong to the hyperplane
tolerance
)

Simple constructor.

public
OrientedPoint(final Vector1D
location of the hyperplane
location
,
final boolean
if true, the plus side of the hyperplane is towards abscissas greater than location
direct
)
Deprecated as of 3.3, replaced with OrientedPoint(Vector1D, boolean, double)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public OrientedPoint

Returns:

the instance itself
copySelf
()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.copySelf.

Copy the instance.

public Vector1D

Returns:

the hyperplane location
getLocation
()

Get the hyperplane location on the real line.

public double

Returns:

offset of the vector
getOffset
(Vector<Euclidean1D>
vector to check
vector
)

Get the offset (oriented distance) of a vector.

public double
getOffset(final Point<Euclidean1D>
point to check
point
)

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.getOffset.

Get the offset (oriented distance) of a point.

public double
getTolerance()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.getTolerance.

Get the tolerance below which points are considered to belong to the hyperplane.

public boolean

Returns:

true if the plus side of the hyperplane is towards abscissae greater than hyperplane location
isDirect
()

Check if the hyperplane orientation is direct.

public Point<Euclidean1D>
project(Point<Euclidean1D>
point to project
point
)

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.project.

Project a point to the hyperplane.

public void
revertSelf()

Revert the instance.

public boolean
sameOrientationAs(final Hyperplane<Euclidean1D>
other hyperplane to check against the instance
other
)

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.sameOrientationAs.

Check if the instance has the same orientation as another hyperplane.

public SubOrientedPoint

Returns:

a dummy sub hyperplane
wholeHyperplane
()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.wholeHyperplane.

Build a region covering the whole hyperplane.

public IntervalsSet

Returns:

a region containing the instance (really an IntervalsSet instance)
wholeSpace
()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.wholeSpace.

Build a region covering the whole space.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_TOLERANCEback to summary
private static final double DEFAULT_TOLERANCE

Default value for tolerance.

directback to summary
private boolean direct

Orientation.

locationback to summary
private Vector1D location

Vector location.

toleranceback to summary
private final double tolerance

Tolerance below which points are considered to belong to the hyperplane.

Constructor Detail

OrientedPointback to summary
public OrientedPoint(final Vector1D location, final boolean direct, final double tolerance)

Simple constructor.

Parameters
location:Vector1D

location of the hyperplane

direct:boolean

if true, the plus side of the hyperplane is towards abscissas greater than location

tolerance:double

tolerance below which points are considered to belong to the hyperplane

Since
3.3
OrientedPointback to summary
public OrientedPoint(final Vector1D location, final boolean direct)

Deprecated

as of 3.3, replaced with OrientedPoint(Vector1D, boolean, double)

Simple constructor.

Parameters
location:Vector1D

location of the hyperplane

direct:boolean

if true, the plus side of the hyperplane is towards abscissas greater than location

Annotations
@Deprecated

Method Detail

copySelfback to summary
public OrientedPoint copySelf()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.copySelf.

Copy the instance.

Since instances are immutable, this method directly returns the instance.

Returns:OrientedPoint

the instance itself

getLocationback to summary
public Vector1D getLocation()

Get the hyperplane location on the real line.

Returns:Vector1D

the hyperplane location

getOffsetback to summary
public double getOffset(Vector<Euclidean1D> vector)

Get the offset (oriented distance) of a vector.

Parameters
vector:Vector<Euclidean1D>

vector to check

Returns:double

offset of the vector

getOffsetback to summary
public double getOffset(final Point<Euclidean1D> point)

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.getOffset.

Doc from org.apache.commons.math3.geometry.partitioning.Hyperplane.getOffset.

Get the offset (oriented distance) of a point.

The offset is 0 if the point is on the underlying hyperplane, it is positive if the point is on one particular side of the hyperplane, and it is negative if the point is on the other side, according to the hyperplane natural orientation.

Parameters
point:Point<Euclidean1D>

point to check

Returns:double

offset of the point

getToleranceback to summary
public double getTolerance()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.getTolerance.

Doc from org.apache.commons.math3.geometry.partitioning.Hyperplane.getTolerance.

Get the tolerance below which points are considered to belong to the hyperplane.

Returns:double

tolerance below which points are considered to belong to the hyperplane

Since
3.3
isDirectback to summary
public boolean isDirect()

Check if the hyperplane orientation is direct.

Returns:boolean

true if the plus side of the hyperplane is towards abscissae greater than hyperplane location

projectback to summary
public Point<Euclidean1D> project(Point<Euclidean1D> point)

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.project.

Doc from org.apache.commons.math3.geometry.partitioning.Hyperplane.project.

Project a point to the hyperplane.

Parameters
point:Point<Euclidean1D>

point to project

Returns:Point<Euclidean1D>

projected point

Since
3.3
revertSelfback to summary
public void revertSelf()

Revert the instance.

sameOrientationAsback to summary
public boolean sameOrientationAs(final Hyperplane<Euclidean1D> other)

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.sameOrientationAs.

Doc from org.apache.commons.math3.geometry.partitioning.Hyperplane.sameOrientationAs.

Check if the instance has the same orientation as another hyperplane.

This method is expected to be called on parallel hyperplanes. The method should not re-check for parallelism, only for orientation, typically by testing something like the sign of the dot-products of normals.

Parameters
other:Hyperplane<Euclidean1D>

other hyperplane to check against the instance

Returns:boolean

true if the instance and the other hyperplane have the same orientation

wholeHyperplaneback to summary
public SubOrientedPoint wholeHyperplane()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.wholeHyperplane.

Build a region covering the whole hyperplane.

Since this class represent zero dimension spaces which does not have lower dimension sub-spaces, this method returns a dummy implementation of a SubHyperplane. This implementation is only used to allow the SubHyperplane class implementation to work properly, it should not be used otherwise.

Returns:SubOrientedPoint

a dummy sub hyperplane

wholeSpaceback to summary
public IntervalsSet wholeSpace()

Implements org.apache.commons.math3.geometry.partitioning.Hyperplane.wholeSpace.

Build a region covering the whole space.

Returns:IntervalsSet

a region containing the instance (really an IntervalsSet instance)