Package org.ejml.sparse.csc
Class RandomMatrices_FSCC
java.lang.Object
org.ejml.sparse.csc.RandomMatrices_FSCC
@Generated("org.ejml.sparse.csc.RandomMatrices_DSCC") public class RandomMatrices_FSCC extends Object
-
Constructor Summary
Constructors Constructor Description RandomMatrices_FSCC() -
Method Summary
Modifier and Type Method Description static voidensureNotSingular(org.ejml.data.FMatrixSparseCSC A, Random rand)Modies the matrix to make sure that at least one element in each column has a valuestatic org.ejml.data.FMatrixSparseCSCgenerateUniform(int numRows, int numCols, int nzEntriesPerColumn, float min, float max, Random rand)Creates a random matrix where each column has exactly `nzEntriesPerColumn` non-zero entries.static intnonzero(int numRows, int numCols, float minFill, float maxFill, Random rand)static org.ejml.data.FMatrixSparseCSCrectangle(int numRows, int numCols, int nz_total, float min, float max, Random rand)Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.static org.ejml.data.FMatrixSparseCSCrectangle(int numRows, int numCols, int nz_total, Random rand)static org.ejml.data.FMatrixSparseCSCsymmetric(int N, int nz_total, float min, float max, Random rand)Creates a random symmetric matrix.static org.ejml.data.FMatrixSparseCSCsymmetricPosDef(int width, float probabilityZero, Random rand)Creates a random symmetric positive definite matrix with zero values.static org.ejml.data.FMatrixSparseCSCtriangle(boolean upper, int N, float minFill, float maxFill, Random rand)Creates a triangular matrix where the amount of fill is randomly selected too.static org.ejml.data.FMatrixSparseCSCtriangleLower(int dimen, int hessenberg, int nz_total, float min, float max, Random rand)Randomly generates lower triangular (or hessenberg) matrix with the specified number of of non-zero elements.static org.ejml.data.FMatrixSparseCSCtriangleUpper(int dimen, int hessenberg, int nz_total, float min, float max, Random rand)
-
Constructor Details
-
RandomMatrices_FSCC
public RandomMatrices_FSCC()
-
-
Method Details
-
rectangle
public static org.ejml.data.FMatrixSparseCSC rectangle(int numRows, int numCols, int nz_total, float min, float max, Random rand)Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.- Parameters:
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 generator- Returns:
- Randomly generated matrix
-
rectangle
public static org.ejml.data.FMatrixSparseCSC rectangle(int numRows, int numCols, int nz_total, Random rand) -
symmetric
public static org.ejml.data.FMatrixSparseCSC symmetric(int N, int nz_total, float min, float max, Random rand)Creates a random symmetric matrix. The entire matrix will be filled in, not just a triangular portion.- Parameters:
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 generator- Returns:
- Randomly generated matrix
-
triangleLower
public static org.ejml.data.FMatrixSparseCSC triangleLower(int dimen, int hessenberg, int nz_total, float min, float max, Random rand)Randomly generates lower triangular (or hessenberg) matrix with the specified number of of non-zero elements. The diagonal elements must be non-zero.- Parameters:
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 generator- Returns:
- Randomly generated matrix
-
triangleUpper
public static org.ejml.data.FMatrixSparseCSC triangleUpper(int dimen, int hessenberg, int nz_total, float min, float max, Random rand) -
nonzero
-
triangle
public static org.ejml.data.FMatrixSparseCSC triangle(boolean upper, int N, float minFill, float maxFill, Random rand)Creates a triangular matrix where the amount of fill is randomly selected too.- Parameters:
upper- true for upper triangular and false for lowerN- number of rows and columnsminFill- minimum fill fractionmaxFill- maximum fill fractionrand- random number generator- Returns:
- Random matrix
-
symmetricPosDef
public static org.ejml.data.FMatrixSparseCSC symmetricPosDef(int width, float probabilityZero, Random rand)Creates a random symmetric positive definite matrix with zero values.- Parameters:
width- number of columns and rowsprobabilityZero- How likely a value is of being zero. 0 = no zeros. 1.0f = all zerosrand- random number generator- Returns:
- Random matrix
-
generateUniform
public static org.ejml.data.FMatrixSparseCSC generateUniform(int numRows, int numCols, int nzEntriesPerColumn, float min, float max, Random rand)Creates a random matrix where each column has exactly `nzEntriesPerColumn` non-zero entries. Compared torectangle(int, int, int, float, float, java.util.Random)this method can generate larger sparse matrices.- Parameters:
numRows- Number of rowsnumCols- Number of columnsnzEntriesPerColumn- Amount of nz-entries per columnmin- Minimum element value, inclusivemax- Maximum element value, inclusiverand- Random number generator- Returns:
- Randomly generated matrix
-
ensureNotSingular
Modies the matrix to make sure that at least one element in each column has a value
-