public abstract class AArrayVector extends AStridedVector
| Constructor and Description |
|---|
AArrayVector() |
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Sets each component of the vector to its absolute value
|
void |
add(AArrayVector v) |
void |
add(AArrayVector src,
int srcOffset) |
void |
add(AVector src)
Adds another vector to this one
|
void |
add(AVector src,
int srcOffset)
Adds part another vector to this one, starting at the specified offset in the source vector
|
void |
add(double constant)
Adds a double value to all elements in this array
|
void |
add(int offset,
AArrayVector src) |
void |
add(int offset,
AArrayVector src,
int srcOffset,
int length) |
void |
add(int offset,
AVector src)
Adds another vector into this one, at the specified offset
|
void |
addAt(int i,
double v)
Adds a value to a specific element of the vector
This function does not perform bounds checking
|
void |
addMultiple(AArrayVector v,
double factor) |
void |
addMultiple(AVector v,
double factor)
Adds a scaled multiple of another vector to this one
|
void |
addMultipleToArray(double factor,
int offset,
double[] array,
int arrayOffset,
int length) |
void |
addProduct(AVector a,
AVector b,
double factor) |
void |
addProduct(AVector a,
int aOffset,
AVector b,
int bOffset,
double factor) |
void |
addProductToArray(double factor,
int offset,
AArrayVector other,
int otherOffset,
double[] array,
int arrayOffset,
int length) |
void |
addProductToArray(double factor,
int offset,
AVector other,
int otherOffset,
double[] array,
int arrayOffset,
int length) |
void |
addToArray(int offset,
double[] array,
int arrayOffset,
int length) |
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
|
void |
copyTo(double[] data,
int offset)
Copies a the contents of a vector to a double array at the specified offset
|
void |
copyTo(int offset,
AArrayVector dest,
int destOffset,
int length) |
void |
copyTo(int start,
AVector dest,
int destOffset,
int length)
Copies a subset of this vector to a vector at the specified offset
|
void |
copyTo(int offset,
double[] dest,
int destOffset,
int length) |
void |
divide(AVector v) |
void |
divide(double[] data,
int offset) |
void |
divideTo(double[] data,
int offset) |
double |
dotProduct(AVector v) |
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
elementSum()
Returns the sum of all elements in a vector
|
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
|
void |
fillRange(int offset,
int length,
double value) |
abstract double |
get(int i)
Returns the double value at the specified position in a 1D vector
|
void |
getElements(double[] dest,
int offset)
Gets all elements of the array, copying them into a double array
|
int |
getStride()
AArrayVector has a fixed stride of 1, which enables efficient operations on arrays
|
boolean |
isPackedArray() |
boolean |
isView()
Returns true if this vector is of a view type that references other vectors / data.
|
AVector |
join(AArrayVector v) |
AVector |
join(AVector v)
Returns a new vector that refers to this vector joined to a second vector
|
JoinedArrayVector |
join(JoinedArrayVector v) |
void |
log()
Computes the natural logarithm (in-place) for all array elements
|
double |
magnitude()
Returns the magnitude (Euclidean length) of the vector
|
double |
magnitudeSquared() |
void |
multiply(AVector v) |
void |
multiply(double factor)
Multiplies the vector by a constant factor
|
void |
multiply(double[] data,
int offset) |
void |
multiplyTo(double[] data,
int offset) |
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
void |
pow(double exponent)
Raises all elements of the array to a specified power
|
void |
reciprocal()
Replaces all elements in the array with their reciprocal
|
void |
scaleAdd(double factor,
double constant)
Scales all elements of the array by a given double value and adds a constant vale
|
void |
set(AVector a)
Sets the vector to equal the value of another vector
|
void |
set(AVector a,
int offset)
Set the vector equal to an offset into another vector
|
abstract void |
set(int i,
double value) |
void |
setElements(double[] values,
int offset,
int length)
Sets all elements in an array using the given double values
|
void |
setRange(int offset,
double[] data,
int dataOffset,
int length)
Set a subrange of this vector from a double array
|
void |
signum()
Sets each component of the vector to its sign value (-1, 0 or 1)
|
AScalar |
slice(int position)
Returns the specified major slice of this array as a view (slice along dimension 0)
|
void |
sqrt()
Computes the square root of all elements in the array
|
void |
square()
Squares all elements of the vector
|
ArraySubVector |
subVector(int offset,
int length)
Returns a vector referencing a sub-vector of the current vector
|
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
abstract double |
unsafeGet(int i) |
abstract void |
unsafeSet(int i,
double value) |
void |
validate()
Validates the internal data structure of the INDArray.
|
add, asDoubleArray, broadcast, broadcastLike, broadcastLike, clone, ensureMutable, getArray, getArrayOffset, getStride, getStridesadd, add, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addProduct, addToArray, addWeighted, angle, applyOp, asElementList, asVector, clampMax, clampMin, compareTo, copyTo, copyTo, copyTo, crossProduct, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, dotProduct, dotProduct, elementCount, elementIterator, elementSquaredSum, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, exactClone, get, get, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isElementConstrained, isFullyMutable, isMutable, isSameShape, isSameShape, isUnitLengthVector, isZero, iterator, length, logistic, maxAbsElement, multiply, negate, normalise, normaliseMaxAbsElement, outerProduct, outerProduct, projectToPlane, reshape, scale, scaleAdd, scaleToMagnitude, set, set, set, set, set, set, setElements, setValues, slice, sliceCount, sub, sub, sub, subMultiple, tanh, toDoubleArray, toList, toNormal, toString, toVector, zeroCountbroadcastCloneLike, get, getSliceViews, isBoolean, scale, set, set, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitgetShapeadd, applyOp, asElementList, asVector, broadcastCloneLike, copyTo, dimensionality, divide, divide, elementCount, elementIterator, elementSquaredSum, epsilonEquals, epsilonEquals, equals, exactClone, get, get, get, getLongShape, getShape, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, innerProduct, isBoolean, isElementConstrained, isFullyMutable, isMutable, isSameShape, isZero, multiply, negate, outerProduct, reshape, scale, set, set, set, set, set, setElements, slice, sliceCount, sub, sub, toArray, toDoubleArray, toVectorpublic final int getStride()
getStride in class AStridedVectorpublic ArraySubVector subVector(int offset, int length)
public AScalar slice(int position)
INDArraypublic boolean isPackedArray()
isPackedArray in interface IStridedArrayisPackedArray in class AStridedVectorpublic boolean isView()
AVectorpublic void toDoubleBuffer(DoubleBuffer dest)
INDArraytoDoubleBuffer in interface INDArraytoDoubleBuffer in class AVectorpublic void copyTo(double[] data,
int offset)
AVectorpublic void fillRange(int offset,
int length,
double value)
public void set(AVector a)
AVectorpublic void set(AVector a, int offset)
AVectorpublic void setRange(int offset,
double[] data,
int dataOffset,
int length)
AVectorpublic void setElements(double[] values,
int offset,
int length)
INDArraysetElements in interface INDArraysetElements in class AVectorpublic void getElements(double[] dest,
int offset)
INDArraygetElements in interface INDArraygetElements in class AVectorpublic abstract double get(int i)
INDArraypublic abstract void set(int i,
double value)
public void add(AVector src)
AVectorpublic void add(AArrayVector v)
public void add(AVector src, int srcOffset)
AVectorpublic void add(int offset,
AVector src)
AVectorpublic void add(int offset,
AArrayVector src)
public void add(int offset,
AArrayVector src,
int srcOffset,
int length)
public void addMultiple(AVector v, double factor)
AVectoraddMultiple in class AVectorpublic void scaleAdd(double factor,
double constant)
INDArraypublic void add(double constant)
INDArraypublic void addProduct(AVector a, int aOffset, AVector b, int bOffset, double factor)
addProduct in class AVectorpublic void addToArray(int offset,
double[] array,
int arrayOffset,
int length)
addToArray in class AVectorpublic void addProduct(AVector a, AVector b, double factor)
addProduct in class AVectorpublic void addMultipleToArray(double factor,
int offset,
double[] array,
int arrayOffset,
int length)
addMultipleToArray in class AVectorpublic void addProductToArray(double factor,
int offset,
AVector other,
int otherOffset,
double[] array,
int arrayOffset,
int length)
addProductToArray in class AVectorpublic void addProductToArray(double factor,
int offset,
AArrayVector other,
int otherOffset,
double[] array,
int arrayOffset,
int length)
addProductToArray in class AVectorpublic void add(AArrayVector src, int srcOffset)
public void addAt(int i,
double v)
AVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AStridedVectorpublic double dotProduct(AVector v)
dotProduct in class AVectorpublic void abs()
AVectorpublic void log()
INDArraypublic void exp()
INDArrayexp in interface INDArrayexp in class AbstractArray<Double>public void applyOp(Op op)
INDArraypublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AVectorpublic void square()
AVectorpublic void sqrt()
INDArraysqrt in interface INDArraysqrt in class AbstractArray<Double>public void signum()
public void multiplyTo(double[] data,
int offset)
multiplyTo in class AVectorpublic void copyTo(int start,
AVector dest,
int destOffset,
int length)
AVectorpublic void copyTo(int offset,
AArrayVector dest,
int destOffset,
int length)
public void copyTo(int offset,
double[] dest,
int destOffset,
int length)
public void addMultiple(AArrayVector v, double factor)
public double magnitudeSquared()
magnitudeSquared in class AVectorpublic double magnitude()
AVectorpublic void fill(double value)
AVectorpublic void pow(double exponent)
INDArraypublic void reciprocal()
INDArrayreciprocal in interface INDArrayreciprocal in class AbstractArray<Double>public void clamp(double min,
double max)
AVectorpublic void multiply(double factor)
AVectorpublic AVector join(AVector v)
AVectorpublic AVector join(AArrayVector v)
public JoinedArrayVector join(JoinedArrayVector v)
public void validate()
INDArrayCopyright © 2013. All Rights Reserved.