public class BlockMatrixOps
extends java.lang.Object
BlockMatrix64F.| Constructor and Description |
|---|
BlockMatrixOps() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
blockAligned(int blockLength,
org.ejml.data.D1Submatrix64F A)
Checks to see if the submatrix has its boundaries along inner blocks.
|
static void |
checkIdenticalShape(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B)
Checks to see if the two matrices have an identical shape an block size.
|
static org.ejml.data.DenseMatrix64F |
convert(org.ejml.data.BlockMatrix64F src,
org.ejml.data.DenseMatrix64F dst)
Converts a row major block matrix into a row major matrix.
|
static org.ejml.data.BlockMatrix64F |
convert(org.ejml.data.DenseMatrix64F A) |
static void |
convert(org.ejml.data.DenseMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
Converts a row major matrix into a row major block matrix.
|
static org.ejml.data.BlockMatrix64F |
convert(org.ejml.data.DenseMatrix64F A,
int blockLength) |
static void |
convertBlockToRow(int numRows,
int numCols,
int blockLength,
double[] data,
double[] tmp)
Converts matrix data stored is a block row major format into a row major format in place.
|
static void |
convertRowToBlock(int numRows,
int numCols,
int blockLength,
double[] data,
double[] tmp)
Converts matrix data stored is a row major format into a block row major format in place.
|
static void |
convertTranSrc(org.ejml.data.DenseMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
Converts the transpose of a row major matrix into a row major block matrix.
|
static void |
copyTriangle(boolean upper,
org.ejml.data.BlockMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
Copies either the upper or lower triangular portion of src into dst.
|
static org.ejml.data.BlockMatrix64F |
createRandom(int numRows,
int numCols,
double min,
double max,
java.util.Random rand) |
static org.ejml.data.BlockMatrix64F |
createRandom(int numRows,
int numCols,
double min,
double max,
java.util.Random rand,
int blockLength) |
static void |
extractAligned(org.ejml.data.BlockMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
Extracts a matrix from src into dst.
|
static org.ejml.data.BlockMatrix64F |
identity(int numRows,
int numCols,
int blockLength)
Returns a new matrix with ones along the diagonal and zeros everywhere else.
|
static boolean |
isEquals(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B) |
static boolean |
isEquals(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
double tol) |
static void |
mult(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
org.ejml.data.BlockMatrix64F C) |
static void |
multTransA(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
org.ejml.data.BlockMatrix64F C) |
static void |
multTransB(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
org.ejml.data.BlockMatrix64F C) |
static void |
set(org.ejml.data.BlockMatrix64F A,
double value)
Sets every element in the matrix to the specified value.
aij = value |
static void |
setIdentity(org.ejml.data.BlockMatrix64F A)
Sets the value of A to all zeros except along the diagonal.
|
static org.ejml.data.BlockMatrix64F |
transpose(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F A_tran)
Transposes a block matrix.
|
static void |
zeroTriangle(boolean upper,
org.ejml.data.BlockMatrix64F A)
Sets either the upper or low triangle of a matrix to zero
|
public static void convert(org.ejml.data.DenseMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
src - Original DenseMatrix64F. Not modified.dst - Equivalent BlockMatrix64F. Modified.public static void convertRowToBlock(int numRows,
int numCols,
int blockLength,
double[] data,
double[] tmp)
Converts matrix data stored is a row major format into a block row major format in place.
numRows - number of rows in the matrix.numCols - number of columns in the matrix.blockLength - Block size in the converted matrix.data - Matrix data in a row-major format. Modified.tmp - Temporary data structure that is to be the size of a block row.public static org.ejml.data.DenseMatrix64F convert(org.ejml.data.BlockMatrix64F src,
org.ejml.data.DenseMatrix64F dst)
src - Original BlockMatrix64F.. Not modified.dst - Equivalent DenseMatrix64F. Modified.public static void convertBlockToRow(int numRows,
int numCols,
int blockLength,
double[] data,
double[] tmp)
Converts matrix data stored is a block row major format into a row major format in place.
numRows - number of rows in the matrix.numCols - number of columns in the matrix.blockLength - Block size in the converted matrix.data - Matrix data in a block row-major format. Modified.tmp - Temporary data structure that is to be the size of a block row.public static void convertTranSrc(org.ejml.data.DenseMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
src - Original DenseMatrix64F. Not modified.dst - Equivalent BlockMatrix64F. Modified.public static void mult(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
org.ejml.data.BlockMatrix64F C)
public static void multTransA(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
org.ejml.data.BlockMatrix64F C)
public static void multTransB(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
org.ejml.data.BlockMatrix64F C)
public static org.ejml.data.BlockMatrix64F transpose(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F A_tran)
A - Original matrix. Not modified.A_tran - Transposed matrix. Modified.public static org.ejml.data.BlockMatrix64F createRandom(int numRows,
int numCols,
double min,
double max,
java.util.Random rand)
public static org.ejml.data.BlockMatrix64F createRandom(int numRows,
int numCols,
double min,
double max,
java.util.Random rand,
int blockLength)
public static org.ejml.data.BlockMatrix64F convert(org.ejml.data.DenseMatrix64F A,
int blockLength)
public static org.ejml.data.BlockMatrix64F convert(org.ejml.data.DenseMatrix64F A)
public static boolean isEquals(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B)
public static boolean isEquals(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B,
double tol)
public static void zeroTriangle(boolean upper,
org.ejml.data.BlockMatrix64F A)
public static void copyTriangle(boolean upper,
org.ejml.data.BlockMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
upper - If the upper or lower triangle is copied.src - The source matrix. Not modified.dst - The destination matrix. Modified.public static void set(org.ejml.data.BlockMatrix64F A,
double value)
Sets every element in the matrix to the specified value.
aij = value
A - A matrix whose elements are about to be set. Modified.value - The value each element will have.public static void setIdentity(org.ejml.data.BlockMatrix64F A)
Sets the value of A to all zeros except along the diagonal.
A - Block matrix.public static org.ejml.data.BlockMatrix64F identity(int numRows,
int numCols,
int blockLength)
Returns a new matrix with ones along the diagonal and zeros everywhere else.
numRows - Number of rows.numCols - NUmber of columns.blockLength - Block length.public static void checkIdenticalShape(org.ejml.data.BlockMatrix64F A,
org.ejml.data.BlockMatrix64F B)
Checks to see if the two matrices have an identical shape an block size.
A - Matrix.B - Matrix.public static void extractAligned(org.ejml.data.BlockMatrix64F src,
org.ejml.data.BlockMatrix64F dst)
Extracts a matrix from src into dst. The submatrix which is copied has its initial coordinate at (0,0) and ends at (dst.numRows,dst.numCols). The end rows/columns must be aligned along blocks or else it will silently screw things up.
src - Matrix which a submatrix is being extracted from. Not modified.dst - Where the submatrix is written to. Its rows and columns be less than or equal to 'src'. Modified.public static boolean blockAligned(int blockLength,
org.ejml.data.D1Submatrix64F A)
blockLength - Size of an inner block.A - Submatrix.