public class AxisVector extends ComputedVector implements ISparse
| Constructor and Description |
|---|
AxisVector(int axisIndex,
int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Sets each component of the vector to its absolute value
|
static AxisVector |
create(int axisIndex,
int dimensions) |
double |
density()
Computes the density ratio of this sparse array (proportion of non-zero elements)
|
double |
dotProduct(AVector v) |
double |
dotProduct(Vector2 v) |
double |
dotProduct(Vector3 v) |
double |
elementSum()
Returns the sum of all elements in a vector
|
AxisVector |
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 |
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.
|
double |
normalise()
Normalises this vector to a magnitude of 1.0
Has no effect on a zero-length vector (i.e.
|
void |
signum()
Sets each component of the vector to its sign value (-1, 0 or 1)
|
void |
sqrt()
Computes the square root of all elements in the array
|
void |
square()
Squares all elements of the vector
|
void |
validate()
Validates the internal data structure of the INDArray.
|
setadd, 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, elementCount, elementSquaredSum, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, fill, fillRange, get, getElements, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeView, hashCode, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isElementConstrained, isFullyMutable, isView, iterator, join, log, maxAbsElement, multiply, multiply, multiply, multiply, multiplyTo, negate, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reshape, scale, scaleAdd, scaleAdd, scaleToMagnitude, set, set, set, set, set, set, set, set, set, setElements, setElements, setValues, slice, slice, sliceCount, sub, sub, sub, subMultiple, subVector, toArray, toDoubleBuffer, toList, toString, toVectorepsilonEquals, epsilonEquals, exp, get, get, getSliceViews, reciprocal, scale, set, setfinalize, getClass, notify, notifyAll, wait, wait, waitepsilonEquals, epsilonEquals, exp, get, get, getSliceViews, reciprocal, scale, set, setpublic static AxisVector create(int axisIndex, int dimensions)
public int length()
length in interface IVectorlength in class ComputedVectorpublic double magnitude()
AVectorpublic double magnitudeSquared()
magnitudeSquared in class AVectorpublic double normalise()
AVectorpublic void square()
AVectorpublic void abs()
AVectorpublic void sqrt()
INDArraysqrt in interface INDArraysqrt in class AbstractArray<Double>public void signum()
AVectorpublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AVectorpublic boolean isMutable()
AVectorisMutable in interface INDArrayisMutable in class ComputedVectorpublic boolean isZeroVector()
AVectorisZeroVector in class AVectorpublic boolean isUnitLengthVector()
AVectorisUnitLengthVector in class AVectorpublic double dotProduct(AVector v)
dotProduct in class AVectorpublic double dotProduct(Vector3 v)
public double dotProduct(Vector2 v)
public double get(int i)
INDArraypublic AxisVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class ComputedVectorpublic double density()
ISparsepublic void validate()
INDArrayCopyright © 2013. All Rights Reserved.