Method | Description | |
---|---|---|
Center ( VectorType t ) : Matrix |
In place centering. WARNING: WILL UPDATE MATRIX!
|
|
Cholesky ( Matrix m ) : Matrix |
Cholesky Factorization of a Matrix.
|
|
Col ( int i ) : |
Cols.
|
|
Copy ( ) : Matrix |
create deep copy of matrix.
|
|
Correlation ( Matrix source, VectorType t = VectorType.Col ) : Matrix |
Correlations.
|
|
Covariance ( Matrix source, VectorType t = VectorType.Col ) : Matrix |
Covariances.
|
|
CovarianceDiag ( Matrix source, VectorType t = VectorType.Col ) : |
Covariance diagram.
|
|
Create ( int n, Func |
Creates a new Matrix.
|
|
Create ( int n, Func |
Creates a new Matrix.
|
|
Create ( int n, int d, Func |
Creates a new Matrix.
|
|
Create ( int n, int d, Func |
Creates a new Matrix.
|
|
Det ( Matrix x ) : double |
Dets the given x coordinate.
|
|
Diag ( Matrix m ) : |
Diagrams the given m.
|
|
Dot ( Matrix x, |
Dot product between a matrix and a vector.
|
|
Dot ( |
Dot product between a matrix and a vector.
|
|
Each ( Matrix m, double>.Func |
Performs an element wise operation on the input Matrix.
|
|
Each ( Matrix m, Func |
Performs an element wise operation on the input Matrix.
|
|
Each ( Matrix m1, Matrix m2, Func |
Performs an element-wise operation on the input Matrices.
|
|
Equals ( Matrix m, double tol ) : bool |
Determines whether the specified T:System.Object is equal to the current T:System.Object.
|
|
Equals ( object obj ) : bool |
Determines whether the specified T:System.Object is equal to the current T:System.Object.
|
|
Evd ( Matrix A ) : Matrix>.Tuple |
Eigen Decomposition.
|
|
Extract ( Matrix m, int x, int y, int width, int height, bool safe = true ) : Matrix |
Extracts this object.
|
|
FrobeniusNorm ( Matrix A ) : double |
Matrix Frobenius Norm.
|
|
GetCols ( ) : IEnumerable |
Gets the cols in this collection.
|
|
GetHashCode ( ) : int |
Serves as a hash function for a particular type.
|
|
GetMatrix ( int d1, int d2, int n1, int n2 ) : Matrix |
Gets a matrix.
|
|
GetRows ( ) : IEnumerable |
Gets the rows in this collection.
|
|
GetVector ( int index, int from, int to, VectorType type ) : |
Gets a vector.
|
|
Identity ( int n ) : Matrix |
n x n identity matrix.
|
|
Identity ( int n, int d ) : Matrix |
n x d identity matrix.
|
|
Indices ( Matrix source, bool>.Func |
Enumerates indices in this collection.
|
|
Indices ( Matrix source, bool>.Func |
Enumerates indices in this collection.
|
|
Insert ( |
Returns a new Matrix with the Vector inserted at the specified position
|
|
Inverse ( ) : Matrix |
Creates an inverse of the current matrix
|
|
LU ( Matrix A ) : Tuple |
NOT IMPLEMENTED!
|
|
Load ( string file ) : Matrix |
Loads the given stream.
|
|
Matrix ( double m ) : System |
Create new matrix with prepopulated vals.
|
|
Matrix ( int n ) : System |
Create matrix n x n matrix.
|
|
Matrix ( int n, int d ) : System |
Create new n x d matrix.
|
|
Max ( Matrix source, VectorType t = VectorType.Col ) : |
Returns a vector of the maximum values for each row/column.
|
|
Max ( Matrix source ) : double |
Determines the maximum of the given parameters.
|
|
Mean ( Matrix source, VectorType t ) : |
Determines the mean of the given parameters.
|
|
Median ( Matrix source, VectorType t = VectorType.Col ) : |
Returns a vector of the median values for each row or column.
|
|
Min ( Matrix source, VectorType t = VectorType.Col ) : |
Returns a vector of the minimum values for each row/column.
|
|
Min ( Matrix source ) : double |
Determines the minimum of the given parameters.
|
|
Norm ( Matrix A, double p ) : double |
Standard Matrix Norm.
|
|
NormRand ( |
Normalise random.
|
|
NormRand ( int n, double min ) : Matrix |
Normalise random.
|
|
NormRand ( int n, int d, double min ) : Matrix |
Normalise random.
|
|
Normalize ( VectorType t ) : void |
In place normalization. WARNING: WILL UPDATE MATRIX!
|
|
Parse ( string text ) : Matrix |
Parses a string containing MATLAB style Matrix syntax, i.e. "[[1, 2, 3]; [3, 4, 5]]"
|
|
Pivot ( Matrix M ) : Matrix |
Pivots the given m.
|
|
QR ( Matrix A ) : Matrix>.Tuple |
Modified Gram-Schmidt QR Factorization.
|
|
Rand ( int n, double min ) : Matrix |
Generate a matrix n x d with numbers 0 less than x less than 1 drawn uniformly at random.
|
|
Rand ( int n, int d, double min ) : Matrix |
Generate a matrix n x d with numbers 0 less than x less than 1 drawn uniformly at random.
|
|
Remove ( int index, VectorType t ) : Matrix |
Removes this object.
|
|
Reshape ( Matrix m, int rows, int cols ) : Matrix |
Reshapes the supplied matrix into a new matrix shape.
|
|
Reshape ( |
Reshapes the supplied Vector into a Matrix form.
|
|
Reshape ( |
Reshapes the supplied Vector into a Matrix form.
|
|
Reverse ( Matrix source, VectorType t = VectorType.Row ) : IEnumerable |
Enumerates reverse in this collection.
|
|
Round ( Matrix m, int decimals ) : Matrix |
Matrix Roundoff.
|
|
Row ( int i ) : |
Rows.
|
|
SVD ( Matrix A ) : Tuple |
Singular Value Decomposition.
|
|
Save ( string file ) : void |
Save matrix to file
|
|
Slice ( Matrix m, IEnumerable |
Slices.
|
|
Slice ( Matrix m, IEnumerable |
Slices.
|
|
Sort ( Matrix source, double>.Func |
Sorts the given Matrix by the specified row or column selector and returns the new Matrix
|
|
Sort ( Matrix source, double>.Func |
Sorts the given Matrix by the specified row or column selector and returns the new Matrix along with the original indices.
|
|
Stack ( ) : Matrix |
Stack a set of vectors into a matrix.
|
|
Stack ( Matrix m, Matrix t ) : Matrix |
Stack a set of vectors into a matrix.
|
|
Stats ( Matrix x, VectorType t = VectorType.Row ) : Matrix[] |
Statistics.
|
|
StdDev ( Matrix source, VectorType t = VectorType.Col ) : |
Computes the standard deviation of the given matrix
|
|
Sum ( Matrix m, VectorType t ) : |
Computes the sum of either the rows or columns of a matrix and returns a vector.
|
|
Sum ( Matrix m ) : double |
Computes the sum of every element of the matrix.
|
|
Sum ( Matrix m, int i, VectorType t ) : double |
Computes the sum of every element of the matrix.
|
|
Swap ( int from, int to, VectorType t ) : void |
Swaps.
|
|
SwapCol ( int from, int to ) : void |
Swap col.
|
|
SwapRow ( int from, int to ) : void |
Swap row.
|
|
ToString ( ) : string |
Returns a string that represents the current object.
|
|
ToVector ( ) : |
Converts this object to a vector.
|
|
Trace ( Matrix m ) : double |
Computes the trace of a matrix.
|
|
Transpose ( ) : Matrix |
Deep copy transpose.
|
|
Unshape ( Matrix m, VectorType dimensionType = VectorType.Col ) : |
Unshapes the given Matrix into a Vector form along the dimensionType axis. Reads from the source Matrix and stacks from right to left when dimensionType equals 'Col' otherwise uses a bottom up approach.
|
|
VStack ( ) : Matrix |
Stacks.
|
|
VStack ( Matrix m, Matrix t ) : Matrix |
Stacks.
|
|
Zeros ( int n ) : Matrix |
Initial Zero Matrix (n by n)
|
|
Zeros ( int n, int d ) : Matrix |
Initial zero matrix.
|
|
operator ( ) : IEnumerable |
Returns an array of index (i, j) pairs matching indices that are not equal to the supplied value.
|
|
operator ( ) : Matrix |
matrix multiplication.
|
|
operator ( ) : |
Solves Ax = b for x If A is not square or the system is overdetermined, this operation solves the linear least squares A.T * A x = A.T * b.
|
|
operator ( ) : bool |
Inequality operator.
|
|
this ( bool>.Func |
Indexer to get items within this collection using array index syntax.
|
|
this ( int i ) : |
Returns row vector specified at index i.
|
|
this ( int i, VectorType t ) : |
returns col/row vector at index j.
|
|
this ( bool>.Func |
Indexer to set items within this collection using array index syntax.
|
|
this ( IEnumerable |
Indexer to set items within this collection using an n x 2 array of indices to set.
|
|
this ( int i, int j ) : double |
Accessor.
|
Method | Description | |
---|---|---|
Backward ( Matrix A, |
Backwards.
|
|
Forward ( Matrix A, |
Forwards.
|
|
Inverse ( Matrix mat ) : Matrix |
Inverses the given matrix.
|
|
Matrix ( ) : System |
Used only internally.
|
|
Stack ( VectorType type ) : Matrix |
Stack a set of vectors into a matrix.
|
|
ToArray ( ) : double[][] |
Performs a deep copy of the underlying matrix and returns a 2D array.
|
|
ToTransposeArray ( ) : double[][] |
Performs a deep copy of the underlying matrix, transpose it and returns a 2D array.
|
public static Cholesky ( Matrix m ) : Matrix | ||
m | Matrix | Input Matrix. |
return | Matrix |
public static Correlation ( Matrix source, VectorType t = VectorType.Col ) : Matrix | ||
source | Matrix | Source for the. |
t | VectorType | (Optional) Row or Column sum. |
return | Matrix |
public static Covariance ( Matrix source, VectorType t = VectorType.Col ) : Matrix | ||
source | Matrix | Source for the. |
t | VectorType | (Optional) Row or Column sum. |
return | Matrix |
public static CovarianceDiag ( Matrix source, VectorType t = VectorType.Col ) : |
||
source | Matrix | Source for the. |
t | VectorType | (Optional) Row or Column sum. |
return |
public static Create ( int n, Func |
||
n | int | Size. |
f | Func |
The Func<int,int,double> to process. |
return | Matrix |
public static Create ( int n, Func |
||
n | int | Size. |
f | Func |
The Func<int,int,double> to process. |
return | Matrix |
public static Create ( int n, int d, Func |
||
n | int | Size. |
d | int | cols. |
f | Func |
The Func<int,int,double> to process. |
return | Matrix |
public static Create ( int n, int d, Func |
||
n | int | Size. |
d | int | cols. |
f | Func |
The Func<int,int,double> to process. |
return | Matrix |
public static Diag ( Matrix m ) : |
||
m | Matrix | Input Matrix. |
return |
public static Dot ( Matrix x, |
||
x | Matrix | Matrix x. |
v | Vector v. | |
return |
public static Dot ( |
||
v | Vector v. | |
x | Matrix | Matrix x. |
return |
public static Each ( Matrix m, double>.Func |
||
m | Matrix | Matrix. |
fnElementWiseOp | double>.Func | Function to apply. |
return | Matrix |
public static Each ( Matrix m, Func |
||
m | Matrix | Matrix. |
fnElementWiseOp | Func |
Function to update each cell specified by the value and cell coordinates. |
return | Matrix |
public static Each ( Matrix m1, Matrix m2, Func |
||
m1 | Matrix | First Matrix. |
m2 | Matrix | Second Matrix. |
fnElementWiseOp | Func |
Operation to perform on the value from the first and second matrices. |
return | Matrix |
public Equals ( Matrix m, double tol ) : bool | ||
m | Matrix | initial matrix. |
tol | double | Double to be compared. |
return | bool |
public Equals ( object obj ) : bool | ||
obj | object | The object to compare with the current object. |
return | bool |
public static Evd ( Matrix A ) : Matrix>.Tuple |
||
A | Matrix | Input Matrix. |
return | Matrix>.Tuple |
public static Extract ( Matrix m, int x, int y, int width, int height, bool safe = true ) : Matrix | ||
m | Matrix | Input Matrix. |
x | int | Matrix x. |
y | int | The y coordinate. |
width | int | The width. |
height | int | The height. |
safe | bool | (Optional) true to safe. |
return | Matrix |
public static FrobeniusNorm ( Matrix A ) : double | ||
A | Matrix | Input Matrix. |
return | double |
public GetMatrix ( int d1, int d2, int n1, int n2 ) : Matrix | ||
d1 | int | The first int. |
d2 | int | The second int. |
n1 | int | The first int. |
n2 | int | The second int. |
return | Matrix |
public GetVector ( int index, int from, int to, VectorType type ) : |
||
index | int | Zero-based index of the. |
from | int | Source for the. |
to | int | to. |
type | VectorType | The type. |
return |
public static Identity ( int n, int d ) : Matrix | ||
n | int | rows. |
d | int | cols. |
return | Matrix |
public static Indices ( Matrix source, bool>.Func |
||
source | Matrix | Source for the. |
f | bool>.Func | The Func<Vector,bool> to process. |
return | IEnumerable |
public static Indices ( Matrix source, bool>.Func |
||
source | Matrix | Source for the. |
f | bool>.Func | The Func<Vector,bool> to process. |
t | VectorType | Row or Column sum. |
return | IEnumerable |
public Insert ( |
||
v | Vector to insert | |
index | int | The zero based row / column. |
t | VectorType | Vector orientation |
insertAfter | bool | Insert after or before the last row / column |
return | Matrix |
public static Load ( string file ) : Matrix | ||
file | string | The file to load. |
return | Matrix |
public Matrix ( int n, int d ) : System | ||
n | int | rows. |
d | int | cols. |
return | System |
public static Max ( Matrix source, VectorType t = VectorType.Col ) : |
||
source | Matrix | |
t | VectorType | Use column or row (default: Col) |
return |
public static Max ( Matrix source ) : double | ||
source | Matrix | Source for the. |
return | double |
public static Mean ( Matrix source, VectorType t ) : |
||
source | Matrix | Source for the. |
t | VectorType | Row or Column sum. |
return |
public static Median ( Matrix source, VectorType t = VectorType.Col ) : |
||
source | Matrix | Matrix. |
t | VectorType | VectorType. |
return |
public static Min ( Matrix source, VectorType t = VectorType.Col ) : |
||
source | Matrix | |
t | VectorType | Use column or row (default: Col) |
return |
public static Min ( Matrix source ) : double | ||
source | Matrix | Source for the. |
return | double |
public static Norm ( Matrix A, double p ) : double | ||
A | Matrix | Input Matrix. |
p | double | The double to process. |
return | double |
public static NormRand ( |
||
means | The means. | |
stdDev | The standard development. | |
n | int | Size. |
return | Matrix |
public static NormRand ( int n, double min ) : Matrix | ||
n | int | Size. |
min | double | (Optional) the minimum. |
return | Matrix |
public static NormRand ( int n, int d, double min ) : Matrix | ||
n | int | Size. |
d | int | cols. |
min | double | (Optional) the minimum. |
return | Matrix |
public static Parse ( string text ) : Matrix | ||
text | string | Input string to parse. |
return | Matrix |
public static Pivot ( Matrix M ) : Matrix | ||
M | Matrix | The Matrix to process. |
return | Matrix |
public static QR ( Matrix A ) : Matrix>.Tuple |
||
A | Matrix | Matrix A. |
return | Matrix>.Tuple |
public static Rand ( int n, double min ) : Matrix | ||
n | int | rows. |
min | double | (Optional) the minimum. |
return | Matrix |
public static Rand ( int n, int d, double min ) : Matrix | ||
n | int | rows. |
d | int | cols. |
min | double | (Optional) the minimum. |
return | Matrix |
public Remove ( int index, VectorType t ) : Matrix | ||
index | int | Zero-based index of the. |
t | VectorType | . |
return | Matrix |
public static Reshape ( Matrix m, int rows, int cols ) : Matrix | ||
m | Matrix | Matrix to reshape. |
rows | int | Number of rows of the new matrix. |
cols | int | Number of columns of the new matrix. |
return | Matrix |
public static Reshape ( |
||
v | Source vector to act on. | |
dimension | int | Length of the specified dimension. |
dimensionType | VectorType | Dimension type to use for creating a |
byVector | VectorType | Direction to process, i.e. Row = Fill Down then Right, or Col = Fill Right then Down |
return | Matrix |
public static Reshape ( |
||
v | Vector to reshape. | |
rows | int | Height of the matrix to return |
columns | int | Width of the matrix to return |
byVector | VectorType | Direction to process, i.e. Row = Fill Down then Right, or Col = Fill Right then Down |
return | Matrix |
public static Reverse ( Matrix source, VectorType t = VectorType.Row ) : IEnumerable |
||
source | Matrix | Source for the. |
t | VectorType | (Optional) Row or Column sum. |
return | IEnumerable |
public static Round ( Matrix m, int decimals ) : Matrix | ||
m | Matrix | Input Matrix. |
decimals | int | (Optional) Max number of decimals (default 0 - integral members) |
return | Matrix |
public static SVD ( Matrix A ) : Tuple |
||
A | Matrix | Input Matrix. |
return | Tuple |
public static Slice ( Matrix m, IEnumerable |
||
m | Matrix | Input Matrix. |
indices | IEnumerable |
The indices. |
return | Matrix |
public static Slice ( Matrix m, IEnumerable |
||
m | Matrix | Input Matrix. |
indices | IEnumerable |
The indices. |
t | VectorType | Row or Column sum. |
return | Matrix |
public static Sort ( Matrix source, double>.Func |
||
source | Matrix | The Matrix |
keySelector | double>.Func | Property selector to sort by. |
t | VectorType | Specifies whether to sort horizontally or vertically. |
ascending | bool | Determines whether to sort ascending or descending (Default: True) |
return | Matrix |
public static Sort ( Matrix source, double>.Func |
||
source | Matrix | The Matrix |
keySelector | double>.Func | Property selector to sort by. |
t | VectorType | Specifies whether to sort horizontally or vertically. |
ascending | bool | Determines whether to sort ascending or descending (Default: True) |
indices | Vector of |
|
return | Matrix |
public static Stack ( Matrix m, Matrix t ) : Matrix | ||
m | Matrix | Input Matrix. |
t | Matrix | Row or Column sum. |
return | Matrix |
public static Stats ( Matrix x, VectorType t = VectorType.Row ) : Matrix[] | ||
x | Matrix | Matrix x. |
t | VectorType | (Optional) Row or Column sum. |
return | Matrix[] |
public static StdDev ( Matrix source, VectorType t = VectorType.Col ) : |
||
source | Matrix | |
t | VectorType | Use column or row (default: Col) |
return |
public static Sum ( Matrix m, VectorType t ) : |
||
m | Matrix | Input Matrix. |
t | VectorType | Row or Column sum. |
return |
public static Sum ( Matrix m ) : double | ||
m | Matrix | Input Matrix. |
return | double |
public static Sum ( Matrix m, int i, VectorType t ) : double | ||
m | Matrix | Input Matrix. |
i | int | Zero-based index of the. |
t | VectorType | Row or Column sum. |
return | double |
public Swap ( int from, int to, VectorType t ) : void | ||
from | int | Source for the. |
to | int | to. |
t | VectorType | . |
return | void |
public SwapCol ( int from, int to ) : void | ||
from | int | Source for the. |
to | int | to. |
return | void |
public SwapRow ( int from, int to ) : void | ||
from | int | Source for the. |
to | int | to. |
return | void |
public static Trace ( Matrix m ) : double | ||
m | Matrix | Input Matrix. |
return | double |
public static Unshape ( Matrix m, VectorType dimensionType = VectorType.Col ) : |
||
m | Matrix | The Matrix to act on. |
dimensionType | VectorType | Type of the dimension to use when unrolling the Matrix. |
return |
public static VStack ( Matrix m, Matrix t ) : Matrix | ||
m | Matrix | Input Matrix. |
t | Matrix | Row or Column sum. |
return | Matrix |
public static Zeros ( int n, int d ) : Matrix | ||
n | int | . |
d | int | . |
return | Matrix |
public this ( bool>.Func |
||
f | bool>.Func | The Func<Vector,bool> to process. |
t | VectorType | The VectorType to process. |
return | Matrix |
public this ( int i, VectorType t ) : |
||
i | int | Col/Row. |
t | VectorType | Row or Column. |
return |
public this ( bool>.Func |
||
f | bool>.Func | The Func<double,bool> to process. |
return | double |
public this ( IEnumerable |
||
slice | IEnumerable |
An n x 2 array of indices to set. |
return | double |