OrientedPoint (Apache Commons Math 3.6.1 API)

org.apache.commons.math3.geometry.euclidean.oned

## Class OrientedPoint

- java.lang.Object
- - org.apache.commons.math3.geometry.euclidean.oned.OrientedPoint

- All Implemented Interfaces:
    Hyperplane<Euclidean1D>

      public class OrientedPoint
      extends Object
      implements Hyperplane<Euclidean1D>

  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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrientedPoint(Vector1D location, boolean direct)` Deprecated. as of 3.3, replaced with `OrientedPoint(Vector1D, boolean, double)`
    `OrientedPoint(Vector1D location, boolean direct, double tolerance)` Simple constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `OrientedPoint` | `copySelf()` Copy the instance.
    `Vector1D` | `getLocation()` Get the hyperplane location on the real line.
    `double` | `getOffset(Point<Euclidean1D> point)` Get the offset (oriented distance) of a point.
    `double` | `getOffset(Vector<Euclidean1D> vector)` Get the offset (oriented distance) of a vector.
    `double` | `getTolerance()` Get the tolerance below which points are considered to belong to the hyperplane.
    `boolean` | `isDirect()` Check if the hyperplane orientation is direct.
    `Point<Euclidean1D>` | `project(Point<Euclidean1D> point)` Project a point to the hyperplane.
    `void` | `revertSelf()` Revert the instance.
    `boolean` | `sameOrientationAs(Hyperplane<Euclidean1D> other)` Check if the instance has the same orientation as another hyperplane.
    `SubOrientedPoint` | `wholeHyperplane()` Build a region covering the whole hyperplane.
    `IntervalsSet` | `wholeSpace()` Build a region covering the whole space.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OrientedPoint

          public OrientedPoint(Vector1D location,
                       boolean direct,
                       double tolerance)

      Simple constructor.
      Parameters:
        `location` - location of the hyperplane
        `direct` - if true, the plus side of the hyperplane is towards abscissas greater than `location`
        `tolerance` - tolerance below which points are considered to belong to the hyperplane
      Since:
        3.3

    - #### OrientedPoint

          @Deprecated
          public OrientedPoint(Vector1D location,
                                  boolean direct)

      Deprecated. as of 3.3, replaced with `OrientedPoint(Vector1D, boolean, double)`
      Simple constructor.
      Parameters:
        `location` - location of the hyperplane
        `direct` - if true, the plus side of the hyperplane is towards abscissas greater than `location`

  - ### Method Detail

    - #### copySelf

          public OrientedPoint copySelf()

      Copy the instance.

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

      Specified by:
        `copySelf` in interface `Hyperplane<Euclidean1D>`
      Returns:
        the instance itself

    - #### getOffset

          public double getOffset(Vector<Euclidean1D> vector)

      Get the offset (oriented distance) of a vector.
      Parameters:
        `vector` - vector to check
      Returns:
        offset of the vector

    - #### getOffset

          public double getOffset(Point<Euclidean1D> point)

      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.

      Specified by:
        `getOffset` in interface `Hyperplane<Euclidean1D>`
      Parameters:
        `point` - point to check
      Returns:
        offset of the point

    - #### wholeHyperplane

          public SubOrientedPoint 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.

      Specified by:
        `wholeHyperplane` in interface `Hyperplane<Euclidean1D>`
      Returns:
        a dummy sub hyperplane

    - #### wholeSpace

          public IntervalsSet wholeSpace()

      Build a region covering the whole space.
      Specified by:
        `wholeSpace` in interface `Hyperplane<Euclidean1D>`
      Returns:
        a region containing the instance (really an `IntervalsSet` instance)

    - #### sameOrientationAs

          public boolean sameOrientationAs(Hyperplane<Euclidean1D> other)

      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.

      Specified by:
        `sameOrientationAs` in interface `Hyperplane<Euclidean1D>`
      Parameters:
        `other` - other hyperplane to check against the instance
      Returns:
        true if the instance and the other hyperplane have the same orientation

    - #### project

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

      Project a point to the hyperplane.
      Specified by:
        `project` in interface `Hyperplane<Euclidean1D>`
      Parameters:
        `point` - point to project
      Returns:
        projected point
      Since:
        3.3

    - #### getTolerance

          public double getTolerance()

      Get the tolerance below which points are considered to belong to the hyperplane.
      Specified by:
        `getTolerance` in interface `Hyperplane<Euclidean1D>`
      Returns:
        tolerance below which points are considered to belong to the hyperplane
      Since:
        3.3

    - #### getLocation

          public Vector1D getLocation()

      Get the hyperplane location on the real line.
      Returns:
        the hyperplane location

    - #### isDirect

          public boolean isDirect()

      Check if the hyperplane orientation is direct.
      Returns:
        true if the plus side of the hyperplane is towards abscissae greater than hyperplane location

    - #### revertSelf

          public void revertSelf()

      Revert the instance.

Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.