Class AbstractHyperplane<P extends Point<P>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.commons.numbers.core.Precision.DoubleEquivalence precision
      Precision object used to perform floating point comparisons.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractHyperplane​(org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
      Construct an instance using the given precision context.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      HyperplaneLocation classify​(P point)
      Classify a point with respect to this hyperplane.
      boolean contains​(P point)
      Return true if the given point lies on the hyperplane.
      org.apache.commons.numbers.core.Precision.DoubleEquivalence getPrecision()
      Get the precision object used to perform floating point comparisons for this instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • precision

        private final org.apache.commons.numbers.core.Precision.DoubleEquivalence precision
        Precision object used to perform floating point comparisons.
    • Constructor Detail

      • AbstractHyperplane

        protected AbstractHyperplane​(org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Construct an instance using the given precision context.
        Parameters:
        precision - object used to perform floating point comparisons
    • Method Detail

      • classify

        public HyperplaneLocation classify​(P point)
        Classify a point with respect to this hyperplane.
        Specified by:
        classify in interface Hyperplane<P extends Point<P>>
        Parameters:
        point - the point to classify
        Returns:
        the relative location of the point with respect to this instance
      • contains

        public boolean contains​(P point)
        Return true if the given point lies on the hyperplane.
        Specified by:
        contains in interface Hyperplane<P extends Point<P>>
        Parameters:
        point - the point to test
        Returns:
        true if the point lies on the hyperplane
      • getPrecision

        public org.apache.commons.numbers.core.Precision.DoubleEquivalence getPrecision()
        Get the precision object used to perform floating point comparisons for this instance.
        Returns:
        the precision object for this instance