public final class MatrixRowView extends AMatrixViewVector
sourcelength| Constructor and Description |
|---|
MatrixRowView(AMatrix aMatrix,
int row) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AVector v)
Adds another vector to this one
|
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)
|
void |
applyOp(Op2 op,
AVector v)
Applies a binary operator to this vector and a second vector
|
void |
applyOp(Op2 op,
double v)
Applies a binary operator to this array and a double value.
|
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.
|
AVector |
clone()
Clones the vector, creating a new mutable copy of all data.
|
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
boolean |
equals(AVector v) |
MatrixRowView |
exactClone()
Returns an exact clone of this vector, i.e.
|
void |
fill(double v)
Fills the entire vector with a given value
|
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.
|
void |
multiply(AVector v) |
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 |
sub(AVector v)
Subtracts a vector from this vector
|
double |
unsafeGet(int i) |
void |
unsafeSet(int i,
double value) |
addAt, slicecheckIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, equalsArray, equalsArray, get, getShape, getShapeClone, isSameShape, length, sliceCountabs, absCopy, add, add, add, add, add, add, add, add, addAt, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleCopy, addMultipleToArray, addMultipleToArray, addPower, addPower, addPower, addProduct, addProduct, addProduct, addProductCopy, addProductCopy, addProductToArray, addProductToArray, addToArray, addToArray, addToArray, addWeighted, angle, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, checkDimension, checkSameLength, clamp, clampMax, clampMin, 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, elementSquaredSum, elementSum, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, fillRange, get, get, get, get, getElements, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isMutable, isRangeZero, isSameShape, isUnitLengthVector, isUnitLengthVector, isView, isZero, iterator, join, join, join, log, logistic, magnitude, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, multiplyTo, mutable, negate, negateCopy, nonSparseIndex, nonZeroCount, nonZeroIndices, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, pow, 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, signum, slice, sliceValue, softmax, softmaxCopy, sparse, sparseClone, sqrtCopy, square, squareCopy, sub, subArray, subAt, subCopy, subCopy, subMultiple, subVector, tanh, toDoubleArray, toDoubleBuffer, toList, toNormal, toSliceArray, toString, toStringFull, toVector, tryEfficientJoin, validateadd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, density, ensureMutable, 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, waitaddOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, ensureMutable, exp, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isBoolean, isDense, isSparse, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sqrt, sub, toArray, withComponentsforEach, spliteratorpublic MatrixRowView(AMatrix aMatrix, int row)
public double get(int i)
INDArraypublic double unsafeGet(int i)
unsafeGet in class AMatrixViewVectorpublic void set(int i,
double value)
INDArraypublic void unsafeSet(int i,
double value)
unsafeSet in class AMatrixViewVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AVectorpublic MatrixRowView exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorpublic void getElements(double[] data,
int offset)
INDArraygetElements in interface INDArraygetElements in class AMatrixViewVectorprotected int calcRow(int i)
AMatrixViewVectorcalcRow in class AMatrixViewVectorprotected int calcCol(int i)
AMatrixViewVectorcalcCol in class AMatrixViewVectorpublic AVector clone()
AVectorpublic boolean equals(AVector v)
equals in class AMatrixViewVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorpublic void applyOp(Op op)
INDArraypublic void applyOp(Op2 op, AVector v)
AVectorpublic void applyOp(Op2 op, double v)
INDArraypublic void multiply(double factor)
AVectorpublic void add(AVector v)
AVectorpublic void addMultiple(AVector v, double factor)
AVectoraddMultiple in class AVectorpublic void sub(AVector v)
AVectorpublic void set(AVector v)
AVectorCopyright © 2016. All rights reserved.