public class ScaledSparseDoubleVector extends ScaledDoubleVector implements SparseDoubleVector
SparseDoubleVector
s that scales every value in a
given DoubleVector
by some non zero scale.
Note that this automatically computes the scaling of a ScaledDoubleVector
so that backing vector is scaled only once, thus
preventing any recursive calls to scaling.Constructor and Description |
---|
ScaledSparseDoubleVector(SparseDoubleVector vector,
double scale)
Creates a new
ScaledSparseDoubleVector that decorates a given
SparseDoubleVector by scaling each value in vector by
scale . |
Modifier and Type | Method and Description |
---|---|
int[] |
getNonZeroIndices()
Returns all the indices whose values are non-zero
|
add, get, getBackingVector, getScalar, getValue, length, magnitude, set, set, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ScaledSparseDoubleVector(SparseDoubleVector vector, double scale)
ScaledSparseDoubleVector
that decorates a given
SparseDoubleVector
by scaling each value in vector
by
scale
.public int[] getNonZeroIndices()
getNonZeroIndices
in interface SparseVector<Double>
Copyright © 2012. All Rights Reserved.