Class RandomMatrices_ZDRM

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

public class RandomMatrices_ZDRM 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(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
    Sets each element in the matrix to a value drawn from an uniform distribution from 0 to 1 inclusive.
    hermitian(int length, double min, double 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, double min, double 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 ZMatrixRMaj 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 ZMatrixRMaj rectangle(int numRow, int numCol, double min, double 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(ZMatrixRMaj 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(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.

      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 ZMatrixRMaj 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 ZMatrixRMaj hermitian(int length, double min, double 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(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.
      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.