Class Float64Vector

java.lang.Object
org.jscience.mathematics.vector.Vector<Float64>
org.jscience.mathematics.vector.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 Details

    • XML

      protected static final javolution.xml.XMLFormat<Float64Vector> XML
      Holds the default XML representation. For example: [code] [/code]
  • Method Details

    • valueOf

      public static Float64Vector valueOf(double... values)
      Returns a new vector holding the specified double values.
      Parameters:
      values - the vector values.
      Returns:
      the vector having the specified values.
    • valueOf

      public static Float64Vector valueOf(List<Float64> elements)
      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

      public static Float64Vector valueOf(Vector<Float64> that)
      Returns a Float64Vector instance equivalent to the specified vector.
      Parameters:
      that - the vector to convert.
      Returns:
      that or 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

      public Float64 norm()
      Returns the Euclidian norm of this vector (square root of the dot product of this vector and itself).
      Specified by:
      norm in interface VectorSpaceNormed<Vector<Float64>,Float64>
      Returns:
      sqrt(this · this).
      See Also:
    • normValue

      public double normValue()
      Returns the norm() value of this vector.
      Returns:
      this.norm().doubleValue().
    • getDimension

      public int getDimension()
      Description copied from class: Vector
      Returns the number of elements held by this vector.
      Specified by:
      getDimension in class Vector<Float64>
      Returns:
      this vector dimension.
    • get

      public Float64 get(int i)
      Description copied from class: Vector
      Returns a single element from this vector.
      Specified by:
      get in class Vector<Float64>
      Parameters:
      i - the element index (range [0..n[).
      Returns:
      the element at i.
    • opposite

      public Float64Vector opposite()
      Description copied from class: Vector
      Returns the negation of this vector.
      Specified by:
      opposite in interface GroupAdditive<Vector<Float64>>
      Specified by:
      opposite in class Vector<Float64>
      Returns:
      -this.
    • plus

      public Float64Vector plus(Vector<Float64> that)
      Description copied from class: Vector
      Returns the sum of this vector with the one specified.
      Specified by:
      plus in interface GroupAdditive<Vector<Float64>>
      Specified by:
      plus in class Vector<Float64>
      Parameters:
      that - the vector to be added.
      Returns:
      this + that.
    • minus

      public Float64Vector minus(Vector<Float64> that)
      Description copied from class: Vector
      Returns the difference between this vector and the one specified.
      Overrides:
      minus in class Vector<Float64>
      Parameters:
      that - the vector to be subtracted.
      Returns:
      this - that.
    • times

      public Float64Vector times(Float64 k)
      Description copied from class: Vector
      Returns the product of this vector with the specified coefficient.
      Specified by:
      times in interface VectorSpace<Vector<Float64>,Float64>
      Specified by:
      times in class Vector<Float64>
      Parameters:
      k - the coefficient multiplier.
      Returns:
      this · k
    • times

      public Float64Vector times(double k)
      Equivalent to this.times(Float64.valueOf(k))
      Parameters:
      k - the coefficient.
      Returns:
      this * k
    • times

      public Float64 times(Vector<Float64> that)
      Description copied from class: Vector
      Returns the dot product of this vector with the one specified.
      Specified by:
      times in class Vector<Float64>
      Parameters:
      that - the vector multiplier.
      Returns:
      this · that
      See Also:
    • cross

      public Float64Vector cross(Vector<Float64> that)
      Description copied from class: Vector
      Returns the cross product of two 3-dimensional vectors.
      Overrides:
      cross in class Vector<Float64>
      Parameters:
      that - the vector multiplier.
      Returns:
      this x that
    • copy

      public Float64Vector copy()
      Description copied from class: Vector
      Returns a copy of this vector allocated by the calling thread (possibly on the stack).
      Specified by:
      copy in interface javolution.lang.ValueType
      Specified by:
      copy in class Vector<Float64>
      Returns:
      an identical and independant copy of this matrix.