public class RandomMatrices_DSCC
extends java.lang.Object
Constructor and Description |
---|
RandomMatrices_DSCC() |
Modifier and Type | Method and Description |
---|---|
static void |
ensureNotSingular(org.ejml.data.DMatrixSparseCSC A,
java.util.Random rand)
Modies the matrix to make sure that at least one element in each column has a value
|
static int |
nonzero(int numRows,
int numCols,
double minFill,
double maxFill,
java.util.Random rand) |
static org.ejml.data.DMatrixSparseCSC |
rectangle(int numRows,
int numCols,
int nz_total,
double min,
double max,
java.util.Random rand)
Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.
|
static org.ejml.data.DMatrixSparseCSC |
rectangle(int numRows,
int numCols,
int nz_total,
java.util.Random rand) |
static org.ejml.data.DMatrixSparseCSC |
symmetric(int N,
int nz_total,
double min,
double max,
java.util.Random rand)
Creates a random symmetric matrix.
|
static org.ejml.data.DMatrixSparseCSC |
symmetricPosDef(int width,
int nz_total,
java.util.Random rand)
Creates a random symmetric positive definite matrix.
|
static org.ejml.data.DMatrixSparseCSC |
triangle(boolean upper,
int N,
double minFill,
double maxFill,
java.util.Random rand)
Creates a triangular matrix where the amount of fill is randomly selected too.
|
static org.ejml.data.DMatrixSparseCSC |
triangleLower(int dimen,
int hessenberg,
int nz_total,
double min,
double max,
java.util.Random rand)
Randomly generates lower triangular (or hessenberg) matrix with the specified number of of non-zero
elements.
|
static org.ejml.data.DMatrixSparseCSC |
triangleUpper(int dimen,
int hessenberg,
int nz_total,
double min,
double max,
java.util.Random rand) |
public static org.ejml.data.DMatrixSparseCSC rectangle(int numRows, int numCols, int nz_total, double min, double max, java.util.Random rand)
numRows
- Number of rowsnumCols
- Number of columnsnz_total
- Total number of non-zero elements in the matrixmin
- Minimum element value, inclusivemax
- Maximum element value, inclusiverand
- Random number generatorpublic static org.ejml.data.DMatrixSparseCSC rectangle(int numRows, int numCols, int nz_total, java.util.Random rand)
public static org.ejml.data.DMatrixSparseCSC symmetric(int N, int nz_total, double min, double max, java.util.Random rand)
N
- Number of rows and columnsnz_total
- Number of nonzero elements in the triangular portion of the matrixmin
- Minimum element value, inclusivemax
- Maximum element value, inclusiverand
- Random number generatorpublic static org.ejml.data.DMatrixSparseCSC triangleLower(int dimen, int hessenberg, int nz_total, double min, double max, java.util.Random rand)
dimen
- Number of rows and columnshessenberg
- Hessenberg degree. 0 is triangular and 1 or more is Hessenberg.nz_total
- Total number of non-zero elements in the matrix. Adjust to meet matrix size constraints.min
- Minimum element value, inclusivemax
- Maximum element value, inclusiverand
- Random number generatorpublic static org.ejml.data.DMatrixSparseCSC triangleUpper(int dimen, int hessenberg, int nz_total, double min, double max, java.util.Random rand)
public static int nonzero(int numRows, int numCols, double minFill, double maxFill, java.util.Random rand)
public static org.ejml.data.DMatrixSparseCSC triangle(boolean upper, int N, double minFill, double maxFill, java.util.Random rand)
upper
- true for upper triangular and false for lowerN
- number of rows and columns
er * @param minFill minimum fill fractionmaxFill
- maximum fill fractionrand
- random number generatorpublic static org.ejml.data.DMatrixSparseCSC symmetricPosDef(int width, int nz_total, java.util.Random rand)
width
- number of columns and rowsnz_total
- Used to adjust number of non-zero values. Exact amount in final matrix will be more than this.rand
- random number generatorpublic static void ensureNotSingular(org.ejml.data.DMatrixSparseCSC A, java.util.Random rand)