public final class Vector0 extends APrimitiveVector implements IDense, ISparse
| Modifier and Type | Method and Description |
|---|---|
void |
addToArray(int offset,
double[] array,
int arrayOffset,
int length)
Adds a subvector of this vector into a double array at the specified offset
|
Vector0 |
clone()
Clones the vector, creating a new mutable copy of all data.
|
Vector |
dense()
Coerces this INDArray to a dense format, without changing its element values.
|
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
dotProduct(double[] data,
int offset,
int stride)
Fast dot product with a double[] array and a stride.
|
double |
elementProduct()
Returns the product of all elements in the array.
|
double |
elementSquaredSum()
Returns the sum of squared elements in this array.
|
double |
elementSum()
Returns the sum of all elements in a vector
|
boolean |
equals(AVector v) |
boolean |
equalsArray(double[] data,
int offset)
Returns true if this vector exactly matches the elements in double[] array, starting
from the specified offset
|
Vector0 |
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.
|
Vector0 |
immutable()
Creates an immutable copy of a vector
|
boolean |
isFullyMutable()
Returns true if this vector is fully mutable, i.e.
|
boolean |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isRangeZero(int start,
int length)
Returns true if a sub-vector range is completely zero.
|
boolean |
isZero()
Returns true if this vector is a zero vector (all components zero)
|
AVector |
join(AVector v) |
int |
length()
Returns the length of a vector, in terms of the number of elements.
|
double |
magnitude()
Returns the magnitude (Euclidean length) of the vector
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
int[] |
nonZeroIndices()
Return an int array specifying the positions in this vector which are non-zero
|
static Vector0 |
of() |
static Vector0 |
of(double... values) |
void |
set(int i,
double value)
Sets a value at a given position in a mutable 1D array
|
Vector0 |
subVector(int start,
int length)
Obtains a sub-vector view that refers to this vector.
|
double[] |
toDoubleArray()
Copies the elements of this array to a new double[] array.
|
getT, getX, getY, getZ, isView, sparse, sparseClone, toNormalabs, absCopy, add, add, add, add, add, add, add, add, add, addAt, addAt, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleCopy, addMultipleToArray, addMultipleToArray, addPower, addPower, addPower, addProduct, addProduct, addProduct, addProductCopy, addProductCopy, addProductToArray, addProductToArray, addToArray, addToArray, addWeighted, angle, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, checkDimension, checkIndex, checkLength, checkRange, checkSameLength, checkSameLength, checkSameLength, clamp, clampMax, clampMin, compareTo, copy, copyTo, copyTo, copyTo, copyTo, copyTo, crossProduct, crossProduct, denseClone, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideCopy, divideCopy, divideTo, dotProduct, dotProduct, dotProduct, elementAbsPowSum, elementCount, elementIterator, elementMax, elementMin, elementPowSum, elementsEqual, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equalsArray, fill, fillRange, get, get, get, get, get, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getTranspose, getTransposeCopy, getTransposeView, hasUncountable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isSameShape, isSameShape, isUnitLengthVector, isUnitLengthVector, iterator, join, join, log, logistic, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, multiplyTo, mutable, negate, negateCopy, nonSparseIndex, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateCopy, rotateView, rotateView, scale, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleCopy, scaleToMagnitude, select, selectClone, selectView, set, set, set, set, set, set, set, set, set, set, setElements, setElements, setElements, setInnerProduct, setInnerProduct, setInnerProduct, setMultiple, setMultiple, setMultiple, setMultiple, shiftCopy, signum, slice, slice, sliceCount, sliceValue, softmax, softmaxCopy, sqrtCopy, square, squareCopy, sub, sub, subArray, subAt, subCopy, subCopy, subMultiple, tanh, toDoubleBuffer, toList, toSliceArray, toString, toStringFull, toVector, tryEfficientJoin, unsafeGet, unsafeSet, validateadd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, density, ensureMutable, exp, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, isSparse, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sqrt, sub, sub, toArray, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitaddOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, ensureMutable, exp, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, isSparse, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sqrt, sub, toArray, withComponentsforEach, spliteratorpublic static Vector0 INSTANCE
public static Vector0 of()
public static Vector0 of(double... values)
public int length()
IVectorpublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic double elementProduct()
INDArrayelementProduct in interface INDArrayelementProduct in class AVectorpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AVectorpublic int[] nonZeroIndices()
AVectornonZeroIndices in class AVectorpublic double get(int i)
INDArraypublic void set(int i,
double value)
INDArraypublic void addToArray(int offset,
double[] array,
int arrayOffset,
int length)
AVectoraddToArray in class AVectorpublic Vector0 clone()
AVectorpublic boolean isMutable()
AVectorisMutable in interface INDArrayisMutable in class APrimitiveVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class APrimitiveVectorpublic int hashCode()
AVectorpublic boolean isZero()
AVectorpublic boolean isRangeZero(int start,
int length)
AVectorisRangeZero in class AVectorpublic double elementSquaredSum()
INDArrayelementSquaredSum in interface INDArrayelementSquaredSum in class AVectorpublic double magnitude()
AVectorpublic Vector0 immutable()
AVectorpublic Vector dense()
INDArraypublic double[] toDoubleArray()
INDArraytoDoubleArray in interface INDArraytoDoubleArray in class AVectorpublic boolean equalsArray(double[] data,
int offset)
AVectorequalsArray in interface INDArrayequalsArray in class AVectordata - Array of double element values to check for equalityoffset - Offset into the data arraypublic Vector0 subVector(int start, int length)
AVectorpublic Vector0 exactClone()
AVectorexactClone in interface INDArrayexactClone in class APrimitiveVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorpublic double dotProduct(double[] data,
int offset,
int stride)
AVectordotProduct in class AVectorCopyright © 2016. All rights reserved.