Package org.jscience.mathematics.vector
Class Float64Vector
- All Implemented Interfaces:
javolution.lang.Immutable,javolution.lang.Realtime,javolution.lang.ValueType,GroupAdditive<Vector<Float64>>,Structure<Vector<Float64>>,VectorSpace<Vector<Float64>,,Float64> VectorSpaceNormed<Vector<Float64>,Float64>
public final class Float64Vector
extends Vector<Float64>
implements VectorSpaceNormed<Vector<Float64>,Float64>
This class represents an optimized vector implementation
for 64 bits floating point elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final javolution.xml.XMLFormat<Float64Vector>Holds the default XML representation. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this vectorallocatedby the calling thread (possibly on the stack).Returns the cross product of two 3-dimensional vectors.get(int i) Returns a single element from this vector.intReturns the number of elements held by this vector.doublegetValue(int i) Returns the value of a floating point number from this vector (fast).Returns the difference between this vector and the one specified.norm()Returns the Euclidian norm of this vector (square root of the dot product of this vector and itself).doubleReturns thenorm()value of this vector.opposite()Returns the negation of this vector.Returns the sum of this vector with the one specified.times(double k) Equivalent tothis.times(Float64.valueOf(k))Returns the product of this vector with the specified coefficient.Returns the dot product of this vector with the one specified.static Float64VectorvalueOf(double... values) Returns a new vector holding the specifieddoublevalues.static Float64VectorReturns a new vector holding the elements from the specified collection.static Float64VectorReturns aFloat64Vectorinstance equivalent to the specified vector.
-
Field Details
-
XML
Holds the default XML representation. For example: [code] [/code]
-
-
Method Details
-
valueOf
Returns a new vector holding the specifieddoublevalues.- Parameters:
values- the vector values.- Returns:
- the vector having the specified values.
-
valueOf
Returns a new vector holding the elements from the specified collection.- Parameters:
elements- the collection of floating-points numbers.- Returns:
- the vector having the specified elements.
-
valueOf
Returns aFloat64Vectorinstance equivalent to the specified vector.- Parameters:
that- the vector to convert.- Returns:
thator new equivalent Float64Vector.
-
getValue
public double getValue(int i) Returns the value of a floating point number from this vector (fast).- Parameters:
i- the floating point number index.- Returns:
- the value of the floating point number at
i. - Throws:
IndexOutOfBoundsException-(i < 0) || (i >= dimension())
-
norm
Returns the Euclidian norm of this vector (square root of the dot product of this vector and itself).- Specified by:
normin interfaceVectorSpaceNormed<Vector<Float64>,Float64> - Returns:
sqrt(this · this).- See Also:
-
normValue
public double normValue()Returns thenorm()value of this vector.- Returns:
this.norm().doubleValue().
-
getDimension
public int getDimension()Description copied from class:VectorReturns the number of elements held by this vector.- Specified by:
getDimensionin classVector<Float64>- Returns:
- this vector dimension.
-
get
Description copied from class:VectorReturns a single element from this vector. -
opposite
Description copied from class:VectorReturns the negation of this vector. -
plus
Description copied from class:VectorReturns the sum of this vector with the one specified. -
minus
Description copied from class:VectorReturns the difference between this vector and the one specified. -
times
Description copied from class:VectorReturns the product of this vector with the specified coefficient. -
times
Equivalent tothis.times(Float64.valueOf(k))- Parameters:
k- the coefficient.- Returns:
this * k
-
times
Description copied from class:VectorReturns the dot product of this vector with the one specified. -
cross
Description copied from class:VectorReturns the cross product of two 3-dimensional vectors. -
copy
Description copied from class:VectorReturns a copy of this vectorallocatedby the calling thread (possibly on the stack).
-