Class RCDoubleMatrix1D
- java.lang.Object
-
- cern.colt.PersistentObject
-
- cern.colt.matrix.impl.AbstractMatrix
-
- cern.colt.matrix.impl.AbstractMatrix1D
-
- cern.colt.matrix.DoubleMatrix1D
-
- ubic.basecode.dataStructure.matrix.RCDoubleMatrix1D
-
- All Implemented Interfaces:
Serializable,Cloneable
public class RCDoubleMatrix1D extends cern.colt.matrix.DoubleMatrix1DA row-compressed 1D matrix. The only deviation from the contract of DoubleMatrix1D is in apply(), which only operates on the non-empty (0) elements. This implementation has a highly optimized dot product computer. If you need to compute the dot product of a RCDoubleMatrix1D with another DoubleMatrix1D, call zDotProduct on this, not on the other. This is because getQuick() and setQuick() are not very fast for this.- Author:
- pavlidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RCDoubleMatrix1D(double[] values)RCDoubleMatrix1D(int length)RCDoubleMatrix1D(cern.colt.list.IntArrayList indexes, cern.colt.list.DoubleArrayList values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description cern.colt.matrix.DoubleMatrix1Dassign(double[] v)cern.colt.matrix.DoubleMatrix1Dassign(cern.colt.function.DoubleFunction function)WARNING this only assigns to the non-empty values, for performance reasons.doubleget(int index)doublegetQuick(int index)cern.colt.matrix.DoubleMatrix1Dlike(int s)cern.colt.matrix.DoubleMatrix2Dlike2D(int rows, int columns)voidsetQuick(int column, double value)StringtoString()protected cern.colt.matrix.DoubleMatrix1DviewSelectionLike(int[] offsets)doublezDotProduct(cern.colt.matrix.DoubleMatrix1D y)doublezSum()-
Methods inherited from class cern.colt.matrix.DoubleMatrix1D
aggregate, aggregate, assign, assign, assign, assign, cardinality, cardinality, copy, equals, equals, getContent, getNonZeros, getNonZeros, haveSharedCells, haveSharedCellsRaw, like, set, swap, toArray, toArray, 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, index, setUp, setUp, size, stride, toStringShort, vFlip, vPart, vStrides
-
-
-
-
Constructor Detail
-
RCDoubleMatrix1D
public RCDoubleMatrix1D(double[] values)
- Parameters:
values-
-
RCDoubleMatrix1D
public RCDoubleMatrix1D(int length)
- Parameters:
length-
-
RCDoubleMatrix1D
public RCDoubleMatrix1D(cern.colt.list.IntArrayList indexes, cern.colt.list.DoubleArrayList values)- Parameters:
indexes- These MUST be in sorted order.values- These MuST be in the same order as the indexes, meaning that indexes[0] is the column for values[0].
-
-
Method Detail
-
assign
public cern.colt.matrix.DoubleMatrix1D assign(double[] v)
- Overrides:
assignin classcern.colt.matrix.DoubleMatrix1D
-
assign
public cern.colt.matrix.DoubleMatrix1D assign(cern.colt.function.DoubleFunction function)
WARNING this only assigns to the non-empty values, for performance reasons. If you need to assign to any index, you have to use another way.- Overrides:
assignin classcern.colt.matrix.DoubleMatrix1D- See Also:
DoubleMatrix1D.assign(cern.colt.function.DoubleFunction)
-
get
public double get(int index)
- Overrides:
getin classcern.colt.matrix.DoubleMatrix1D
-
getQuick
public double getQuick(int index)
- Specified by:
getQuickin classcern.colt.matrix.DoubleMatrix1D
-
like
public cern.colt.matrix.DoubleMatrix1D like(int s)
- Specified by:
likein classcern.colt.matrix.DoubleMatrix1D
-
like2D
public cern.colt.matrix.DoubleMatrix2D like2D(int rows, int columns)- Specified by:
like2Din classcern.colt.matrix.DoubleMatrix1D
-
setQuick
public void setQuick(int column, double value)- Specified by:
setQuickin classcern.colt.matrix.DoubleMatrix1D
-
toString
public String toString()
- Overrides:
toStringin classcern.colt.matrix.DoubleMatrix1D
-
zDotProduct
public double zDotProduct(cern.colt.matrix.DoubleMatrix1D y)
- Overrides:
zDotProductin classcern.colt.matrix.DoubleMatrix1D
-
zSum
public double zSum()
- Overrides:
zSumin classcern.colt.matrix.DoubleMatrix1D
-
viewSelectionLike
protected cern.colt.matrix.DoubleMatrix1D viewSelectionLike(int[] offsets)
- Specified by:
viewSelectionLikein classcern.colt.matrix.DoubleMatrix1D
-
-