Class PSquarePercentile.Marker

java.lang.Object
org.apache.commons.math3.stat.descriptive.rank.PSquarePercentile.Marker
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
PSquarePercentile

private static class PSquarePercentile.Marker extends Object implements Serializable, Cloneable
The class modeling the attributes of the marker of the P-square algorithm
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial Version ID
      See Also:
    • index

      private int index
      The marker index which is just a serial number for the marker in the marker array of 5+1.
    • intMarkerPosition

      private double intMarkerPosition
      The integral marker position. Refer to the variable n in the original works.
    • desiredMarkerPosition

      private double desiredMarkerPosition
      Desired marker position. Refer to the variable n' in the original works.
    • markerHeight

      private double markerHeight
      Marker height or the quantile. Refer to the variable q in the original works.
    • desiredMarkerIncrement

      private double desiredMarkerIncrement
      Desired marker increment. Refer to the variable dn' in the original works.
    • next

      private transient PSquarePercentile.Marker next
      Next and previous markers for easy linked navigation in loops. this is not serialized as they can be rebuilt during deserialization.
    • previous

      private transient PSquarePercentile.Marker previous
      The previous marker links
    • nonLinear

      private final UnivariateInterpolator nonLinear
      Nonlinear interpolator
    • linear

      private transient UnivariateInterpolator linear
      Linear interpolator which is not serializable
  • Constructor Details

    • Marker

      private Marker()
      Default constructor
    • Marker

      private Marker(double heightOfMarker, double makerPositionDesired, double markerPositionIncrement, double markerPositionNumber)
      Constructor of the marker with parameters
      Parameters:
      heightOfMarker - represent the quantile value
      makerPositionDesired - represent the desired marker position
      markerPositionIncrement - represent increments for position
      markerPositionNumber - represent the position number of marker
  • Method Details

    • previous

      private PSquarePercentile.Marker previous(PSquarePercentile.Marker previousMarker)
      Sets the previous marker.
      Parameters:
      previousMarker - the previous marker to the current marker in the array of markers
      Returns:
      this instance
    • next

      Sets the next marker.
      Parameters:
      nextMarker - the next marker to the current marker in the array of markers
      Returns:
      this instance
    • index

      private PSquarePercentile.Marker index(int indexOfMarker)
      Sets the index of the marker.
      Parameters:
      indexOfMarker - the array index of the marker in marker array
      Returns:
      this instance
    • updateDesiredPosition

      private void updateDesiredPosition()
      Update desired Position with increment.
    • incrementPosition

      private void incrementPosition(int d)
      Increment Position by d.
      Parameters:
      d - a delta value to increment
    • difference

      private double difference()
      Difference between desired and actual position
      Returns:
      difference between desired and actual position
    • estimate

      private double estimate()
      Estimate the quantile for the current marker.
      Returns:
      estimated quantile
    • isEstimateBad

      private boolean isEstimateBad(double[] y, double yD)
      Check if parabolic/nonlinear estimate is bad by checking if the ordinate found is beyond the y[0] and y[2].
      Parameters:
      y - the array to get the bounds
      yD - the estimate
      Returns:
      true if yD is a bad estimate
    • equals

      public boolean equals(Object o)
      This equals method checks for marker attributes and as well checks if navigation pointers (next and previous) are the same between this and passed in object
      Overrides:
      equals in class Object
      Parameters:
      o - Other object
      Returns:
      true if this equals passed in other object o
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • readObject

      private void readObject(ObjectInputStream anInstream) throws ClassNotFoundException, IOException
      Read Object to deserialize.
      Parameters:
      anInstream - Stream Object data
      Throws:
      IOException - thrown for IO Errors
      ClassNotFoundException - thrown for class not being found
    • clone

      public Object clone()
      Clone this instance.
      Overrides:
      clone in class Object
      Returns:
      cloned marker
    • toString

      public String toString()
      Overrides:
      toString in class Object