Class DenseDoubleMatrix1D

All Implemented Interfaces:
Serializable, Cloneable

public class DenseDoubleMatrix1D extends DenseDoubleMatrix1D
Use this class when fast iteration over the matrix is of primary interest. The primary change is that getQuick is faster, and toArray returns the actual elements, not a copy.
Author:
pavlidis
See Also:
  • Constructor Details

    • DenseDoubleMatrix1D

      public DenseDoubleMatrix1D(double[] values)
      Parameters:
      values -
    • DenseDoubleMatrix1D

      public DenseDoubleMatrix1D(int size)
      Parameters:
      size -
    • DenseDoubleMatrix1D

      protected DenseDoubleMatrix1D(int size, double[] elements, int zero, int stride)
      Parameters:
      size -
      elements -
      zero -
      stride -
  • Method Details

    • getQuick

      public double getQuick(int i)
      This is an optimized version of getQuick. Implementation note: the superclass uses an add and a multiply. This is faster, but there might be unforseen consequences...
      Overrides:
      getQuick in class DenseDoubleMatrix1D
      See Also:
    • toArray

      public double[] toArray()
      WARNING unlike the superclass, this returns the actual underlying array, not a copy.
      Overrides:
      toArray in class DoubleMatrix1D
      Returns:
      the elements
      See Also: