Class PSquarePercentile.Marker
java.lang.Object
org.apache.commons.math3.stat.descriptive.rank.PSquarePercentile.Marker
- All Implemented Interfaces:
Serializable
,Cloneable
- Enclosing class:
PSquarePercentile
The class modeling the attributes of the marker of the P-square algorithm
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
Desired marker increment.private double
Desired marker position.private int
The marker index which is just a serial number for the marker in the marker array of 5+1.private double
The integral marker position.private UnivariateInterpolator
Linear interpolator which is not serializableprivate double
Marker height or the quantile.private PSquarePercentile.Marker
Next and previous markers for easy linked navigation in loops.private final UnivariateInterpolator
Nonlinear interpolatorprivate PSquarePercentile.Marker
The previous marker linksprivate static final long
Serial Version ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone this instance.private double
Difference between desired and actual positionboolean
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 objectprivate double
estimate()
Estimate the quantile for the current marker.int
hashCode()
private void
incrementPosition
(int d) Increment Position by d.private PSquarePercentile.Marker
index
(int indexOfMarker) Sets the index of the marker.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].private PSquarePercentile.Marker
next
(PSquarePercentile.Marker nextMarker) Sets the next marker.private PSquarePercentile.Marker
previous
(PSquarePercentile.Marker previousMarker) Sets the previous marker.private void
readObject
(ObjectInputStream anInstream) Read Object to deserialize.toString()
private void
Update desired Position with increment.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial Version ID- See Also:
-
index
private int indexThe marker index which is just a serial number for the marker in the marker array of 5+1. -
intMarkerPosition
private double intMarkerPositionThe integral marker position. Refer to the variable n in the original works. -
desiredMarkerPosition
private double desiredMarkerPositionDesired marker position. Refer to the variable n' in the original works. -
markerHeight
private double markerHeightMarker height or the quantile. Refer to the variable q in the original works. -
desiredMarkerIncrement
private double desiredMarkerIncrementDesired marker increment. Refer to the variable dn' in the original works. -
next
Next and previous markers for easy linked navigation in loops. this is not serialized as they can be rebuilt during deserialization. -
previous
The previous marker links -
nonLinear
Nonlinear interpolator -
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 valuemakerPositionDesired
- represent the desired marker positionmarkerPositionIncrement
- represent increments for positionmarkerPositionNumber
- represent the position number of marker
-
-
Method Details
-
previous
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
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 boundsyD
- the estimate- Returns:
- true if yD is a bad estimate
-
equals
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 -
hashCode
public int hashCode() -
readObject
Read Object to deserialize.- Parameters:
anInstream
- Stream Object data- Throws:
IOException
- thrown for IO ErrorsClassNotFoundException
- thrown for class not being found
-
clone
Clone this instance. -
toString
-