Class DenseVector

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<VectorEntry>, Vector

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

      • DenseVector

        public DenseVector​(MatrixVectorReader r)
                    throws java.io.IOException
        Constructor for DenseVector
        Parameters:
        r - Reader to get vector from
        Throws:
        java.io.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