Package org.ejml.dense.row
Class RandomMatrices_ZDRM
java.lang.Object
org.ejml.dense.row.RandomMatrices_ZDRM
Contains a list of functions for creating random row complex matrices and vectors with different structures.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
fillHermitian
(ZMatrixRMaj A, double min, double max, Random rand) Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.static void
fillUniform
(ZMatrixD1 mat, double min, double max, Random rand) Sets each element in the matrix to a value drawn from an uniform distribution from 'min' to 'max' inclusive.static void
fillUniform
(ZMatrixRMaj mat, Random rand) Sets each element in the matrix to a value drawn from an uniform distribution from 0 to 1 inclusive.static ZMatrixRMaj
Creates a random Hermitian matrix with elements from min to max value.static ZMatrixRMaj
hermitianPosDef
(int width, Random rand) Creates a random symmetric positive definite matrix.static ZMatrixRMaj
Returns a matrix where all the elements are selected independently from a uniform distribution between 'min' and 'max' inclusive.static ZMatrixRMaj
Returns a matrix where all the elements are selected independently from a uniform distribution between -1 and 1 inclusive.
-
Method Details
-
rectangle
Returns a matrix where all the elements are selected independently from a uniform distribution between -1 and 1 inclusive.
- Parameters:
numRow
- Number of rows in the new matrix.numCol
- Number of columns in the new matrix.rand
- Random number generator used to fill the matrix.- Returns:
- The randomly generated matrix.
-
rectangle
Returns a matrix where all the elements are selected independently from a uniform distribution between 'min' and 'max' inclusive.
- Parameters:
numRow
- Number of rows in the new matrix.numCol
- Number of columns in the new matrix.min
- The minimum value each element can be.max
- The maximum value each element can be.rand
- Random number generator used to fill the matrix.- Returns:
- The randomly generated matrix.
-
fillUniform
Sets each element in the matrix to a value drawn from an uniform distribution from 0 to 1 inclusive.
- Parameters:
mat
- The matrix who is to be randomized. Modified.rand
- Random number generator used to fill the matrix.
-
fillUniform
Sets each element in the matrix to a value drawn from an uniform distribution from 'min' to 'max' inclusive.
- Parameters:
min
- The minimum value each element can be.max
- The maximum value each element can be.mat
- The matrix who is to be randomized. Modified.rand
- Random number generator used to fill the matrix.
-
hermitianPosDef
Creates a random symmetric positive definite matrix.- Parameters:
width
- The width of the square matrix it returns.rand
- Random number generator used to make the matrix.- Returns:
- The random symmetric positive definite matrix.
-
hermitian
Creates a random Hermitian matrix with elements from min to max value.- Parameters:
length
- Width and height of the matrix.min
- Minimum value an element can have.max
- Maximum value an element can have.rand
- Random number generator.- Returns:
- A symmetric matrix.
-
fillHermitian
Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.- Parameters:
A
- The matrix that is to be modified. Must be square. Modified.min
- Minimum value an element can have.max
- Maximum value an element can have.rand
- Random number generator.
-