Class RandomMatrices_FSCC


  • public class RandomMatrices_FSCC
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void ensureNotSingular​(org.ejml.data.FMatrixSparseCSC 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, float minFill, float maxFill, java.util.Random rand)  
      static org.ejml.data.FMatrixSparseCSC rectangle​(int numRows, int numCols, int nz_total, float min, float 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.FMatrixSparseCSC rectangle​(int numRows, int numCols, int nz_total, java.util.Random rand)  
      static org.ejml.data.FMatrixSparseCSC symmetric​(int N, int nz_total, float min, float max, java.util.Random rand)
      Creates a random symmetric matrix.
      static org.ejml.data.FMatrixSparseCSC symmetricPosDef​(int width, float probabilityZero, java.util.Random rand)
      Creates a random symmetric positive definite matrix with zero values.
      static org.ejml.data.FMatrixSparseCSC triangle​(boolean upper, int N, float minFill, float maxFill, java.util.Random rand)
      Creates a triangular matrix where the amount of fill is randomly selected too.
      static org.ejml.data.FMatrixSparseCSC triangleLower​(int dimen, int hessenberg, int nz_total, float min, float 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.FMatrixSparseCSC triangleUpper​(int dimen, int hessenberg, int nz_total, float min, float max, java.util.Random rand)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RandomMatrices_FSCC

        public RandomMatrices_FSCC()
    • Method Detail

      • rectangle

        public static org.ejml.data.FMatrixSparseCSC rectangle​(int numRows,
                                                               int numCols,
                                                               int nz_total,
                                                               float min,
                                                               float max,
                                                               java.util.Random rand)
        Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.
        Parameters:
        numRows - Number of rows
        numCols - Number of columns
        nz_total - Total number of non-zero elements in the matrix
        min - Minimum element value, inclusive
        max - Maximum element value, inclusive
        rand - Random number generator
        Returns:
        Randomly generated matrix
      • rectangle

        public static org.ejml.data.FMatrixSparseCSC rectangle​(int numRows,
                                                               int numCols,
                                                               int nz_total,
                                                               java.util.Random rand)
      • symmetric

        public static org.ejml.data.FMatrixSparseCSC symmetric​(int N,
                                                               int nz_total,
                                                               float min,
                                                               float max,
                                                               java.util.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 columns
        nz_total - Number of nonzero elements in the triangular portion of the matrix
        min - Minimum element value, inclusive
        max - Maximum element value, inclusive
        rand - 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,
                                                                   java.util.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 columns
        hessenberg - 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, inclusive
        max - Maximum element value, inclusive
        rand - 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,
                                                                   java.util.Random rand)
      • nonzero

        public static int nonzero​(int numRows,
                                  int numCols,
                                  float minFill,
                                  float maxFill,
                                  java.util.Random rand)
      • triangle

        public static org.ejml.data.FMatrixSparseCSC triangle​(boolean upper,
                                                              int N,
                                                              float minFill,
                                                              float maxFill,
                                                              java.util.Random rand)
        Creates a triangular matrix where the amount of fill is randomly selected too.
        Parameters:
        upper - true for upper triangular and false for lower
        N - number of rows and columns er * @param minFill minimum fill fraction
        maxFill - maximum fill fraction
        rand - random number generator
        Returns:
        Random matrix
      • symmetricPosDef

        public static org.ejml.data.FMatrixSparseCSC symmetricPosDef​(int width,
                                                                     float probabilityZero,
                                                                     java.util.Random rand)
        Creates a random symmetric positive definite matrix with zero values.
        Parameters:
        width - number of columns and rows
        probabilityZero - How likely a value is of being zero. 0 = no zeros. 1.0f = all zeros
        rand - random number generator
        Returns:
        Random matrix
      • ensureNotSingular

        public static void ensureNotSingular​(org.ejml.data.FMatrixSparseCSC A,
                                             java.util.Random rand)
        Modies the matrix to make sure that at least one element in each column has a value