Class DenseVector

java.lang.Object
no.uib.cipr.matrix.AbstractVector
no.uib.cipr.matrix.DenseVector
All Implemented Interfaces:
Serializable, Iterable<VectorEntry>, Vector

public class DenseVector extends AbstractVector implements Serializable
Dense vector. Stored by a double[] array of the same length as the vector itself.
See Also:
  • Constructor Details

    • DenseVector

      public DenseVector(MatrixVectorReader r) throws IOException
      Constructor for DenseVector
      Parameters:
      r - Reader to get vector from
      Throws:
      IOException
    • DenseVector

      public DenseVector(int size)
      Constructor for DenseVector
      Parameters:
      size - Size of the vector
    • DenseVector

      public DenseVector(Vector x)
      Constructor for DenseVector
      Parameters:
      x - Copies contents from this vector. A deep copy is made
    • DenseVector

      public DenseVector(Vector x, boolean deep)
      Constructor for DenseVector
      Parameters:
      x - Copies contents from this vector
      deep - True for a deep copy. For a shallow copy, x must be a DenseVector
    • DenseVector

      public DenseVector(double[] x, boolean deep)
      Constructor for DenseVector
      Parameters:
      x - Copies contents from this array
      deep - True for a deep copy. For a shallow copy, x is aliased with the internal storage
    • DenseVector

      public DenseVector(double[] x)
      Constructor for DenseVector
      Parameters:
      x - Copies contents from this array in a deep copy
  • Method Details