Utilities to work with matrices. More...
Static Public Member Functions | |
| static double | ColumnAverage (this Matrix< double > matrix, int col) |
| Compute the average value of the entries in a column of a matrix. | |
| static void | ColumnInitNormal (this Matrix< double > matrix, int column, double mean, double stddev) |
| Initializes one column of a double matrix with normal distributed (Gaussian) noise. | |
| static double | FrobeniusNorm (this Matrix< double > matrix) |
| Compute the Frobenius norm (square root of the sum of squared entries) of a matrix. | |
| static void | Inc (this Matrix< double > matrix, double d) |
| Increment all entries of a matrix with a scalar. | |
| static void | Inc (this Matrix< int > matrix, int i, int j) |
| Increments the specified matrix element by 1. | |
| static void | Inc (this Matrix< double > matrix1, Matrix< double > matrix2) |
| Increment the elements in one matrix by the ones in another. | |
| static void | Inc (this Matrix< double > matrix, int i, int j, double v) |
| Increments the specified matrix element by a double value. | |
| static void | InitNormal (this Matrix< double > matrix, double mean, double stddev) |
| Initializes a double matrix with normal distributed (Gaussian) noise. | |
| static float | Max (this Matrix< float > m) |
| return the maximum value contained in a matrix | |
| static double | Max (this Matrix< double > m) |
| return the maximum value contained in a matrix | |
| static int | Max (this Matrix< int > m) |
| return the maximum value contained in a matrix | |
| static void | Multiply (this Matrix< double > matrix, double d) |
| Multiply all entries of a matrix with a scalar. | |
| static double | RowAverage (this Matrix< double > matrix, int row) |
| Compute the average value of the entries in a row of a matrix. | |
| static IList< double > | RowDifference (Matrix< double > matrix1, int i, Matrix< double > matrix2, int j) |
| Compute the difference vector between two rows of two matrices. | |
| static void | RowInitNormal (this Matrix< double > matrix, int row, double mean, double stddev) |
| Initializes one row of a double matrix with normal distributed (Gaussian) noise. | |
| static double | RowScalarProduct (Matrix< double > matrix1, int i, Matrix< double > matrix2, int j) |
| Compute the scalar product between two rows of two matrices. | |
| static double | RowScalarProduct (Matrix< double > matrix, int i, IList< double > vector) |
| Compute the scalar product between a vector and a row of the matrix. | |
| static double | RowScalarProductWithRowDifference (Matrix< double > matrix1, int i, Matrix< double > matrix2, int j, Matrix< double > matrix3, int k) |
| Compute the scalar product of a matrix row with the difference vector of two other matrix rows. | |
Utilities to work with matrices.
| static double ColumnAverage | ( | this Matrix< double > | matrix, | |
| int | col | |||
| ) | [inline, static] |
Compute the average value of the entries in a column of a matrix.
| matrix | the matrix | |
| col | the column ID |
| static void ColumnInitNormal | ( | this Matrix< double > | matrix, | |
| int | column, | |||
| double | mean, | |||
| double | stddev | |||
| ) | [inline, static] |
Initializes one column of a double matrix with normal distributed (Gaussian) noise.
| matrix | the matrix to initialize | |
| mean | the mean of the normal distribution drawn from | |
| stddev | the standard deviation of the normal distribution | |
| column | the column to be initialized |
| static double FrobeniusNorm | ( | this Matrix< double > | matrix | ) | [inline, static] |
Compute the Frobenius norm (square root of the sum of squared entries) of a matrix.
See http://en.wikipedia.org/wiki/Matrix_norm
| matrix | the matrix |
| static void Inc | ( | this Matrix< double > | matrix, | |
| double | d | |||
| ) | [inline, static] |
Increment all entries of a matrix with a scalar.
| matrix | the matrix | |
| d | the number to increment with |
| static void Inc | ( | this Matrix< int > | matrix, | |
| int | i, | |||
| int | j | |||
| ) | [inline, static] |
Increments the specified matrix element by 1.
| matrix | the matrix | |
| i | the row | |
| j | the column |
| static void Inc | ( | this Matrix< double > | matrix1, | |
| Matrix< double > | matrix2 | |||
| ) | [inline, static] |
Increment the elements in one matrix by the ones in another.
| matrix1 | the matrix to be incremented | |
| matrix2 | the other matrix |
| static void Inc | ( | this Matrix< double > | matrix, | |
| int | i, | |||
| int | j, | |||
| double | v | |||
| ) | [inline, static] |
Increments the specified matrix element by a double value.
| matrix | the matrix | |
| i | the row | |
| j | the column | |
| v | the value |
| static void InitNormal | ( | this Matrix< double > | matrix, | |
| double | mean, | |||
| double | stddev | |||
| ) | [inline, static] |
Initializes a double matrix with normal distributed (Gaussian) noise.
| matrix | the matrix to initialize | |
| mean | the mean of the normal distribution drawn from | |
| stddev | the standard deviation of the normal distribution |
| static float Max | ( | this Matrix< float > | m | ) | [inline, static] |
return the maximum value contained in a matrix
| m | the matrix |
| static double Max | ( | this Matrix< double > | m | ) | [inline, static] |
return the maximum value contained in a matrix
| m | the matrix |
| static int Max | ( | this Matrix< int > | m | ) | [inline, static] |
return the maximum value contained in a matrix
| m | the matrix |
| static void Multiply | ( | this Matrix< double > | matrix, | |
| double | d | |||
| ) | [inline, static] |
Multiply all entries of a matrix with a scalar.
| matrix | the matrix | |
| d | the number to multiply with |
| static double RowAverage | ( | this Matrix< double > | matrix, | |
| int | row | |||
| ) | [inline, static] |
Compute the average value of the entries in a row of a matrix.
| matrix | the matrix | |
| row | the row ID |
| static IList<double> RowDifference | ( | Matrix< double > | matrix1, | |
| int | i, | |||
| Matrix< double > | matrix2, | |||
| int | j | |||
| ) | [inline, static] |
Compute the difference vector between two rows of two matrices.
| matrix1 | the first matrix | |
| i | the first row ID | |
| matrix2 | the second matrix | |
| j | the second row ID |
| static void RowInitNormal | ( | this Matrix< double > | matrix, | |
| int | row, | |||
| double | mean, | |||
| double | stddev | |||
| ) | [inline, static] |
Initializes one row of a double matrix with normal distributed (Gaussian) noise.
| matrix | the matrix to initialize | |
| row | the row to be initialized | |
| mean | the mean of the normal distribution drawn from | |
| stddev | the standard deviation of the normal distribution |
| static double RowScalarProduct | ( | Matrix< double > | matrix1, | |
| int | i, | |||
| Matrix< double > | matrix2, | |||
| int | j | |||
| ) | [inline, static] |
Compute the scalar product between two rows of two matrices.
| matrix1 | the first matrix | |
| i | the first row ID | |
| matrix2 | the second matrix | |
| j | the second row ID |
| static double RowScalarProduct | ( | Matrix< double > | matrix, | |
| int | i, | |||
| IList< double > | vector | |||
| ) | [inline, static] |
Compute the scalar product between a vector and a row of the matrix.
| matrix | the matrix | |
| i | the row ID | |
| vector | the numeric vector |
| static double RowScalarProductWithRowDifference | ( | Matrix< double > | matrix1, | |
| int | i, | |||
| Matrix< double > | matrix2, | |||
| int | j, | |||
| Matrix< double > | matrix3, | |||
| int | k | |||
| ) | [inline, static] |
Compute the scalar product of a matrix row with the difference vector of two other matrix rows.
| matrix1 | the first matrix | |
| i | the first row ID | |
| matrix2 | the second matrix | |
| j | the second row ID | |
| matrix3 | the third matrix | |
| k | the third row ID |
///
1.6.3