Class ArrayRealVector

java.lang.Object
org.hipparchus.linear.RealVector
org.hipparchus.linear.ArrayRealVector
All Implemented Interfaces:
Serializable

public class ArrayRealVector extends RealVector implements Serializable
This class implements the RealVector interface with a double array.
See Also:
  • Constructor Details Link icon

    • ArrayRealVector Link icon

      public ArrayRealVector()
      Build a 0-length vector. Zero-length vectors may be used to initialized construction of vectors by data gathering. We start with zero-length and use either the ArrayRealVector(ArrayRealVector, ArrayRealVector) constructor or one of the append method (append(double), append(ArrayRealVector)) to gather data into this vector.
    • ArrayRealVector Link icon

      public ArrayRealVector(int size)
      Construct a vector of zeroes.
      Parameters:
      size - Size of the vector.
    • ArrayRealVector Link icon

      public ArrayRealVector(int size, double preset)
      Construct a vector with preset values.
      Parameters:
      size - Size of the vector
      preset - All entries will be set with this value.
    • ArrayRealVector Link icon

      public ArrayRealVector(double[] d)
      Construct a vector from an array, copying the input array.
      Parameters:
      d - Array.
    • ArrayRealVector Link icon

      public ArrayRealVector(double[] d, boolean copyArray) throws NullArgumentException
      Create a new ArrayRealVector using the input array as the underlying data array. If an array is built specially in order to be embedded in a ArrayRealVector and not used directly, the copyArray may be set to false. This will prevent the copying and improve performance as no new array will be built and no data will be copied.
      Parameters:
      d - Data for the new vector.
      copyArray - if true, the input array will be copied, otherwise it will be referenced.
      Throws:
      NullArgumentException - if d is null.
      See Also:
    • ArrayRealVector Link icon

      public ArrayRealVector(double[] d, int pos, int size) throws MathIllegalArgumentException, NullArgumentException
      Construct a vector from part of a array.
      Parameters:
      d - Array.
      pos - Position of first entry.
      size - Number of entries to copy.
      Throws:
      NullArgumentException - if d is null.
      MathIllegalArgumentException - if the size of d is less than pos + size.
    • ArrayRealVector Link icon

      public ArrayRealVector(Double[] d)
      Construct a vector from an array.
      Parameters:
      d - Array of Doubles.
    • ArrayRealVector Link icon

      public ArrayRealVector(Double[] d, int pos, int size) throws MathIllegalArgumentException, NullArgumentException
      Construct a vector from part of an array.
      Parameters:
      d - Array.
      pos - Position of first entry.
      size - Number of entries to copy.
      Throws:
      NullArgumentException - if d is null.
      MathIllegalArgumentException - if the size of d is less than pos + size.
    • ArrayRealVector Link icon

      public ArrayRealVector(RealVector v) throws NullArgumentException
      Construct a vector from another vector, using a deep copy.
      Parameters:
      v - vector to copy.
      Throws:
      NullArgumentException - if v is null.
    • ArrayRealVector Link icon

      public ArrayRealVector(ArrayRealVector v) throws NullArgumentException
      Construct a vector from another vector, using a deep copy.
      Parameters:
      v - Vector to copy.
      Throws:
      NullArgumentException - if v is null.
    • ArrayRealVector Link icon

      public ArrayRealVector(ArrayRealVector v, boolean deep)
      Construct a vector from another vector.
      Parameters:
      v - Vector to copy.
      deep - If true perform a deep copy, otherwise perform a shallow copy.
    • ArrayRealVector Link icon

      public ArrayRealVector(ArrayRealVector v1, ArrayRealVector v2)
      Construct a vector by appending one vector to another vector.
      Parameters:
      v1 - First vector (will be put in front of the new vector).
      v2 - Second vector (will be put at back of the new vector).
    • ArrayRealVector Link icon

      public ArrayRealVector(ArrayRealVector v1, RealVector v2)
      Construct a vector by appending one vector to another vector.
      Parameters:
      v1 - First vector (will be put in front of the new vector).
      v2 - Second vector (will be put at back of the new vector).
    • ArrayRealVector Link icon

      public ArrayRealVector(RealVector v1, ArrayRealVector v2)
      Construct a vector by appending one vector to another vector.
      Parameters:
      v1 - First vector (will be put in front of the new vector).
      v2 - Second vector (will be put at back of the new vector).
    • ArrayRealVector Link icon

      public ArrayRealVector(ArrayRealVector v1, double[] v2)
      Construct a vector by appending one vector to another vector.
      Parameters:
      v1 - First vector (will be put in front of the new vector).
      v2 - Second vector (will be put at back of the new vector).
    • ArrayRealVector Link icon

      public ArrayRealVector(double[] v1, ArrayRealVector v2)
      Construct a vector by appending one vector to another vector.
      Parameters:
      v1 - First vector (will be put in front of the new vector).
      v2 - Second vector (will be put at back of the new vector).
    • ArrayRealVector Link icon

      public ArrayRealVector(double[] v1, double[] v2)
      Construct a vector by appending one vector to another vector.
      Parameters:
      v1 - first vector (will be put in front of the new vector)
      v2 - second vector (will be put at back of the new vector)
  • Method Details Link icon