Class DenseDoubleMatrix1D

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class DenseDoubleMatrix1D
    extends cern.colt.matrix.impl.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:
    Serialized Form
    • Field Summary

      • Fields inherited from class cern.colt.matrix.impl.DenseDoubleMatrix1D

        elements
      • Fields inherited from class cern.colt.matrix.impl.AbstractMatrix1D

        size, stride, zero
      • Fields inherited from class cern.colt.matrix.impl.AbstractMatrix

        isNoView
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getQuick​(int i)
      This is an optimized version of getQuick.
      double[] toArray()
      WARNING unlike the superclass, this returns the actual underlying array, not a copy.
      • Methods inherited from class cern.colt.matrix.impl.DenseDoubleMatrix1D

        assign, assign, assign, assign, assign, cardinality, haveSharedCellsRaw, index, like, like2D, setQuick, swap, toArray, viewSelectionLike, zDotProduct, zSum
      • Methods inherited from class cern.colt.matrix.DoubleMatrix1D

        aggregate, aggregate, assign, cardinality, copy, equals, equals, get, getContent, getNonZeros, getNonZeros, haveSharedCells, like, set, toString, view, viewFlip, viewPart, viewSelection, viewSelection, viewSorted, viewStrides, zDotProduct, zDotProduct, zDotProduct
      • Methods inherited from class cern.colt.matrix.impl.AbstractMatrix1D

        _offset, _rank, checkIndex, checkIndexes, checkRange, checkSize, checkSize, setUp, setUp, size, stride, toStringShort, vFlip, vPart, vStrides
      • Methods inherited from class cern.colt.matrix.impl.AbstractMatrix

        ensureCapacity, isView, trimToSize
      • Methods inherited from class cern.colt.PersistentObject

        clone
    • Constructor Detail

      • 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 Detail

      • 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 cern.colt.matrix.impl.DenseDoubleMatrix1D
        See Also:
        DoubleMatrix1D.getQuick(int)
      • toArray

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