mikera.matrixx.impl
Class VectorMatrixM3
- java.lang.Object
-
- mikera.arrayz.impl.AbstractArray<AVector>
-
- mikera.matrixx.AMatrix
-
- mikera.matrixx.impl.ARectangularMatrix
-
- mikera.matrixx.impl.AVectorMatrix<Vector3>
-
- mikera.matrixx.impl.VectorMatrixM3
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<INDArray>, java.lang.Iterable<AVector>, INDArray, IMatrix, IFastRows, ISpecialisedTransform
public final class VectorMatrixM3 extends AVectorMatrix<Vector3> implements ISpecialisedTransform
Specialised N*3 Matrix with Vector3 row components- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description VectorMatrixM3(int rowCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyOp(Op op)Applies a unary operator to all elements of the array (in-place)VectorMatrixM3clone()Returns a clone of the array data, as a new array which will be fully mutable and may be of a different class to the original.VectorMatrixM3exactClone()Creates a deep clone of an array, using the same class implementation as the original arraydoubleget(int row, int column)Returns the double value at the specified position in a 2D matrixVector3getRow(int row)Gets a row of the matrix.Vector3getRowClone(int row)Returns a row of the matrix as a new cloned, mutable vector.voidmultiply(double factor)Multiplies all elements of the array in place by a given double valuevoidreplaceRow(int i, AVector row)Replaces a row in this matrix.voidreplaceRow(int i, Vector3 row)doublerowDotProduct(int i, AVector inputVector)Returns the dot product of a specific row with a vector.voidset(int row, int column, double value)Sets a value at a given position in a mutable 2D arrayvoidtransform(AVector source, AVector dest)Transforms a source vector into a destination vector, using matrix multiplication (inner product).voidtransform(Vector3 source, AVector dest)doubleunsafeGet(int row, int column)Gets an element in the matrix in an unsafe fashion, without performing bound checks The result is undefined if the row and column are out of bounds.voidunsafeSet(int row, int column, double value)Sets an element value in the matrix in an unsafe fashion, without performing bound checks The result is undefined if the row and column are out of bounds.-
Methods inherited from class mikera.matrixx.impl.AVectorMatrix
asVector, componentCount, copyColumnTo, copyRowTo, elementSquaredSum, elementSum, equals, fill, getComponent, getElements, getRowView, innerProduct, isBoolean, isFullyMutable, isView, isZero, nonZeroCount, subMatrix, transform
-
Methods inherited from class mikera.matrixx.impl.ARectangularMatrix
bandLength, checkColumn, checkRow, checkSquare, columnCount, elementCount, getElement, getShape, getShape, getShapeClone, isSameShape, isSameShape, isSameShape, isSquare, rowCount
-
Methods inherited from class mikera.matrixx.AMatrix
abs, add, add, add, add, add2, addAt, addCopy, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addOuterProductSparse, addOuterProductSparse, addRowMultiple, addSparse, addSparse, addToArray, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, bandIndex, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, clamp, composeWith, copy, dense, denseClone, determinant, diagonalProduct, dimensionality, divide, divide, divide, divide, divideCopy, elementIterator, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equalsArray, equalsTranspose, exp, get, get, get, get, getBand, getBandWrapped, getColumn, getColumnClone, getColumns, getColumnView, getLeadingDiagonal, getLongShape, getRows, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasOrthonormalColumns, hasOrthonormalRows, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isDiagonal, isElementConstrained, isHermitian, isIdentity, isInvertible, isLowerTriangular, isMutable, isOrthogonal, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isSymmetric, isUpperTriangular, iterator, join, log, lowerBandwidth, lowerBandwidthLimit, mul, multiply, multiply, multiply, multiplyCopy, multiplyRow, mutable, negate, outerProduct, outputDimensions, pow, rank, reciprocal, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, replaceColumn, reshape, reshape, rotateView, scaleAdd, scaleAdd, set, set, set, set, set, set, set, set, setApplyOp, setApplyOp, setColumn, setElements, setElements, setMultiple, setMultiple, setMultiple, setMultiple, setMultiple, setRow, setSparse, setSparse, signum, slice, slice, sliceCount, sparse, sparseClone, sqrt, square, sub, sub, sub, subArray, subCopy, swapColumns, swapRows, toAffineTransform, toDoubleArray, toDoubleBuffer, toMatrix, toMatrixTranspose, toMutableMatrix, toNestedDoubleArrays, toSliceArray, toString, toStringFull, toVector, trace, transformInPlace, transformInPlace, transposeInnerProduct, transposeInnerProduct, transposeInPlace, upperBandwidth, upperBandwidthLimit, validate
-
Methods inherited from class mikera.arrayz.impl.AbstractArray
absCopy, absDiff, absDiffCopy, add, addApplyOp, addAt, addCopy, addInnerProduct, addInnerProduct, addMultipleSparse, addPower, addPower, addSparse, broadcastLike, compareTo, density, divideCopy, elementAbsPowSum, elementMax, elementMaxAbs, elementMin, elementPowSum, elementProduct, epsilonEquals, equals, equalsArray, get, get, get, get, getComponents, getElements, getElements, getElements, isDense, isSparse, join, multiplyCopy, negateCopy, reciprocalCopy, scale, scaleCopy, setElements, setInnerProduct, setSparse, signumCopy, sliceValue, squareCopy, sub, sub, subCopy, withComponents
-
Methods inherited from interface mikera.matrixx.IMatrix
add2, addAt, addCopy, addCopy, columnCount, diagonalProduct, getBand, getColumn, getColumnClone, getColumns, getColumnView, getRows, getTranspose, getTransposeView, innerProduct, innerProduct, inverse, isDiagonal, isIdentity, isInvertible, isRectangularDiagonal, isSquare, isSymmetric, rowCount, toNestedDoubleArrays, trace, transformInPlace, transposeInPlace
-
Methods inherited from interface mikera.arrayz.INDArray
abs, absCopy, absDiff, absDiffCopy, add, add, addApplyOp, addAt, addCopy, addCopy, addInnerProduct, addInnerProduct, addMultiple, addMultipleSparse, addOuterProduct, addOuterProductSparse, addPower, addPower, addSparse, addSparse, addToArray, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, clamp, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, divideCopy, elementAbsPowSum, elementCount, elementIterator, elementMax, elementMaxAbs, elementMin, elementPowSum, elementProduct, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, equals, equalsArray, equalsArray, exp, get, get, get, get, get, get, get, get, getComponents, getElement, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, isDense, isElementConstrained, isMutable, isSameShape, isSparse, join, join, log, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, outerProduct, pow, reciprocal, reciprocalCopy, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, set, setApplyOp, setElements, setElements, setElements, setInnerProduct, setMultiple, setMultiple, setSparse, setSparse, signum, signumCopy, slice, slice, sliceCount, sliceValue, sparse, sparseClone, sqrt, square, squareCopy, sub, sub, subArray, subCopy, toDoubleArray, toDoubleBuffer, toSliceArray, toVector, validate, withComponents
-
-
-
-
Method Detail
-
multiply
public void multiply(double factor)
Description copied from interface:INDArrayMultiplies all elements of the array in place by a given double value
-
applyOp
public void applyOp(Op op)
Description copied from interface:INDArrayApplies a unary operator to all elements of the array (in-place)- Specified by:
applyOpin interfaceINDArray- Overrides:
applyOpin classAVectorMatrix<Vector3>
-
replaceRow
public void replaceRow(int i, AVector row)Description copied from class:AVectorMatrixReplaces a row in this matrix. The row must be of a type allowed by the matrix. Detaches the current row: this will invalidate views over the matrix that include the original row.- Specified by:
replaceRowin classAVectorMatrix<Vector3>
-
replaceRow
public void replaceRow(int i, Vector3 row)
-
get
public double get(int row, int column)Description copied from interface:INDArrayReturns the double value at the specified position in a 2D matrix
-
set
public void set(int row, int column, double value)Description copied from interface:INDArraySets a value at a given position in a mutable 2D array
-
unsafeGet
public double unsafeGet(int row, int column)Description copied from class:AMatrixGets an element in the matrix in an unsafe fashion, without performing bound checks The result is undefined if the row and column are out of bounds.- Overrides:
unsafeGetin classAVectorMatrix<Vector3>- Returns:
-
unsafeSet
public void unsafeSet(int row, int column, double value)Description copied from class:AMatrixSets an element value in the matrix in an unsafe fashion, without performing bound checks The result is undefined if the row and column are out of bounds.- Overrides:
unsafeSetin classAVectorMatrix<Vector3>
-
getRow
public Vector3 getRow(int row)
Description copied from class:AVectorMatrixGets a row of the matrix. Guaranteed to be an existing vector view by all descendants of AVectorMatrix.
-
getRowClone
public Vector3 getRowClone(int row)
Description copied from interface:IMatrixReturns a row of the matrix as a new cloned, mutable vector. The cloned row may be modified without affecting the original matrix.- Specified by:
getRowClonein interfaceIMatrix- Overrides:
getRowClonein classAMatrix
-
transform
public void transform(AVector source, AVector dest)
Description copied from interface:IMatrixTransforms a source vector into a destination vector, using matrix multiplication (inner product). The destination vector is overwritten.- Specified by:
transformin interfaceIMatrix- Overrides:
transformin classAVectorMatrix<Vector3>
-
rowDotProduct
public double rowDotProduct(int i, AVector inputVector)Description copied from class:AMatrixReturns the dot product of a specific row with a vector. Unsafe operation: performs no bounds checking- Overrides:
rowDotProductin classAVectorMatrix<Vector3>- Returns:
-
clone
public VectorMatrixM3 clone()
Description copied from interface:INDArrayReturns a clone of the array data, as a new array which will be fully mutable and may be of a different class to the original. Clone should attempt to return the most efficient possible array type. Clone should preserve sparsity property where possible, but this is not guaranteed.- Specified by:
clonein interfaceINDArray- Overrides:
clonein classAVectorMatrix<Vector3>
-
exactClone
public VectorMatrixM3 exactClone()
Description copied from interface:INDArrayCreates a deep clone of an array, using the same class implementation as the original array- Specified by:
exactClonein interfaceINDArray- Specified by:
exactClonein classAMatrix- Returns:
- A clone of the original array
-
-
DMelt 3.0 © DataMelt by jWork.ORG