Matrix Library .Net v2.0 By Anas Abidi, 2004. More...
Public Member Functions | |
Matrix (int noRows, int noCols) | |
Matrix object constructor, constructs an empty matrix with dimensions: rows = noRows and cols = noCols. More... | |
Matrix (double[,] Mat) | |
Matrix object constructor, constructs a matrix from an already defined array object. More... | |
override bool | Equals (Object obj) |
Tests whether the specified object is a MatrixLibrary.Matrix object and is identical to this MatrixLibrary.Matrix object. More... | |
override string | ToString () |
Returns the matrix as a string, so it can be viewed in a multi-text textbox or in a richtextBox (preferred). In case of an error the error is raised as an exception. More... | |
Static Public Member Functions | |
static double[,] | OneD_2_TwoD (double[] Mat) |
Returns the 2D form of a 1D array. i.e. array with dimension[n] is returned as an array with dimension [n,1]. In case of an error the error is raised as an exception. More... | |
static double[] | TwoD_2_OneD (double[,] Mat) |
Returns the 1D form of a 2D array. i.e. array with dimension[n,1] is returned as an array with dimension [n]. In case of an error the error is raised as an exception. More... | |
static double[,] | Identity (int n) |
Returns an Identity matrix with dimensions [n,n] in the from of an array. More... | |
static double[,] | Add (double[,] Mat1, double[,] Mat2) |
Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static Matrix | Add (Matrix Mat1, Matrix Mat2) |
Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static Matrix | operator+ (Matrix Mat1, Matrix Mat2) |
Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static double[,] | Subtract (double[,] Mat1, double[,] Mat2) |
Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static Matrix | Subtract (Matrix Mat1, Matrix Mat2) |
Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static Matrix | operator- (Matrix Mat1, Matrix Mat2) |
Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static double[,] | Multiply (double[,] Mat1, double[,] Mat2) |
Returns the multiplication of two matrices with compatible dimensions. In case of an error the error is raised as an exception. More... | |
static Matrix | Multiply (Matrix Mat1, Matrix Mat2) |
Returns the multiplication of two matrices with compatible dimensions OR the cross-product of two vectors. In case of an error the error is raised as an exception. More... | |
static Matrix | operator* (Matrix Mat1, Matrix Mat2) |
Returns the multiplication of two matrices with compatible dimensions OR the cross-product of two vectors. In case of an error the error is raised as an exception. More... | |
static double | Det (double[,] Mat) |
Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception. More... | |
static double | Det (Matrix Mat) |
Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception. More... | |
static double[,] | Inverse (double[,] Mat) |
Returns the inverse of a matrix with [n,n] dimension and whose determinant is not zero. In case of an error the error is raised as an exception. More... | |
static Matrix | Inverse (Matrix Mat) |
Returns the inverse of a matrix with [n,n] dimension and whose determinant is not zero. In case of an error the error is raised as an exception. More... | |
static double[,] | Transpose (double[,] Mat) |
Returns the transpose of a matrix. In case of an error the error is raised as an exception. More... | |
static Matrix | Transpose (Matrix Mat) |
Returns the transpose of a matrix. In case of an error the error is raised as an exception. More... | |
static void | SVD (double[,] Mat_, out double[,] S_, out double[,] U_, out double[,] V_) |
Evaluates the Singular Value Decomposition of a matrix, returns the matrices S, U and V. Such that a given Matrix = U x S x V'. In case of an error the error is raised as an exception. Note: This method is based on the 'Singular Value Decomposition' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static void | SVD (Matrix Mat, out Matrix S, out Matrix U, out Matrix V) |
Evaluates the Singular Value Decomposition of a matrix, returns the matrices S, U and V. Such that a given Matrix = U x S x V'. In case of an error the error is raised as an exception. Note: This method is based on the 'Singular Value Decomposition' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static void | LU (double[,]Mat, out double[,]L, out double[,] U, out double[,] P) |
Returns the LU Decomposition of a matrix. the output is: lower triangular matrix L, upper triangular matrix U, and permutation matrix P so that P*X = L*U. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static void | LU (Matrix Mat, out Matrix L, out Matrix U, out Matrix P) |
Returns the LU Decomposition of a matrix. the output is: lower triangular matrix L, upper triangular matrix U, and permutation matrix P so that P*X = L*U. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static double[,] | SolveLinear (double[,]MatA, double[,] MatB) |
Solves a set of n linear equations A.X = B, and returns X, where A is [n,n] and B is [n,1]. In the same manner if you need to compute: inverse(A).B, it is better to use this method instead, as it is much faster. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static Matrix | SolveLinear (Matrix MatA, Matrix MatB) |
Solves a set of n linear equations A.X = B, and returns X, where A is [n,n] and B is [n,1]. In the same manner if you need to compute: inverse(A).B, it is better to use this method instead, as it is much faster. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static int | Rank (double[,] Mat) |
Returns the rank of a matrix. In case of an error the error is raised as an exception. More... | |
static int | Rank (Matrix Mat) |
Returns the rank of a matrix. In case of an error the error is raised as an exception. More... | |
static double[,] | PINV (double[,] Mat) |
Returns the pseudoinverse of a matrix, such that X = PINV(A) produces a matrix 'X' of the same dimensions as A' so that A*X*A = A, X*A*X = X. In case of an error the error is raised as an exception. More... | |
static Matrix | PINV (Matrix Mat) |
Returns the pseudoinverse of a matrix, such that X = PINV(A) produces a matrix 'X' of the same dimensions as A' so that A*X*A = A, X*A*X = X. In case of an error the error is raised as an exception. More... | |
static void | Eigen (double[,] Mat, out double[,] d, out double[,] v) |
Returns the Eigenvalues and Eigenvectors of a real symmetric matrix, which is of dimensions [n,n]. In case of an error the error is raised as an exception. Note: This method is based on the 'Eigenvalues and Eigenvectors of a TridiagonalMatrix' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static void | Eigen (Matrix Mat, out Matrix d, out Matrix v) |
Returns the Eigenvalues and Eigenvectors of a real symmetric matrix, which is of dimensions [n,n]. In case of an error the error is raised as an exception. Note: This method is based on the 'Eigenvalues and Eigenvectors of a TridiagonalMatrix' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992. More... | |
static double[,] | ScalarMultiply (double Value, double[,] Mat) |
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception. More... | |
static Matrix | ScalarMultiply (double Value, Matrix Mat) |
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception. More... | |
static Matrix | operator* (Matrix Mat, double Value) |
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception. More... | |
static Matrix | operator* (double Value, Matrix Mat) |
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception. More... | |
static double[,] | ScalarDivide (double Value, double[,] Mat) |
Returns the division of a matrix or a vector (i.e dimension [3,1]) by a scalar quantity. In case of an error the error is raised as an exception. More... | |
static Matrix | ScalarDivide (double Value, Matrix Mat) |
Returns the division of a matrix or a vector (i.e dimension [3,1]) by a scalar quantity. In case of an error the error is raised as an exception. More... | |
static Matrix | operator/ (Matrix Mat, double Value) |
Returns the division of a matrix or a vector (i.e dimension [3,1]) by a scalar quantity. In case of an error the error is raised as an exception. More... | |
static double[] | CrossProduct (double[] V1, double[] V2) |
Returns the cross product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static double[,] | CrossProduct (double[,] V1, double[,] V2) |
Returns the cross product of two vectors whose dimensions should be [3] or [3x1]. In case of an error the error is raised as an exception. More... | |
static Matrix | CrossProduct (Matrix V1, Matrix V2) |
Returns the cross product of two vectors whose dimensions should be [3] or [3x1]. In case of an error the error is raised as an exception. More... | |
static double | DotProduct (double[] V1, double[] V2) |
Returns the dot product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static double | DotProduct (double[,] V1, double[,] V2) |
Returns the dot product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static double | DotProduct (Matrix V1, Matrix V2) |
Returns the dot product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static double | VectorMagnitude (double[] V) |
Returns the magnitude of a vector whose dimension is [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static double | VectorMagnitude (double[,] V) |
Returns the magnitude of a vector whose dimension is [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static double | VectorMagnitude (Matrix V) |
Returns the magnitude of a vector whose dimension is [3] or [3,1]. In case of an error the error is raised as an exception. More... | |
static bool | IsEqual (double[,] Mat1, double[,] Mat2) |
Checks if two Arrays of equal dimensions are equal or not. In case of an error the error is raised as an exception. More... | |
static bool | IsEqual (Matrix Mat1, Matrix Mat2) |
Checks if two matrices of equal dimensions are equal or not. In case of an error the error is raised as an exception. More... | |
static bool | operator== (Matrix Mat1, Matrix Mat2) |
Checks if two matrices of equal dimensions are equal or not. In case of an error the error is raised as an exception. More... | |
static bool | operator!= (Matrix Mat1, Matrix Mat2) |
Checks if two matrices of equal dimensions are not equal. In case of an error the error is raised as an exception. More... | |
static string | PrintMat (double[,] Mat) |
Returns a matrix as a string, so it can be viewed in a multi-text textbox or in a richtextBox (preferred). In case of an error the error is raised as an exception. More... | |
static string | PrintMat (Matrix Mat) |
Returns a matrix as a string, so it can be viewed in a multi-text textbox or in a richtextBox (preferred). In case of an error the error is raised as an exception. More... | |
Properties | |
double | this[int Row, int Col] [get, set] |
Set or get an element from the matrix More... | |
int | NoRows [get, set] |
Set or get the no. of rows in the matrix. Warning: Setting this property will delete all of the elements of the matrix and set them to zero. More... | |
int | NoCols [get, set] |
Set or get the no. of columns in the matrix. Warning: Setting this property will delete all of the elements of the matrix and set them to zero. More... | |
double[,] | toArray [get] |
This property returns the matrix as an array. More... | |
Matrix Library .Net v2.0 By Anas Abidi, 2004.
The Matrix Library contains Class Matrix which provides many static methods for making various matrix operations on objects derived from the class or on arrays defined as double. The '+','-','*' operators are overloaded to work with the objects derived from the matrix class.
Definition at line 59 of file cMatrixLib.cs.
MatrixLibrary.Matrix.Matrix | ( | int | noRows, |
int | noCols | ||
) |
Matrix object constructor, constructs an empty matrix with dimensions: rows = noRows and cols = noCols.
noRows | no. of rows in this matrix |
noCols | no. of columns in this matrix |
Definition at line 70 of file cMatrixLib.cs.
MatrixLibrary.Matrix.Matrix | ( | doubleMat | [,]) |
Matrix object constructor, constructs a matrix from an already defined array object.
Mat | the array the matrix will contain |
Definition at line 80 of file cMatrixLib.cs.
|
static |
Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Mat1 | First array in the summation |
Mat2 | Second array in the summation |
Definition at line 220 of file cMatrixLib.cs.
Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Mat1 | First matrix in the summation |
Mat2 | Second matrix in the summation |
Definition at line 259 of file cMatrixLib.cs.
|
static |
Returns the cross product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception.
V1 | First vector array (dimension [3]) in the cross product |
V2 | Second vector array (dimension [3]) in the cross product |
Definition at line 1687 of file cMatrixLib.cs.
|
static |
Returns the cross product of two vectors whose dimensions should be [3] or [3x1]. In case of an error the error is raised as an exception.
V1 | First vector array (dimensions [3,1]) in the cross product |
V2 | Second vector array (dimensions [3,1]) in the cross product |
Definition at line 1722 of file cMatrixLib.cs.
Returns the cross product of two vectors whose dimensions should be [3] or [3x1]. In case of an error the error is raised as an exception.
V1 | First Matrix (dimensions [3,1]) in the cross product |
V2 | Second Matrix (dimensions [3,1]) in the cross product |
Definition at line 1757 of file cMatrixLib.cs.
|
static |
Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception.
Mat | Array with [n,n] dimension whose determinant is to be found |
Definition at line 441 of file cMatrixLib.cs.
|
static |
Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception.
Mat | Matrix object with [n,n] dimension whose determinant is to be found |
Definition at line 501 of file cMatrixLib.cs.
|
static |
Returns the dot product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception.
V1 | First vector array (dimension [3]) in the dot product |
V2 | Second vector array (dimension [3]) in the dot product |
Definition at line 1770 of file cMatrixLib.cs.
|
static |
Returns the dot product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception.
V1 | First vector array (dimension [3,1]) in the dot product |
V2 | Second vector array (dimension [3,1]) in the dot product |
Definition at line 1797 of file cMatrixLib.cs.
Returns the dot product of two vectors whose dimensions should be [3] or [3,1]. In case of an error the error is raised as an exception.
V1 | First Matrix object (dimension [3,1]) in the dot product |
V2 | Second Matrix object (dimension [3,1]) in the dot product |
Definition at line 1824 of file cMatrixLib.cs.
|
static |
Returns the Eigenvalues and Eigenvectors of a real symmetric matrix, which is of dimensions [n,n]. In case of an error the error is raised as an exception. Note: This method is based on the 'Eigenvalues and Eigenvectors of a TridiagonalMatrix' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
Mat | The array whose Eigenvalues and Eigenvectors are to be found |
d | An array where the eigenvalues are returned |
v | An array where the eigenvectors are returned |
Definition at line 1421 of file cMatrixLib.cs.
Returns the Eigenvalues and Eigenvectors of a real symmetric matrix, which is of dimensions [n,n]. In case of an error the error is raised as an exception. Note: This method is based on the 'Eigenvalues and Eigenvectors of a TridiagonalMatrix' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
Mat | The Matrix object whose Eigenvalues and Eigenvectors are to be found |
d | A Matrix object where the eigenvalues are returned |
v | A Matrix object where the eigenvectors are returned |
Definition at line 1553 of file cMatrixLib.cs.
override bool MatrixLibrary.Matrix.Equals | ( | Object | obj) |
Tests whether the specified object is a MatrixLibrary.Matrix object and is identical to this MatrixLibrary.Matrix object.
obj | The object to compare with the current object |
Definition at line 1947 of file cMatrixLib.cs.
|
static |
Returns an Identity matrix with dimensions [n,n] in the from of an array.
n | the no. of rows or no. cols in the matrix |
Definition at line 203 of file cMatrixLib.cs.
|
static |
Returns the inverse of a matrix with [n,n] dimension and whose determinant is not zero. In case of an error the error is raised as an exception.
Mat | Array with [n,n] dimension whose inverse is to be found |
Definition at line 515 of file cMatrixLib.cs.
Returns the inverse of a matrix with [n,n] dimension and whose determinant is not zero. In case of an error the error is raised as an exception.
Mat | Matrix object with [n,n] dimension whose inverse is to be found |
Definition at line 590 of file cMatrixLib.cs.
|
static |
Checks if two Arrays of equal dimensions are equal or not. In case of an error the error is raised as an exception.
Mat1 | First array in equality check |
Mat2 | Second array in equality check |
Definition at line 1883 of file cMatrixLib.cs.
Checks if two matrices of equal dimensions are equal or not. In case of an error the error is raised as an exception.
Definition at line 1918 of file cMatrixLib.cs.
|
static |
Returns the LU Decomposition of a matrix. the output is: lower triangular matrix L, upper triangular matrix U, and permutation matrix P so that P*X = L*U. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
Mat | Array which will be LU Decomposed |
L | An array where the lower traingular matrix is returned |
U | An array where the upper traingular matrix is returned |
P | An array where the permutation matrix is returned |
Definition at line 987 of file cMatrixLib.cs.
Returns the LU Decomposition of a matrix. the output is: lower triangular matrix L, upper triangular matrix U, and permutation matrix P so that P*X = L*U. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
Mat | Matrix object which will be LU Decomposed |
L | A Matrix object where the lower traingular matrix is returned |
U | A Matrix object where the upper traingular matrix is returned |
P | A Matrix object where the permutation matrix is returned |
Definition at line 1124 of file cMatrixLib.cs.
|
static |
Returns the multiplication of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Mat1 | First array in multiplication |
Mat2 | Second array in multiplication |
Definition at line 348 of file cMatrixLib.cs.
Returns the multiplication of two matrices with compatible dimensions OR the cross-product of two vectors. In case of an error the error is raised as an exception.
Mat1 | First matrix or vector (i.e: dimension [3,1]) object in multiplication |
Mat2 | Second matrix or vector (i.e: dimension [3,1]) object in multiplication |
Definition at line 395 of file cMatrixLib.cs.
|
static |
Returns the 2D form of a 1D array. i.e. array with dimension[n] is returned as an array with dimension [n,1]. In case of an error the error is raised as an exception.
Mat | the array to convert, with dimesion [n] |
Definition at line 151 of file cMatrixLib.cs.
Checks if two matrices of equal dimensions are not equal. In case of an error the error is raised as an exception.
Definition at line 1938 of file cMatrixLib.cs.
Returns the multiplication of two matrices with compatible dimensions OR the cross-product of two vectors. In case of an error the error is raised as an exception.
Mat1 | First matrix or vector (i.e: dimension [3,1]) object in multiplication |
Mat2 | Second matrix or vector (i.e: dimension [3,1]) object in multiplication |
Definition at line 418 of file cMatrixLib.cs.
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception.
Mat | Matrix object which is to be multiplied by a scalar |
Value | The scalar value to multiply the Matrix object |
Definition at line 1609 of file cMatrixLib.cs.
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception.
Value | The scalar value to multiply the Matrix object |
Mat | Matrix object which is to be multiplied by a scalar |
Definition at line 1623 of file cMatrixLib.cs.
Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Definition at line 270 of file cMatrixLib.cs.
Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Definition at line 334 of file cMatrixLib.cs.
Returns the division of a matrix or a vector (i.e dimension [3,1]) by a scalar quantity. In case of an error the error is raised as an exception.
Value | The scalar value to divide the Matrix object with |
Mat | Matrix object which is to be divided by a scalar |
Definition at line 1674 of file cMatrixLib.cs.
Checks if two matrices of equal dimensions are equal or not. In case of an error the error is raised as an exception.
Definition at line 1928 of file cMatrixLib.cs.
|
static |
Returns the pseudoinverse of a matrix, such that X = PINV(A) produces a matrix 'X' of the same dimensions as A' so that A*X*A = A, X*A*X = X. In case of an error the error is raised as an exception.
Mat | An array whose pseudoinverse is to be found |
Definition at line 1328 of file cMatrixLib.cs.
Returns the pseudoinverse of a matrix, such that X = PINV(A) produces a matrix 'X' of the same dimensions as A' so that A*X*A = A, X*A*X = X. In case of an error the error is raised as an exception.
Mat | a Matrix object whose pseudoinverse is to be found |
Definition at line 1402 of file cMatrixLib.cs.
|
static |
Returns a matrix as a string, so it can be viewed in a multi-text textbox or in a richtextBox (preferred). In case of an error the error is raised as an exception.
Mat | The array to be viewed |
Definition at line 1962 of file cMatrixLib.cs.
|
static |
Returns a matrix as a string, so it can be viewed in a multi-text textbox or in a richtextBox (preferred). In case of an error the error is raised as an exception.
Mat | The Matrix object to be viewed |
Definition at line 2042 of file cMatrixLib.cs.
|
static |
Returns the rank of a matrix. In case of an error the error is raised as an exception.
Mat | An array whose rank is to be found |
Definition at line 1290 of file cMatrixLib.cs.
|
static |
Returns the rank of a matrix. In case of an error the error is raised as an exception.
Mat | a Matrix object whose rank is to be found |
Definition at line 1315 of file cMatrixLib.cs.
|
static |
Returns the division of a matrix or a vector (i.e dimension [3,1]) by a scalar quantity. In case of an error the error is raised as an exception.
Value | The scalar value to divide the array with |
Mat | Array which is to be divided by a scalar |
Definition at line 1636 of file cMatrixLib.cs.
Returns the division of a matrix or a vector (i.e dimension [3,1]) by a scalar quantity. In case of an error the error is raised as an exception.
Value | The scalar value to divide the array with |
Mat | Matrix which is to be divided by a scalar |
Definition at line 1661 of file cMatrixLib.cs.
|
static |
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception.
Value | The scalar value to multiply the array |
Mat | Array which is to be multiplied by a scalar |
Definition at line 1571 of file cMatrixLib.cs.
Returns the multiplication of a matrix or a vector (i.e dimension [3,1]) with a scalar quantity. In case of an error the error is raised as an exception.
Value | The scalar value to multiply the array |
Mat | Matrix which is to be multiplied by a scalar |
Definition at line 1595 of file cMatrixLib.cs.
|
static |
Solves a set of n linear equations A.X = B, and returns X, where A is [n,n] and B is [n,1]. In the same manner if you need to compute: inverse(A).B, it is better to use this method instead, as it is much faster. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
MatA | The array 'A' on the left side of the equations A.X = B |
MatB | The array 'B' on the right side of the equations A.X = B |
Definition at line 1149 of file cMatrixLib.cs.
Solves a set of n linear equations A.X = B, and returns X, where A is [n,n] and B is [n,1]. In the same manner if you need to compute: inverse(A).B, it is better to use this method instead, as it is much faster. In case of an error the error is raised as an exception. Note: This method is based on the 'LU Decomposition and Its Applications' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
MatA | Matrix object 'A' on the left side of the equations A.X = B |
MatB | Matrix object 'B' on the right side of the equations A.X = B |
Definition at line 1279 of file cMatrixLib.cs.
|
static |
Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Mat1 | First array in the subtraction |
Mat2 | Second array in the subtraction |
Definition at line 284 of file cMatrixLib.cs.
Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
Mat1 | First matrix in the subtraction |
Mat2 | Second matrix in the subtraction |
Definition at line 323 of file cMatrixLib.cs.
|
static |
Evaluates the Singular Value Decomposition of a matrix, returns the matrices S, U and V. Such that a given Matrix = U x S x V'. In case of an error the error is raised as an exception. Note: This method is based on the 'Singular Value Decomposition' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
Mat_ | Array whose SVD is to be computed |
S_ | An array where the S matrix is returned |
U_ | An array where the U matrix is returned |
V_ | An array where the V matrix is returned |
Definition at line 642 of file cMatrixLib.cs.
|
static |
Evaluates the Singular Value Decomposition of a matrix, returns the matrices S, U and V. Such that a given Matrix = U x S x V'. In case of an error the error is raised as an exception. Note: This method is based on the 'Singular Value Decomposition' section of Numerical Recipes in C by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery, University of Cambridge Press 1992.
Mat | Matrix object whose SVD is to be computed |
S | A Matrix object where the S matrix is returned |
U | A Matrix object where the U matrix is returned |
V | A Matrix object where the V matrix is returned |
Definition at line 961 of file cMatrixLib.cs.
override string MatrixLibrary.Matrix.ToString | ( | ) |
Returns the matrix as a string, so it can be viewed in a multi-text textbox or in a richtextBox (preferred). In case of an error the error is raised as an exception.
Definition at line 2051 of file cMatrixLib.cs.
|
static |
Returns the transpose of a matrix. In case of an error the error is raised as an exception.
Mat | Array whose transpose is to be found |
Definition at line 601 of file cMatrixLib.cs.
Returns the transpose of a matrix. In case of an error the error is raised as an exception.
Mat | Matrix object whose transpose is to be found |
Definition at line 623 of file cMatrixLib.cs.
|
static |
Returns the 1D form of a 2D array. i.e. array with dimension[n,1] is returned as an array with dimension [n]. In case of an error the error is raised as an exception.
Mat | the array to convert, with dimesions [n,1] |
Definition at line 177 of file cMatrixLib.cs.
|
static |
Returns the magnitude of a vector whose dimension is [3] or [3,1]. In case of an error the error is raised as an exception.
V | The vector array (dimension [3]) whose magnitude is to be found |
Definition at line 1835 of file cMatrixLib.cs.
|
static |
Returns the magnitude of a vector whose dimension is [3] or [3,1]. In case of an error the error is raised as an exception.
V | The vector array (dimension [3,1]) whose magnitude is to be found |
Definition at line 1853 of file cMatrixLib.cs.
|
static |
Returns the magnitude of a vector whose dimension is [3] or [3,1]. In case of an error the error is raised as an exception.
V | Matrix object (dimension [3,1]) whose magnitude is to be found |
Definition at line 1871 of file cMatrixLib.cs.
|
getset |
Set or get the no. of columns in the matrix. Warning: Setting this property will delete all of the elements of the matrix and set them to zero.
Definition at line 113 of file cMatrixLib.cs.
|
getset |
Set or get the no. of rows in the matrix. Warning: Setting this property will delete all of the elements of the matrix and set them to zero.
Definition at line 102 of file cMatrixLib.cs.
|
getset |
Set or get an element from the matrix
Definition at line 89 of file cMatrixLib.cs.
|
get |
This property returns the matrix as an array.
Definition at line 122 of file cMatrixLib.cs.