public final class ArraySubVector extends ADenseArrayVector
datalength| Constructor and Description |
|---|
ArraySubVector(ADenseArrayVector source,
int offset,
int length)
Constructs a vector directly referencing a sub-vector of an existing
array-based Vector
|
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Replaces all elements of this array with their absolute values, according to Math.abs(double)
|
void |
add(AVector v)
Adds another vector to this one
|
void |
addAt(int i,
double v)
Adds a value to a specific element of the vector
This function does not perform bounds checking, i.e.
|
void |
addMultiple(AVector v,
double factor)
Adds a scaled multiple of another vector to this vector
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
ArraySubVector |
exactClone()
Returns an exact clone of this vector, i.e.
|
void |
fill(double value)
Fills the entire vector with a given value
|
double |
get(int i)
Returns the double value at the specified position in a 1D vector
|
int |
getArrayOffset()
Gets the offset into the underlying double[] data array for the first element of this vector
|
int |
hashCode()
Vector hashcode, designed to match hashcode of Java double array
|
protected int |
index(int i)
Computes an index into the underlying array for a given vector index
|
boolean |
isView()
Returns true if this vector is of a view type that references other vectors / data.
|
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
|
AVector |
subVector(int start,
int length)
Obtains a sub-vector view that refers to this vector.
|
double |
unsafeGet(int i) |
void |
unsafeSet(int i,
double value) |
static ArraySubVector |
wrap(double[] values) |
static ArraySubVector |
wrap(double[] data,
int offset,
int length) |
add, add, add, add, add, add, add, addMultiple, addMultiple, addMultipleToArray, addMultipleToArray, addProduct, addProduct, addProduct, addProductToArray, addProductToArray, addToArray, addToArray, applyOp, clamp, copyTo, copyTo, copyTo, copyTo, dense, divide, divide, divideTo, dotProduct, dotProduct, dotProduct, elementAbsPowSum, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, elementSquaredSum, elementSum, equals, equals, equalsArray, equalsArray, exp, fillRange, getElements, getStride, isPackedArray, isRangeZero, isZero, join, join, join, log, magnitude, maxAbsElement, maxAbsElementIndex, maxElementIndex, minElementIndex, multiply, multiply, multiply, multiplyTo, nonZeroCount, nonZeroIndices, pow, reciprocal, reduce, reduce, scaleAdd, scaleAdd, selectView, set, set, setElements, signum, slice, sqrt, square, squareCopy, toDoubleArray, toDoubleBuffer, tryEfficientJoin, validateadd, applyOpCopy, asDoubleArray, broadcast, broadcastLike, clone, ensureMutable, getArray, getElements, getStride, getStrides, hasUncountable, iteratorcheckIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, get, getShape, getShapeClone, isSameShape, length, sliceCountabsCopy, add, add, add, addAt, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleCopy, addPower, addPower, addPower, addProductCopy, addProductCopy, addToArray, addWeighted, angle, applyOp, applyOp, applyOp, asElementList, asVector, broadcastLike, broadcastLike, checkDimension, checkSameLength, clampMax, clampMin, compareTo, copy, copyTo, copyTo, crossProduct, crossProduct, denseClone, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divideCopy, divideCopy, dotProduct, dotProduct, elementIterator, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, get, get, get, get, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isFullyMutable, isMutable, isSameShape, isUnitLengthVector, isUnitLengthVector, join, join, logistic, magnitudeSquared, maxElement, minElement, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonSparseIndex, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, projectToPlane, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateCopy, rotateView, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, scaleToMagnitude, select, selectClone, set, set, set, set, set, set, set, set, setElements, setInnerProduct, setInnerProduct, setInnerProduct, setMultiple, setMultiple, setMultiple, setMultiple, shiftCopy, slice, sliceValue, softmax, softmaxCopy, sparse, sparseClone, sqrtCopy, sub, sub, subArray, subAt, subCopy, subCopy, subMultiple, tanh, toList, toNormal, toSliceArray, toString, toStringFull, toVectoradd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, density, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, isSparse, reciprocalCopy, scale, set, set, signumCopy, sub, sub, toArray, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitgetArrayabsCopy, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, addToArray, applyOp, applyOp, applyOp, asElementList, asVector, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkMutable, componentCount, copy, denseClone, dimensionality, divide, divide, divideCopy, elementCount, elementIterator, epsilonEquals, epsilonEquals, 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, isFullyMutable, isMutable, isSameShape, isSparse, join, join, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, outerProduct, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleCopy, set, set, set, set, set, set, setElements, setInnerProduct, setMultiple, setMultiple, signumCopy, slice, sliceCount, sliceValue, sparse, sparseClone, sub, sub, subArray, subCopy, toArray, toSliceArray, toVector, withComponentsforEach, spliteratorpublic ArraySubVector(ADenseArrayVector source, int offset, int length)
source - offset - length - public static ArraySubVector wrap(double[] values)
public static ArraySubVector wrap(double[] data, int offset, int length)
public double get(int i)
INDArraypublic void set(int i,
double value)
INDArraypublic void fill(double value)
AVectorfill in interface INDArrayfill in class ADenseArrayVectorpublic double unsafeGet(int i)
unsafeGet in class ADenseArrayVectorpublic void unsafeSet(int i,
double value)
unsafeSet in class ADenseArrayVectorpublic void add(AVector v)
AVectoradd in class ADenseArrayVectorpublic void addMultiple(AVector v, double factor)
AVectoraddMultiple in class ADenseArrayVectorpublic void addAt(int i,
double v)
AVectoraddAt in class ADenseArrayVectorpublic void applyOp(Op op)
INDArrayapplyOp in interface INDArrayapplyOp in class AStridedVectorpublic void abs()
INDArraypublic int hashCode()
public int getArrayOffset()
AStridedVectorgetArrayOffset in interface IDenseArraygetArrayOffset in interface IStridedArraygetArrayOffset in class AStridedVectorpublic boolean isView()
AVectorisView in interface INDArrayisView in class ADenseArrayVectorpublic AVector subVector(int start, int length)
AVectorsubVector in class ADenseArrayVectorpublic 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 ArraySubVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorprotected int index(int i)
AArrayVectorindex in class AArrayVectorCopyright © 2016. All rights reserved.