Class RandomMatrices_CDRM

java.lang.Object
org.ejml.dense.row.RandomMatrices_CDRM

@Generated("org.ejml.dense.row.RandomMatrices_ZDRM") public class RandomMatrices_CDRM extends Object
Contains a list of functions for creating random row complex matrices and vectors with different structures.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    fillHermitian(CMatrixRMaj A, float min, float max, Random rand)
    Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.
    static void
    fillUniform(CMatrixD1 mat, float min, float max, Random rand)
    Sets each element in the matrix to a value drawn from an uniform distribution from 'min' to 'max' inclusive.
    static void
    Sets each element in the matrix to a value drawn from an uniform distribution from 0 to 1 inclusive.
    hermitian(int length, float min, float max, Random rand)
    Creates a random Hermitian matrix with elements from min to max value.
    hermitianPosDef(int width, Random rand)
    Creates a random symmetric positive definite matrix.
    rectangle(int numRow, int numCol, float min, float max, Random rand)
    Returns a matrix where all the elements are selected independently from a uniform distribution between 'min' and 'max' inclusive.
    rectangle(int numRow, int numCol, Random rand)
    Returns a matrix where all the elements are selected independently from a uniform distribution between -1 and 1 inclusive.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • rectangle

      public static CMatrixRMaj rectangle(int numRow, int numCol, Random rand)

      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

      public static CMatrixRMaj rectangle(int numRow, int numCol, float min, float max, Random rand)

      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

      public static void fillUniform(CMatrixRMaj mat, Random rand)

      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

      public static void fillUniform(CMatrixD1 mat, float min, float max, Random rand)

      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

      public static CMatrixRMaj hermitianPosDef(int width, Random rand)
      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

      public static CMatrixRMaj hermitian(int length, float min, float max, Random rand)
      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

      public static void fillHermitian(CMatrixRMaj A, float min, float max, Random rand)
      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.