public final class ZeroVector extends AVector implements ISparse
| Constructor and Description |
|---|
ZeroVector(int dimensions) |
| Modifier and Type | Method and Description |
|---|---|
static ZeroVector |
create(int dimensions) |
double |
density()
Computes the density ratio of this sparse array (proportion of non-zero elements)
|
double |
elementSum()
Returns the sum of all elements in a vector
|
ZeroVector |
exactClone()
Returns an exact clone of this vector, i.e.
|
double |
get(int i)
Returns the double value at the specified position in a 1D vector
|
int |
hashCode() |
boolean |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isUnitLengthVector()
Returns true if the vector has unit length
|
boolean |
isZeroVector()
Returns true if this vector is a zero vector (all components zero)
|
int |
length() |
double |
magnitude()
Returns the magnitude (Euclidean length) of the vector
|
double |
magnitudeSquared() |
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
void |
set(int i,
double value) |
abs, add, add, add, add, add, add, addAt, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleToArray, addProduct, addProduct, addProduct, addProductToArray, addProductToArray, addToArray, addToArray, addWeighted, angle, applyOp, applyOp, asElementList, asVector, broadcast, clamp, clampMax, clampMin, clone, compareTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, countZeros, crossProduct, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divideTo, dotProduct, dotProduct, elementCount, elementSquaredSum, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, fill, fillRange, get, getElements, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeView, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isElementConstrained, isFullyMutable, isView, iterator, join, log, maxAbsElement, multiply, multiply, multiply, multiply, multiplyTo, negate, normalise, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reshape, scale, scaleAdd, scaleAdd, scaleToMagnitude, set, set, set, set, set, set, set, set, set, setElements, setElements, setValues, signum, slice, slice, sliceCount, square, sub, sub, sub, subMultiple, subVector, toArray, toDoubleBuffer, toList, toString, toVector, validateepsilonEquals, epsilonEquals, exp, get, get, getSliceViews, reciprocal, scale, set, set, sqrtfinalize, getClass, notify, notifyAll, wait, wait, waitepsilonEquals, epsilonEquals, exp, get, get, getSliceViews, reciprocal, scale, set, set, sqrtpublic static ZeroVector create(int dimensions)
public int length()
public double get(int i)
INDArraypublic void set(int i,
double value)
public double magnitudeSquared()
magnitudeSquared in class AVectorpublic double magnitude()
AVectorpublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AVectorpublic boolean isZeroVector()
AVectorisZeroVector in class AVectorpublic boolean isMutable()
AVectorpublic boolean isUnitLengthVector()
AVectorisUnitLengthVector in class AVectorpublic ZeroVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorCopyright © 2013. All Rights Reserved.