public final class ZeroVector extends AComputedVector 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 |
dotProduct(AVector v) |
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
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()
Computes the hashcode of a vector.
|
ZeroVector |
innerProduct(AMatrix m) |
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isUnitLengthVector()
Returns true if the vector has unit length
|
boolean |
isZero()
Returns true if this vector is a zero vector (all components zero)
|
AVector |
join(AVector a)
Returns a new vector that refers to this vector joined to a second vector
|
ZeroVector |
join(ZeroVector a) |
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) |
double |
unsafeGet(int i) |
void |
unsafeSet(int i,
double value) |
isElementConstrained, isFullyMutableabs, 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, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, clamp, clampMax, clampMin, clone, compareTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, crossProduct, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideTo, dotProduct, dotProduct, elementCount, elementIterator, elementSquaredSum, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, equalsArray, fill, fillRange, get, get, get, getElements, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, immutable, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isSameShape, isSameShape, isView, iterator, log, logistic, maxAbsElement, multiply, multiply, multiply, multiply, multiplyTo, mutable, negate, normalise, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reshape, scale, scaleAdd, scaleAdd, scaleToMagnitude, set, set, set, set, set, set, set, set, set, setElements, setElements, setRange, setValues, signum, slice, slice, sliceCount, square, sub, sub, sub, subMultiple, subVector, tanh, toDoubleArray, toDoubleBuffer, toList, toNormal, toString, toVector, validate, zeroCountbroadcastCloneLike, ensureMutable, exp, get, getSliceViews, reciprocal, scale, set, set, sqrt, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitbroadcastCloneLike, ensureMutable, exp, get, getSliceViews, reciprocal, scale, set, set, sqrt, toArraypublic static ZeroVector create(int dimensions)
public int length()
length in interface IVectorlength in class AComputedVectorpublic double dotProduct(AVector v)
dotProduct in class AVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorpublic ZeroVector innerProduct(AMatrix m)
innerProduct in class AVectorpublic 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 isZero()
AVectorpublic boolean isBoolean()
INDArrayisBoolean in interface INDArrayisBoolean in class AbstractArray<Double>public boolean isMutable()
AVectorisMutable in interface INDArrayisMutable in class AComputedVectorpublic boolean isUnitLengthVector()
AVectorisUnitLengthVector in class AVectorpublic int hashCode()
AVectorpublic ZeroVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AComputedVectorpublic double density()
ISparsepublic AVector join(AVector a)
AVectorpublic ZeroVector join(ZeroVector a)
Copyright © 2013. All Rights Reserved.