public final class SingleElementVector extends AConstrainedVector implements ISparse
| Constructor and Description |
|---|
SingleElementVector(int componentIndex,
int dimensions) |
SingleElementVector(int componentIndex,
int dimensions,
double value) |
| Modifier and Type | Method and Description |
|---|---|
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
|
SingleElementVector |
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
|
boolean |
isElementConstrained()
Returns true if this array has some constraints on element values
|
boolean |
isFullyMutable()
Returns true if this vector is fully mutable, i.e.
|
int |
length() |
double |
magnitude()
Returns the magnitude (Euclidean length) of the vector
|
double |
magnitudeSquared() |
void |
multiply(double factor)
Multiplies the vector by a constant factor
|
double |
normalise()
Normalises this vector to a magnitude of 1.0
Has no effect on a zero-length vector (i.e.
|
void |
set(int i,
double value) |
void |
square()
Squares all elements of the vector
|
double |
unsafeGet(int i) |
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, 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, 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, hashCode, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isMutable, isSameShape, isSameShape, isUnitLengthVector, isView, isZero, iterator, join, log, logistic, maxAbsElement, multiply, multiply, multiply, multiplyTo, mutable, negate, nonZeroCount, 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, sub, sub, sub, subMultiple, subVector, tanh, toDoubleArray, toDoubleBuffer, toList, toNormal, toString, toVector, unsafeSet, validate, zeroCountbroadcastCloneLike, ensureMutable, exp, get, getSliceViews, isBoolean, reciprocal, scale, set, set, sqrt, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitbroadcastCloneLike, ensureMutable, exp, get, getSliceViews, isBoolean, reciprocal, scale, set, set, sqrt, toArraypublic SingleElementVector(int componentIndex,
int dimensions)
public SingleElementVector(int componentIndex,
int dimensions,
double value)
public int length()
public double magnitude()
AVectorpublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic double magnitudeSquared()
magnitudeSquared in class AVectorpublic void square()
AVectorpublic double normalise()
AVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AConstrainedVectorpublic boolean isElementConstrained()
INDArrayisElementConstrained in interface INDArrayisElementConstrained in class AConstrainedVectorpublic void multiply(double factor)
AVectorpublic double density()
ISparsepublic double get(int i)
INDArraypublic void set(int i,
double value)
public SingleElementVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorCopyright © 2013. All Rights Reserved.