Package org.apache.sis.math
Class ArrayVector.Decimal
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<Number>
org.apache.sis.math.Vector
org.apache.sis.math.ArrayVector<Float>
org.apache.sis.math.ArrayVector.Floats
org.apache.sis.math.ArrayVector.Decimal
- All Implemented Interfaces:
Serializable,Iterable<Number>,Collection<Number>,List<Number>,RandomAccess,CheckedContainer<Float>
- Enclosing class:
- ArrayVector<E extends Number>
A vector backed by an array of type
float[] to be converted to double in a way that minimizes
the errors when represented in base 10. This implementation should be used only when there is good reasons to
believe that the float data where encoded in base 10 in the first place (for example in an ASCII file).-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.math.ArrayVector
ArrayVector.Decimal, ArrayVector.Doubles -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) NumberRange<?>createRange(float min, float max) Creates a range from the given minimum and maximum values.doubledoubleValue(int index) Returns the value at the given index.get(int index) Returns the value at the given index.inthashCode()Applies hash code contract specifiedVector.hashCode().booleanReturns whether values are convertible tofloattype.Methods inherited from class org.apache.sis.math.ArrayVector.Floats
buffer, equals, fill, floatValue, floatValues, getElementType, indexOf, isEmptyOrNaN, isNaN, range, set, size, stringValueMethods inherited from class org.apache.sis.math.ArrayVector
compress, compress, newInstance, verifyTypeMethods inherited from class org.apache.sis.math.Vector
backingVector, byteValue, compress, concatenate, copy, create, create, createConcatenate, createForDecimal, createSequence, createSequence, createSubSampling, createTransform, doubleValues, equals, increment, intValue, isInteger, isUnsigned, longValue, 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:
-
-
Constructor Details
-
Decimal
Decimal(float[] array) Creates a new vector for the given array.
-
-
Method Details
-
isSinglePrecision
public boolean isSinglePrecision()Returns whether values are convertible tofloattype.- Overrides:
isSinglePrecisionin classArrayVector.Floats- Returns:
- whether values in this vector can be casted to
floatprimitive type. - See Also:
-
doubleValue
public double doubleValue(int index) Returns the value at the given index.- Overrides:
doubleValuein classArrayVector.Floats- Parameters:
index- the index in the [0 … size-1] range.- Returns:
- the value at the given index.
- See Also:
-
get
Returns the value at the given index. -
createRange
Creates a range from the given minimum and maximum values.- Overrides:
createRangein classArrayVector.Floats
-
hashCode
public int hashCode()Applies hash code contract specifiedVector.hashCode().- Specified by:
hashCodein interfaceCollection<Number>- Specified by:
hashCodein interfaceList<Number>- Overrides:
hashCodein classArrayVector.Floats- Returns:
- a hash code value for the values in this vector.
-