public class MatrixViewVector extends AMatrixViewVector
| Modifier and Type | Field and Description |
|---|---|
protected int |
columns |
protected int |
rows |
sourcelength| Constructor and Description |
|---|
MatrixViewVector(AMatrix a) |
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Replaces all elements of this array with their absolute values, according to Math.abs(double)
|
void |
addToArray(double[] data,
int offset)
Adds this vector to a double[] array, starting at the specified offset.
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
List<Double> |
asElementList()
Returns a List
|
protected int |
calcCol(int i)
Calculates the row in the source matrix that corresponds to an index in this vector
This method is unsafe: caller is assumed to have checked that the index is in range
|
protected int |
calcRow(int i)
Calculates the row in the source matrix that corresponds to an index in this vector.
|
void |
clamp(double min,
double max)
Clamps all values in the vector to a given range
|
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
elementSquaredSum()
Returns the sum of squared elements in this 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
|
AVector |
exactClone()
Returns an exact clone of this vector, i.e.
|
void |
exp()
Computes the function e^x (in-place) for all array elements
|
double |
get(int i)
Returns the double value at the specified position in a 1D vector
|
void |
getElements(double[] data,
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 |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isSparse()
Returns true if the array is in a sparse format
|
boolean |
isView()
Returns true if this vector is of a view type that references other vectors / data.
|
boolean |
isZero()
Returns true if this vector is a zero vector (all components zero)
|
void |
log()
Computes the natural logarithm (in-place) for all array elements
|
void |
negate()
Negates all emlements of this vector in place.
|
void |
pow(double exponent)
Raises all elements of the array to a specified power in place
|
void |
set(double value)
Sets all elements of an array to a specific double value
|
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
|
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) |
addAt, equals, slicecheckIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, equalsArray, get, getShape, getShapeClone, isSameShape, length, sliceCountabsCopy, add, add, add, add, add, add, add, add, add, 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, applyOpCopy, asDoubleArray, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, checkDimension, checkSameLength, clampMax, clampMin, clone, compareTo, copy, copyTo, copyTo, copyTo, copyTo, copyTo, crossProduct, crossProduct, dense, denseClone, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideCopy, divideCopy, divideTo, dotProduct, dotProduct, dotProduct, dotProduct, elementAbsPowSum, elementIterator, elementMax, elementMin, elementPowSum, elementProduct, elementsEqual, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, fill, fillRange, get, get, get, get, getElements, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isRangeZero, isSameShape, isUnitLengthVector, isUnitLengthVector, iterator, join, join, join, logistic, magnitude, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, multiplyTo, mutable, negateCopy, nonSparseIndex, nonZeroCount, nonZeroIndices, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, 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, setElements, setElements, setElements, setInnerProduct, setInnerProduct, setInnerProduct, setMultiple, setMultiple, setMultiple, setMultiple, shiftCopy, slice, sliceValue, softmax, softmaxCopy, sparse, sparseClone, sqrtCopy, squareCopy, sub, sub, subArray, subAt, subCopy, subCopy, subMultiple, tanh, toDoubleArray, toDoubleBuffer, toList, toNormal, toSliceArray, toString, toStringFull, toVector, tryEfficientJoin, validateadd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, density, ensureMutable, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sub, sub, toArray, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitaddOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, ensureMutable, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sub, toArray, withComponentsforEach, spliteratorpublic MatrixViewVector(AMatrix a)
public double get(int i)
INDArraypublic void set(int i,
double value)
INDArraypublic double unsafeGet(int i)
unsafeGet in class AMatrixViewVectorpublic void unsafeSet(int i,
double value)
unsafeSet in class AMatrixViewVectorpublic AVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AVectorpublic boolean isMutable()
AVectorpublic boolean isView()
AVectorpublic void set(double value)
INDArraypublic boolean isSparse()
INDArrayisSparse in interface INDArrayisSparse in class AbstractArray<Double>public boolean isZero()
AVectorpublic void getElements(double[] data,
int offset)
INDArraygetElements in interface INDArraygetElements in class AMatrixViewVectorpublic List<Double> asElementList()
INDArrayasElementList in interface INDArrayasElementList in class AVectorpublic void addToArray(double[] data,
int offset)
AVectoraddToArray in interface INDArrayaddToArray in class AVectorpublic void clamp(double min,
double max)
AVectorpublic boolean equalsArray(double[] data,
int offset)
AVectorequalsArray in interface INDArrayequalsArray in class ASizedVectordata - Array of double element values to check for equalityoffset - Offset into the data arraypublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic double elementSquaredSum()
INDArrayelementSquaredSum in interface INDArrayelementSquaredSum in class AVectorpublic void applyOp(Op op)
INDArraypublic void abs()
INDArraypublic void signum()
INDArraypublic void negate()
AVectorpublic void exp()
INDArrayexp in interface INDArrayexp in class AbstractArray<Double>public void log()
INDArraypublic void square()
INDArraypublic void sqrt()
INDArraysqrt in interface INDArraysqrt in class AbstractArray<Double>public void pow(double exponent)
INDArrayprotected int calcRow(int i)
AMatrixViewVectorcalcRow in class AMatrixViewVectorprotected int calcCol(int i)
AMatrixViewVectorcalcCol in class AMatrixViewVectorpublic AVector subVector(int start, int length)
AVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorCopyright © 2016. All rights reserved.