Package org.apache.sis.math
Class SequenceVector.Longs
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<Number>
org.apache.sis.math.Vector
org.apache.sis.math.SequenceVector
org.apache.sis.math.SequenceVector.Longs
- All Implemented Interfaces:
Serializable,Iterable<Number>,Collection<Number>,List<Number>,RandomAccess
- Enclosing class:
- SequenceVector
A vector which is a sequence of increasing or decreasing
long values.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.math.SequenceVector
SequenceVector.Doubles, SequenceVector.Floats, SequenceVector.Longs -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe value at index 0.private final longThe difference between the values at two adjacent indexes.private static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.math.SequenceVector
length, typeFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) VectorcreateSubSampling(int offset, int step, int n) Creates a new sequence for a subrange of this vector.doubledoubleValue(int index) Computes the value at the given index.floatfloatValue(int index) Computes the value at the given index.get(int index) Computes the value at the given index.increment(double tolerance) Returns the increment between all consecutive valuesbooleanReturnstruesince this vector contains only integer values.booleanisNaN(int index) Returnsfalsesince this vector never returnNaNvalues.longlongValue(int index) Computes the value at the given index.NumberRange<?>range()Computes the minimal and maximal values in this vector.stringValue(int index) Returns the string representation of the value at the given index.Methods inherited from class org.apache.sis.math.SequenceVector
compress, createTransform, doubleValues, floatValues, getElementType, isEmptyOrNaN, set, sizeMethods inherited from class org.apache.sis.math.Vector
backingVector, buffer, byteValue, concatenate, copy, create, create, createConcatenate, createForDecimal, createSequence, createSequence, equals, equals, fill, hashCode, indexOf, intValue, isSinglePrecision, isUnsigned, pick, range, repeat, repetitions, reverse, shortValue, subList, subSampling, subtract, toBacking, toString, transform, warningMethods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRangeMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
first
private final long firstThe value at index 0. -
increment
private final long incrementThe difference between the values at two adjacent indexes. May be positive, negative or zero.
-
-
Constructor Details
-
Longs
Creates a sequence of numbers in a given range of values using the given increment.- Parameters:
type- the type of elements in the sequence.first- the first value, inclusive.increment- the difference between the values at two adjacent indexes.length- the length of the vector.
-
-
Method Details
-
createSubSampling
Creates a new sequence for a subrange of this vector.- Overrides:
createSubSamplingin classVector
-
isInteger
public boolean isInteger()Returnstruesince this vector contains only integer values. -
isNaN
public boolean isNaN(int index) Returnsfalsesince this vector never returnNaNvalues. -
doubleValue
public double doubleValue(int index) Computes the value at the given index.- Specified by:
doubleValuein classVector- Parameters:
index- the index in the [0 … size-1] range.- Returns:
- the value at the given index.
- See Also:
-
floatValue
public float floatValue(int index) Computes the value at the given index.- Overrides:
floatValuein classVector- Parameters:
index- the index in the [0 … size-1] range.- Returns:
- the value at the given index.
- See Also:
-
longValue
public long longValue(int index) Computes the value at the given index. -
stringValue
Returns the string representation of the value at the given index.- Specified by:
stringValuein classVector- Parameters:
index- the index in the [0 … size-1] range.- Returns:
- a string representation of the value at the given index (may be
null). - See Also:
-
get
Computes the value at the given index. -
increment
Returns the increment between all consecutive values -
range
Computes the minimal and maximal values in this vector.
-