Class DoubleSequence
java.lang.Object
org.broadinstitute.hellbender.utils.dragstr.DoubleSequence
User argument to specify a sequence of doubles with 3 values in the format
"start:step:limit"
.
The start is the first values in the sequence. The
indicates the increment or decrement between consecutive values of the sequence
. And finally the limit indicates when the sequence stops; if increasing, when the next value exceeded the limit, if decreases when next value subceeds the limit. The sequence is inclusive as far as the limit.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Pattern
Currently the only supported format for the string descriptor is: start:step:end. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
get
(int index) Returns an element of the sequence by its 0-base index.double
max()
Returns the maximum value of the sequencedouble
min()
Returns the minimum value of the sequence.long
size()
Number of elements in the sequence.double
step()
Returns the step in the sequence.double[]
Returns a new double array containing the elements of the sequence in the same order.toString()
Return the original spec of the sequence
-
Field Details
-
STEP_DECRIPTION_PATTERN
Currently the only supported format for the string descriptor is: start:step:end.
-
-
Constructor Details
-
DoubleSequence
-
-
Method Details
-
get
public double get(int index) Returns an element of the sequence by its 0-base index.- Parameters:
index
-- Returns:
-
size
public long size()Number of elements in the sequence.- Returns:
- 0 or greater.
-
toString
Return the original spec of the sequence -
min
public double min()Returns the minimum value of the sequence.- Returns:
- always a finite.
-
max
public double max()Returns the maximum value of the sequence- Returns:
- always a finite.
-
step
public double step()Returns the step in the sequence.- Returns:
- unspecified if the sequence has less than 2 elements, otherwise a finite.
-
toDoubleArray
public double[] toDoubleArray()Returns a new double array containing the elements of the sequence in the same order.- Returns:
- never , but perhaps an empty array.
-
getDescription
-