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
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
-
-
Constructor Summary
Constructors Modifier Constructor Description DenseDoubleMatrix1D(double[] values)
DenseDoubleMatrix1D(int size)
protected
DenseDoubleMatrix1D(int size, double[] elements, int zero, int stride)
-
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
-
-
-
-
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 classcern.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 classcern.colt.matrix.DoubleMatrix1D
- Returns:
- the elements
- See Also:
DoubleMatrix1D.toArray()
-
-