public final class SingleElementVector extends AVector 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
|
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) |
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() |
double |
normalise() |
void |
scale(double factor)
Scales the vector by a scalar factor
|
void |
set(int i,
double value) |
void |
square() |
abs, add, add, add, add, add, add, addAt, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleToArray, addProduct, addProduct, addProduct, addProductToArray, addProductToArray, addToArray, addWeighted, angle, applyOp, applyOp, asList, asVector, broadcast, clamp, clampMax, clampMin, clone, compareTo, copyTo, copyTo, copyTo, copyTo, copyTo, countZeros, crossProduct, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divideTo, dotProduct, dotProduct, elementCount, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, fill, fillRange, get, getShape, getSlices, hashCode, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isElementConstrained, isMutable, isUnitLengthVector, isView, isZeroVector, iterator, join, maxAbsElement, multiply, multiply, multiply, multiplyTo, negate, normaliseMaxAbsElement, outerProduct, outerProduct, projectToPlane, reshape, scale, scaleAdd, scaleAdd, scaleToMagnitude, set, set, set, set, set, set, set, set, set, signum, slice, sliceCount, sub, sub, sub, subMultiple, subVector, toArray, toList, toStringget, get, set, setpublic SingleElementVector(int componentIndex,
int dimensions)
public SingleElementVector(int componentIndex,
int dimensions,
double value)
public int length()
public double magnitude()
AVectorpublic double elementSum()
AVectorelementSum in class AVectorpublic double magnitudeSquared()
magnitudeSquared in class AVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AVectorpublic void scale(double factor)
AVectorpublic double density()
ISparsepublic double get(int i)
public void set(int i,
double value)
public SingleElementVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorCopyright © 2013. All Rights Reserved.