public final class StridedVector extends BaseStridedVector
offset, stridedatalength| Modifier and Type | Method and Description |
|---|---|
void |
add(AVector v)
Adds another vector to this one
|
void |
add(double[] data,
int offset)
Adds to this vector from a given double array.
|
void |
add(int offset,
AVector a)
Adds another vector into this one, at the specified offset
|
void |
addAt(int i,
double value)
Adds a value to a specific element of the vector
This function does not perform bounds checking, i.e.
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
void |
clamp(double min,
double max)
Clamps all values in the vector to a given range
|
StridedVector |
exactClone()
Returns an exact clone of this vector, i.e.
|
void |
fill(double value)
Fills the entire vector with a given value
|
boolean |
isFullyMutable()
Returns true if this vector is fully mutable, i.e.
|
boolean |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isView()
Returns true if this vector is of a view type that references other vectors / data.
|
void |
multiply(double factor)
Multiplies the vector by a constant factor
|
void |
set(AVector v)
Sets the vector to equal the value of another vector
|
void |
set(int i,
double value)
Sets a value at a given position in a mutable 1D array
|
void |
setElements(double[] src,
int srcOffset)
Sets all elements in an array using the given double values
|
void |
setElements(int pos,
double[] src,
int srcOffset,
int length)
Sets elements in an array using the given double values.
|
AVector |
subVector(int start,
int length)
Obtains a sub-vector view that refers to this vector.
|
void |
unsafeSet(int i,
double value) |
static StridedVector |
wrap(double[] data,
int offset,
int length,
int stride)
Wraps a StridedVector around a strided range of a double[] array.
|
dotProduct, dotProduct, dotProduct, get, getArrayOffset, getStride, index, unsafeGetadd, addMultipleToArray, addToArray, addToArray, applyOpCopy, asDoubleArray, broadcast, broadcastLike, clone, copyTo, elementMax, elementMin, elementProduct, elementSquaredSum, elementSum, ensureMutable, equalsArray, getArray, getElements, getElements, getStride, getStrides, hasUncountable, isPackedArray, isRangeZero, iterator, reduce, reduce, selectView, validateslicecheckIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, equalsArray, get, getShape, getShapeClone, isSameShape, length, sliceCountabs, absCopy, add, add, add, add, add, addAt, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleCopy, addMultipleToArray, addPower, addPower, addPower, addProduct, addProduct, addProduct, addProductCopy, addProductCopy, addProductToArray, addProductToArray, addToArray, addWeighted, angle, applyOp, applyOp, applyOp, applyOp, asElementList, asVector, broadcastLike, broadcastLike, checkDimension, checkSameLength, clampMax, clampMin, compareTo, copy, copyTo, copyTo, copyTo, copyTo, crossProduct, crossProduct, dense, denseClone, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideCopy, divideCopy, divideTo, dotProduct, dotProduct, elementAbsPowSum, elementIterator, elementPowSum, elementsEqual, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, fillRange, get, get, get, get, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isSameShape, isUnitLengthVector, isUnitLengthVector, isZero, join, join, join, log, logistic, magnitude, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, multiplyTo, mutable, negate, negateCopy, nonSparseIndex, nonZeroCount, nonZeroIndices, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateCopy, rotateView, rotateView, scale, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleCopy, scaleToMagnitude, select, selectClone, set, set, set, set, set, set, set, set, set, setElements, setInnerProduct, setInnerProduct, setInnerProduct, setMultiple, setMultiple, setMultiple, setMultiple, shiftCopy, signum, slice, sliceValue, softmax, softmaxCopy, sparse, sparseClone, sqrtCopy, square, squareCopy, sub, sub, subArray, subAt, subCopy, subCopy, subMultiple, tanh, toDoubleArray, toDoubleBuffer, toList, toNormal, toSliceArray, toString, toStringFull, toVector, tryEfficientJoinadd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, density, 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, waitabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOp, asElementList, asVector, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkMutable, componentCount, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, elementAbsPowSum, elementCount, elementIterator, elementPowSum, elementsEqual, epsilonEquals, epsilonEquals, equals, equalsArray, exp, get, get, get, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, immutable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isDense, isElementConstrained, isSameShape, isSparse, isZero, join, join, log, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonZeroCount, outerProduct, pow, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, set, setElements, setInnerProduct, setMultiple, setMultiple, signum, signumCopy, slice, slice, sliceCount, sliceValue, sparse, sparseClone, sqrt, square, squareCopy, sub, sub, subArray, subCopy, toArray, toDoubleArray, toDoubleBuffer, toSliceArray, toVector, withComponentsforEach, spliteratorpublic static StridedVector wrap(double[] data, int offset, int length, int stride)
data - offset - length - stride - public void set(int i,
double value)
INDArraypublic void addAt(int i,
double value)
AVectoraddAt in class AStridedVectorpublic void add(double[] data,
int offset)
AVectorpublic void add(AVector v)
AVectorpublic void add(int offset,
AVector a)
AVectorpublic void applyOp(Op op)
INDArrayapplyOp in interface INDArrayapplyOp in class AStridedVectorpublic void set(AVector v)
AVectorset in class AStridedVectorpublic void clamp(double min,
double max)
AVectorpublic void fill(double value)
AVectorpublic void multiply(double factor)
AVectorpublic void setElements(double[] src,
int srcOffset)
INDArraysetElements in interface INDArraysetElements in class AStridedVectorsrc - Element values in a double[] array. There must be at least as many element values as elements in this array.srcOffset - Position in the values array from which to start taking values.public void setElements(int pos,
double[] src,
int srcOffset,
int length)
INDArraysetElements in interface INDArraysetElements in class AStridedVectorpos - Offset into this array, expressed in terms of number of elements in row major ordersrc - Element values in a double[] array. There must be at least as many element values as elements in this array.srcOffset - Position in the values array from which to start taking values.length - Number of elements to set.public boolean isView()
AVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AVectorpublic boolean isMutable()
AVectorpublic AVector subVector(int start, int length)
AVectorpublic StridedVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorCopyright © 2016. All rights reserved.