Class DenseDoubleMatrix1D
java.lang.Object
cern.colt.PersistentObject
cern.colt.matrix.impl.AbstractMatrix
cern.colt.matrix.impl.AbstractMatrix1D
cern.colt.matrix.DoubleMatrix1D
cern.colt.matrix.impl.DenseDoubleMatrix1D
ubic.basecode.dataStructure.matrix.DenseDoubleMatrix1D
- All Implemented Interfaces:
Serializable,Cloneable
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:
-
Field Summary
Fields inherited from class cern.colt.matrix.impl.DenseDoubleMatrix1D
elementsFields inherited from class cern.colt.matrix.impl.AbstractMatrix1D
size, stride, zeroFields inherited from class cern.colt.matrix.impl.AbstractMatrix
isNoView -
Constructor Summary
ConstructorsModifierConstructorDescriptionDenseDoubleMatrix1D(double[] values) DenseDoubleMatrix1D(int size) protectedDenseDoubleMatrix1D(int size, double[] elements, int zero, int stride) -
Method Summary
Methods inherited from class cern.colt.matrix.impl.DenseDoubleMatrix1D
assign, assign, assign, assign, assign, cardinality, haveSharedCellsRaw, index, like, like2D, setQuick, swap, toArray, viewSelectionLike, zDotProduct, zSumMethods 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, zDotProductMethods inherited from class cern.colt.matrix.impl.AbstractMatrix1D
_offset, _rank, checkIndex, checkIndexes, checkRange, checkSize, checkSize, setUp, setUp, size, stride, toStringShort, vFlip, vPart, vStridesMethods inherited from class cern.colt.matrix.impl.AbstractMatrix
ensureCapacity, isView, trimToSizeMethods inherited from class cern.colt.PersistentObject
clone
-
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:
getQuickin classDenseDoubleMatrix1D- See Also:
-
toArray
public double[] toArray()WARNING unlike the superclass, this returns the actual underlying array, not a copy.- Overrides:
toArrayin classDoubleMatrix1D- Returns:
- the elements
- See Also:
-