public class SymmetricMatrix extends MutableAbstractMatrix implements MutableMatrix
| Modifier and Type | Field and Description |
|---|---|
protected int |
offset |
buffer, columns, rows, zeroPadded| Modifier | Constructor and Description |
|---|---|
|
SymmetricMatrix(int length)
Creates a square, symmetric matrix with the given number of rows and columns.
|
|
SymmetricMatrix(int length,
boolean direct,
boolean zeroPadded)
Creates a square, symmetric matrix with the given number of rows and columns.
|
|
SymmetricMatrix(int offset,
int length,
boolean direct,
boolean zeroPadded)
Creates a square, symmetric matrix with the given number of rows and columns.
|
|
SymmetricMatrix(int offset,
int length,
MatrixBackingBuffer buffer,
boolean zeroPadded)
Creates a square, symmetric matrix with the given number of rows and columns.
|
protected |
SymmetricMatrix(int offset,
int length,
MatrixBackingBuffer buffer,
boolean zeroPadded,
boolean allocate) |
|
SymmetricMatrix(int length,
MatrixBackingBuffer buffer,
boolean zeroPadded)
Creates a square, symmetric matrix with the given number of rows and columns.
|
|
SymmetricMatrix(Matrix matrix,
MatrixBackingBuffer buffer,
boolean zeroPadded)
Creates a square, symmetric matrix with the data from the given matrix.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocate(MatrixBackingBuffer buffer)
Calls
MatrixBackingBuffer.allocate(int) on the used buffer. |
float |
get(int row,
int column)
Gets the value from
row and column. |
protected boolean |
isInvalid(int row,
int column) |
void |
set(int row,
int column,
float value)
Sets the given value.
|
protected int |
toIndex(int row,
int column) |
String |
toString() |
copy, copy, copy, copy, fill, set, setColumn, setRowadd, checkBounds, columnSum, enlarge, equals, get, getColumn, getNumberOfColumns, getNumberOfRows, getRow, hadamardMultiply, hashCode, isValidXORZeroPadded, isZeroPadded, multiply, multiply, rowSum, subtract, sum, translate, transposeclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopy, copy, copy, fill, setColumn, setRowadd, columnSum, enlarge, getColumn, getNumberOfColumns, getNumberOfRows, getRow, hadamardMultiply, isZeroPadded, multiply, multiply, rowSum, subtract, sum, translate, transposepublic SymmetricMatrix(int length)
length - rows == columns (square)public SymmetricMatrix(int length,
MatrixBackingBuffer buffer,
boolean zeroPadded)
buffer - backing bufferlength - rows == columns (square)zeroPadded - zero padded?public SymmetricMatrix(int offset,
int length,
MatrixBackingBuffer buffer,
boolean zeroPadded)
buffer - backing bufferlength - rows == columns (square)offset - columns < this offset cannot be storedzeroPadded - zero padded?public SymmetricMatrix(int offset,
int length,
boolean direct,
boolean zeroPadded)
FloatBackingBuffer. The matrix may be zero-padded.length - rows == columns (square)offset - columns < this offset cannot be storeddirect - allocate the backing buffer directly/natively or on the Java heapzeroPadded - zero padded?public SymmetricMatrix(int length,
boolean direct,
boolean zeroPadded)
FloatBackingBuffer. The matrix may be zero-padded.length - rows == columns (square)direct - allocate the backing buffer directly/natively or on the Java heapzeroPadded - zero padded?public SymmetricMatrix(Matrix matrix, MatrixBackingBuffer buffer, boolean zeroPadded)
FloatBackingBuffer. The matrix may be zero-padded.matrix - matrixbuffer - backing bufferzeroPadded - zero padded?protected SymmetricMatrix(int offset,
int length,
MatrixBackingBuffer buffer,
boolean zeroPadded,
boolean allocate)
protected void allocate(MatrixBackingBuffer buffer)
MutableAbstractMatrixMatrixBackingBuffer.allocate(int) on the used buffer.allocate in class MutableAbstractMatrixbuffer - bufferpublic float get(int row,
int column)
Matrixrow and column.
If the matrix supports zero-padding, this method may return
0f for undefined rows or columns.get in interface Matrixget in class AbstractMatrixrow - rowcolumn - columnpublic void set(int row,
int column,
float value)
MutableMatrixset in interface MutableMatrixset in class MutableAbstractMatrixrow - rowcolumn - columnvalue - valueprotected boolean isInvalid(int row,
int column)
isInvalid in class AbstractMatrixprotected int toIndex(int row,
int column)
toIndex in class AbstractMatrixpublic String toString()
toString in class AbstractMatrixCopyright © 2011–2020 tagtraum industries incorporated. All rights reserved.