public final class JoinedArrayVector extends AJoinedVector
length| 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 a)
Adds another vector to this one
|
void |
add(double value)
Adds a double value to all elements in this array.
|
void |
add(double[] srcData,
int srcOffset)
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 |
add(int offset,
AVector a,
int aOffset,
int length)
Adds a segment of 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.
|
Vector |
addCopy(AVector a)
Adds a vector element-wise to this vector, returning a new vector.
|
void |
addMultiple(AVector a,
double factor)
Adds a scaled multiple of another vector to this vector
|
void |
addMultiple(int offset,
AVector a,
int aOffset,
int length,
double factor) |
void |
addMultipleToArray(double factor,
int offset,
double[] array,
int arrayOffset,
int length)
Adds a multiple of a subvector of this vector into a double array at the specified offset
|
void |
addProduct(AVector a,
AVector b,
double factor)
Adds the element-wise product of two vectors and a constant factor to this vector.
|
void |
addProduct(AVector a,
int aOffset,
AVector b,
int bOffset,
double factor)
Adds the scaled elementwise product of two vectors to this vector
|
void |
addToArray(int offset,
double[] a,
int aOffset,
int length)
Adds a subvector of this vector into a double array at the specified offset
|
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
|
int |
componentCount()
Returns the number of components of this array.
|
static JoinedArrayVector |
create(AVector v) |
void |
divideTo(double[] target,
int offset)
Divides the elements in the target array by corresponding elements in this vector
|
double |
dotProduct(ADenseArrayVector v)
Returns the dot product of this vector with a target ADenseArrayVector.
|
double |
dotProduct(AVector v)
Returns the dot product of this vector with another vector
The vectors must have the same length: if not the result is undefined
|
double |
dotProduct(double[] arr,
int offset)
Fast dot product with a double[] array.
|
double |
elementSum()
Returns the sum of all elements in a vector
|
boolean |
equalsArray(double[] data,
int offset)
Returns true if this vector exactly matches the elements in double[] array, starting
from the specified offset
|
JoinedArrayVector |
exactClone()
Returns an exact clone of this vector, i.e.
|
void |
exp()
Computes the function e^x (in-place) for all array elements
|
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
|
ArraySubVector |
getComponent(int i)
Gets a component from the array at the specified index
Will throw an error if components are not supported, or if the component is out of bounds as defined by 0 <= k |
void |
getElements(double[] destArray,
int offset)
Gets all elements of the array, copying them into a double array at the specified offset
|
boolean |
isFullyMutable()
Returns true if this vector is fully mutable, i.e.
|
boolean |
isView()
Returns true if this vector is of a view type that references other vectors / data.
|
JoinedArrayVector |
join(ADenseArrayVector v) |
JoinedArrayVector |
join(JoinedArrayVector v) |
static AVector |
joinVectors(ADenseArrayVector a,
ADenseArrayVector b) |
static JoinedArrayVector |
joinVectors(JoinedArrayVector a,
JoinedArrayVector b) |
void |
log()
Computes the natural logarithm (in-place) for all array elements
|
void |
logistic()
Computes the logistic function for every element in this vector.
|
void |
multiply(double value)
Multiplies the vector by a constant factor
|
void |
multiplyTo(double[] target,
int offset)
Multiplies the elements in the target array by corresponding elements in this vector
|
void |
negate()
Negates all emlements of this vector in place.
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
int |
numArrays() |
void |
reciprocal()
Replaces all elements in the array with their reciprocal
|
void |
scaleAdd(double factor,
double constant)
Scales this vector and adds a constant to every element
|
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 |
signum()
Calculates the signum of all elements of this mutable array
Sets each component of the array 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 array in place
|
Vector |
subCopy(AVector a)
Subtracts a vector element-wise from this vector, returning a new vector.
|
AVector |
subVector(int start,
int length)
Obtains a sub-vector view that refers to this vector.
|
void |
tanh()
Computes the tanh of every element in this vector.
|
AVector |
tryEfficientJoin(AVector v)
Attempts to perform an efficient join with a second vector.
|
double |
unsafeGet(int i) |
void |
unsafeSet(int i,
double value) |
void |
validate()
Validates the internal data structure of the INDArray.
|
AJoinedVector |
withComponents(INDArray... segments)
Reconstructs a new joined vector of the same type and shape with the given segments.
|
static JoinedArrayVector |
wrap(ADenseArrayVector v) |
applyOp, copyTo, copyTo, copyTo, copyTo, dotProduct, elementSquaredSum, equals, hasUncountable, isMutable, isZero, reduce, reduce, scaleAdd, setElementscheckIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, equalsArray, get, getShape, getShapeClone, isSameShape, length, sliceCountabsCopy, add, add, add, add, addAt, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleCopy, addMultipleToArray, addPower, addPower, addPower, addProduct, addProductCopy, addProductCopy, addProductToArray, addProductToArray, addToArray, addToArray, addWeighted, angle, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, checkDimension, checkSameLength, clampMax, clampMin, clone, compareTo, copy, copyTo, crossProduct, crossProduct, dense, denseClone, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideCopy, divideCopy, dotProduct, elementAbsPowSum, elementIterator, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, fillRange, get, get, get, get, getElements, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isRangeZero, isSameShape, isUnitLengthVector, isUnitLengthVector, iterator, join, join, join, magnitude, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, mutable, negateCopy, nonSparseIndex, nonZeroIndices, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateCopy, rotateView, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, scaleToMagnitude, select, selectClone, selectView, set, set, set, set, set, set, set, set, set, setElements, setElements, setInnerProduct, setInnerProduct, setInnerProduct, setMultiple, setMultiple, setMultiple, setMultiple, shiftCopy, slice, slice, sliceValue, softmax, softmaxCopy, sparse, sparseClone, sqrtCopy, squareCopy, sub, sub, subArray, subAt, subCopy, subMultiple, toDoubleArray, toDoubleBuffer, toList, toNormal, toSliceArray, toString, toStringFull, toVectoradd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, density, ensureMutable, get, get, get, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, isSparse, reciprocalCopy, scale, set, set, signumCopy, sub, sub, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitaddOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, ensureMutable, get, get, get, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, isSparse, reciprocalCopy, scale, set, set, signumCopy, sub, toArrayforEach, spliteratorpublic static final JoinedArrayVector create(AVector v)
public static JoinedArrayVector wrap(ADenseArrayVector v)
public int numArrays()
public ArraySubVector getComponent(int i)
INDArraygetComponent in interface INDArraygetComponent in class AJoinedVectorpublic boolean isView()
AVectorisView in interface INDArrayisView in class AJoinedVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AVectorpublic double get(int i)
INDArraypublic void set(int i,
double value)
INDArraypublic void addAt(int i,
double value)
AVectorpublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AJoinedVectorpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AVectorpublic double dotProduct(AVector v)
AVectordotProduct in class AVectorpublic double dotProduct(ADenseArrayVector v)
AVectordotProduct in class AVectorpublic double dotProduct(double[] arr,
int offset)
AVectordotProduct in class AJoinedVectorpublic void add(AVector a)
AVectorpublic Vector addCopy(AVector a)
IVectorpublic Vector subCopy(AVector a)
IVectorpublic void add(double[] srcData,
int srcOffset)
AVectorpublic void add(int offset,
AVector a)
AVectorpublic void add(int offset,
AVector a,
int aOffset,
int length)
AVectorpublic void addToArray(int offset,
double[] a,
int aOffset,
int length)
AVectoraddToArray in class AVectorpublic void addProduct(AVector a, AVector b, double factor)
AVectoraddProduct in class AVectorpublic void addMultiple(AVector a, double factor)
AVectoraddMultiple in class AVectorpublic void addMultiple(int offset,
AVector a,
int aOffset,
int length,
double factor)
addMultiple in class AVectorpublic void addMultipleToArray(double factor,
int offset,
double[] array,
int arrayOffset,
int length)
AVectoraddMultipleToArray in class AVectorpublic void addProduct(AVector a, int aOffset, AVector b, int bOffset, double factor)
AVectoraddProduct in class AVectorpublic void applyOp(Op op)
INDArraypublic void getElements(double[] destArray,
int offset)
INDArraygetElements in interface INDArraygetElements in class AVectorpublic void multiplyTo(double[] target,
int offset)
AVectormultiplyTo in class AVectoroffset - The offset into the target arraypublic void divideTo(double[] target,
int offset)
AVectorpublic void fill(double value)
AVectorpublic void set(AVector v)
AVectorpublic void multiply(double value)
AVectorpublic void scaleAdd(double factor,
double constant)
AVectorpublic void clamp(double min,
double max)
AVectorpublic void reciprocal()
INDArrayreciprocal in interface INDArrayreciprocal in class AbstractArray<Double>public void add(double value)
INDArraypublic void abs()
INDArraypublic void exp()
INDArrayexp in interface INDArrayexp in class AbstractArray<Double>public void log()
INDArraypublic void signum()
INDArraypublic void square()
INDArraypublic void tanh()
AVectorpublic void logistic()
AVectorpublic void sqrt()
INDArraysqrt in interface INDArraysqrt in class AbstractArray<Double>public void negate()
AVectorpublic JoinedArrayVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorpublic AVector subVector(int start, int length)
AVectorpublic AVector tryEfficientJoin(AVector v)
AVectortryEfficientJoin in class AVectorpublic JoinedArrayVector join(ADenseArrayVector v)
public JoinedArrayVector join(JoinedArrayVector v)
public static JoinedArrayVector joinVectors(JoinedArrayVector a, JoinedArrayVector b)
public static AVector joinVectors(ADenseArrayVector a, ADenseArrayVector b)
public boolean equalsArray(double[] data,
int offset)
AVectorequalsArray in interface INDArrayequalsArray in class AJoinedVectordata - Array of double element values to check for equalityoffset - Offset into the data arraypublic void validate()
INDArraypublic int componentCount()
INDArraycomponentCount in interface INDArraycomponentCount in class AJoinedVectorpublic AJoinedVector withComponents(INDArray... segments)
AJoinedVectorwithComponents in interface INDArraywithComponents in class AJoinedVectorCopyright © 2016. All rights reserved.