C# 클래스 MatrixLibrary.NMatrix

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.
파일 보기 프로젝트 열기: bcourter/SpaceClaim-AddIns 1 사용 예제들

공개 메소드들

메소드 설명
Add ( NMatrix Mat1, NMatrix Mat2 ) : NMatrix

Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.

Add ( double Mat1, double Mat2 ) : ].double[

Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.

Copy ( ) : NMatrix
CrossProduct ( NMatrix V1, NMatrix V2 ) : NMatrix

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.

CrossProduct ( double V1, double V2 ) : ].double[

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.

CrossProduct ( double V1, double V2 ) : double[]

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.

Det ( NMatrix Mat ) : double

Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception.

Det ( double Mat ) : double

Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception.

DotProduct ( NMatrix V1, NMatrix V2 ) : double

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.

DotProduct ( double V1, double V2 ) : double

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.

Eigen ( NMatrix Mat, NMatrix &d, NMatrix &v ) : void

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.

Eigen ( double Mat, double &d, double &v ) : void

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.

Equals ( Object obj ) : bool

Tests whether the specified object is a MatrixLibrary.Matrix object and is identical to this MatrixLibrary.Matrix object.

GetColumn ( int col ) : double[]
GetHashCode ( ) : int
GetRow ( int row ) : double[]
Identity ( int n ) : ].double[

Returns an Identity matrix with dimensions [n,n] in the from of an array.

Inverse ( NMatrix Mat ) : NMatrix

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.

Inverse ( double Mat ) : ].double[

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.

IsEqual ( NMatrix Mat1, NMatrix Mat2 ) : bool

Checks if two matrices of equal dimensions are equal or not. In case of an error the error is raised as an exception.

IsEqual ( double Mat1, double Mat2 ) : bool

Checks if two Arrays of equal dimensions are equal or not. In case of an error the error is raised as an exception.

LU ( NMatrix Mat, NMatrix &L, NMatrix &U, NMatrix &P ) : void

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.

LU ( double Mat, double &L, double &U, double &P ) : void

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.

Multiply ( NMatrix Mat1, NMatrix Mat2 ) : NMatrix

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.

Multiply ( double Mat1, double Mat2 ) : ].double[

Returns the multiplication of two matrices with compatible dimensions. In case of an error the error is raised as an exception.

NMatrix ( double Mat ) : System

Matrix object constructor, constructs a matrix from an already defined array object.

NMatrix ( int noRows, int noCols ) : System

Matrix object constructor, constructs an empty matrix with dimensions: rows = noRows and cols = noCols.

OneD_2_TwoD ( double Mat ) : ].double[

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.

PINV ( NMatrix Mat ) : NMatrix

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.

PINV ( double Mat ) : ].double[

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.

PrintMat ( NMatrix Mat ) : string

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.

PrintMat ( double Mat ) : string

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.

Rank ( NMatrix Mat ) : int

Returns the rank of a matrix. In case of an error the error is raised as an exception.

Rank ( double Mat ) : int

Returns the rank of a matrix. In case of an error the error is raised as an exception.

SVD ( NMatrix Mat, NMatrix &S, NMatrix &U, NMatrix &V ) : void

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.

SVD ( double Mat_, double &S_, double &U_, double &V_ ) : void

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.

ScalarDivide ( double Value, NMatrix Mat ) : NMatrix

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.

ScalarDivide ( double Value, double Mat ) : ].double[

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.

ScalarMultiply ( double Value, NMatrix Mat ) : NMatrix

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.

ScalarMultiply ( double Value, double Mat ) : ].double[

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.

SolveLinear ( NMatrix MatA, NMatrix MatB ) : NMatrix

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.

SolveLinear ( double MatA, double MatB ) : ].double[

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.

Subtract ( NMatrix Mat1, NMatrix Mat2 ) : NMatrix

Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.

Subtract ( double Mat1, double Mat2 ) : ].double[

Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.

ToString ( ) : string

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.

Transpose ( NMatrix Mat ) : NMatrix

Returns the transpose of a matrix. In case of an error the error is raised as an exception.

Transpose ( double Mat ) : ].double[

Returns the transpose of a matrix. In case of an error the error is raised as an exception.

TryGaussJordanElimination ( NMatrix a, NMatrix b, NMatrix &result ) : bool
TwoD_2_OneD ( double Mat ) : double[]

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.

VectorMagnitude ( NMatrix V ) : double

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.

VectorMagnitude ( double V ) : double

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.

operator ( ) : NMatrix

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.

operator ( ) : bool

Checks if two matrices of equal dimensions are not equal. In case of an error the error is raised as an exception.

this ( int Row, int Col ) : double

Set or get an element from the matrix

비공개 메소드들

메소드 설명
Find_R_C ( double Mat, int &Row ) : void
Find_R_C ( double Mat, int &Row, int &Col ) : void
IsZero ( double value ) : bool
PYTHAG ( double a, double b ) : double
ROT ( double g, double h, double s, double tau, double a, int i, int j, int k, int l ) : void
SQR ( double a ) : double
Sign ( double a, double b ) : double
SwapRows ( double Mat, int Row, int toRow ) : void
swaprows ( double arr, long row0, long row1 ) : void

메소드 상세

Add() 공개 정적인 메소드

Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
public static Add ( NMatrix Mat1, NMatrix Mat2 ) : NMatrix
Mat1 NMatrix First matrix in the summation
Mat2 NMatrix Second matrix in the summation
리턴 NMatrix

Add() 공개 정적인 메소드

Returns the summation of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
public static Add ( double Mat1, double Mat2 ) : ].double[
Mat1 double First array in the summation
Mat2 double Second array in the summation
리턴 ].double[

Copy() 공개 메소드

public Copy ( ) : NMatrix
리턴 NMatrix

CrossProduct() 공개 정적인 메소드

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.
public static CrossProduct ( NMatrix V1, NMatrix V2 ) : NMatrix
V1 NMatrix First Matrix (dimensions [3,1]) in the cross product
V2 NMatrix Second Matrix (dimensions [3,1]) in the cross product
리턴 NMatrix

CrossProduct() 공개 정적인 메소드

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.
public static CrossProduct ( double V1, double V2 ) : ].double[
V1 double First vector array (dimensions [3,1]) in the cross product
V2 double Second vector array (dimensions [3,1]) in the cross product
리턴 ].double[

CrossProduct() 공개 정적인 메소드

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.
public static CrossProduct ( double V1, double V2 ) : double[]
V1 double First vector array (dimension [3]) in the cross product
V2 double Second vector array (dimension [3]) in the cross product
리턴 double[]

Det() 공개 정적인 메소드

Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception.
public static Det ( NMatrix Mat ) : double
Mat NMatrix /// Matrix object with [n,n] dimension whose determinant is to be found ///
리턴 double

Det() 공개 정적인 메소드

Returns the determinant of a matrix with [n,n] dimension. In case of an error the error is raised as an exception.
public static Det ( double Mat ) : double
Mat double /// Array with [n,n] dimension whose determinant is to be found ///
리턴 double

DotProduct() 공개 정적인 메소드

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.
public static DotProduct ( NMatrix V1, NMatrix V2 ) : double
V1 NMatrix First Matrix object (dimension [3,1]) in the dot product
V2 NMatrix Second Matrix object (dimension [3,1]) in the dot product
리턴 double

DotProduct() 공개 정적인 메소드

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.
public static DotProduct ( double V1, double V2 ) : double
V1 double First vector array (dimension [3]) in the dot product
V2 double Second vector array (dimension [3]) in the dot product
리턴 double

Eigen() 공개 정적인 메소드

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.
public static Eigen ( NMatrix Mat, NMatrix &d, NMatrix &v ) : void
Mat NMatrix /// The Matrix object whose Eigenvalues and Eigenvectors are to be found ///
d NMatrix A Matrix object where the eigenvalues are returned
v NMatrix A Matrix object where the eigenvectors are returned
리턴 void

Eigen() 공개 정적인 메소드

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.
public static Eigen ( double Mat, double &d, double &v ) : void
Mat double /// The array whose Eigenvalues and Eigenvectors are to be found ///
d double An array where the eigenvalues are returned
v double An array where the eigenvectors are returned
리턴 void

Equals() 공개 메소드

Tests whether the specified object is a MatrixLibrary.Matrix object and is identical to this MatrixLibrary.Matrix object.
public Equals ( Object obj ) : bool
obj Object The object to compare with the current object
리턴 bool

GetColumn() 공개 메소드

public GetColumn ( int col ) : double[]
col int
리턴 double[]

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

GetRow() 공개 메소드

public GetRow ( int row ) : double[]
row int
리턴 double[]

Identity() 공개 정적인 메소드

Returns an Identity matrix with dimensions [n,n] in the from of an array.
public static Identity ( int n ) : ].double[
n int the no. of rows or no. cols in the matrix
리턴 ].double[

Inverse() 공개 정적인 메소드

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.
public static Inverse ( NMatrix Mat ) : NMatrix
Mat NMatrix /// Matrix object with [n,n] dimension whose inverse is to be found ///
리턴 NMatrix

Inverse() 공개 정적인 메소드

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.
public static Inverse ( double Mat ) : ].double[
Mat double /// Array with [n,n] dimension whose inverse is to be found ///
리턴 ].double[

IsEqual() 공개 정적인 메소드

Checks if two matrices of equal dimensions are equal or not. In case of an error the error is raised as an exception.
public static IsEqual ( NMatrix Mat1, NMatrix Mat2 ) : bool
Mat1 NMatrix First Matrix in equality check
Mat2 NMatrix Second Matrix in equality check
리턴 bool

IsEqual() 공개 정적인 메소드

Checks if two Arrays of equal dimensions are equal or not. In case of an error the error is raised as an exception.
public static IsEqual ( double Mat1, double Mat2 ) : bool
Mat1 double First array in equality check
Mat2 double Second array in equality check
리턴 bool

LU() 공개 정적인 메소드

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.
public static LU ( NMatrix Mat, NMatrix &L, NMatrix &U, NMatrix &P ) : void
Mat NMatrix Matrix object which will be LU Decomposed
L NMatrix A Matrix object where the lower traingular matrix is returned
U NMatrix A Matrix object where the upper traingular matrix is returned
P NMatrix A Matrix object where the permutation matrix is returned
리턴 void

LU() 공개 정적인 메소드

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.
public static LU ( double Mat, double &L, double &U, double &P ) : void
Mat double Array which will be LU Decomposed
L double An array where the lower traingular matrix is returned
U double An array where the upper traingular matrix is returned
P double An array where the permutation matrix is returned
리턴 void

Multiply() 공개 정적인 메소드

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.
public static Multiply ( NMatrix Mat1, NMatrix Mat2 ) : NMatrix
Mat1 NMatrix /// First matrix or vector (i.e: dimension [3,1]) object in /// multiplication ///
Mat2 NMatrix /// Second matrix or vector (i.e: dimension [3,1]) object in /// multiplication ///
리턴 NMatrix

Multiply() 공개 정적인 메소드

Returns the multiplication of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
public static Multiply ( double Mat1, double Mat2 ) : ].double[
Mat1 double First array in multiplication
Mat2 double Second array in multiplication
리턴 ].double[

NMatrix() 공개 메소드

Matrix object constructor, constructs a matrix from an already defined array object.
public NMatrix ( double Mat ) : System
Mat double the array the matrix will contain
리턴 System

NMatrix() 공개 메소드

Matrix object constructor, constructs an empty matrix with dimensions: rows = noRows and cols = noCols.
public NMatrix ( int noRows, int noCols ) : System
noRows int no. of rows in this matrix
noCols int no. of columns in this matrix
리턴 System

OneD_2_TwoD() 공개 정적인 메소드

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.
public static OneD_2_TwoD ( double Mat ) : ].double[
Mat double /// the array to convert, with dimesion [n] ///
리턴 ].double[

PINV() 공개 정적인 메소드

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.
public static PINV ( NMatrix Mat ) : NMatrix
Mat NMatrix a Matrix object whose pseudoinverse is to be found
리턴 NMatrix

PINV() 공개 정적인 메소드

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.
public static PINV ( double Mat ) : ].double[
Mat double An array whose pseudoinverse is to be found
리턴 ].double[

PrintMat() 공개 정적인 메소드

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.
public static PrintMat ( NMatrix Mat ) : string
Mat NMatrix The Matrix object to be viewed
리턴 string

PrintMat() 공개 정적인 메소드

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.
public static PrintMat ( double Mat ) : string
Mat double The array to be viewed
리턴 string

Rank() 공개 정적인 메소드

Returns the rank of a matrix. In case of an error the error is raised as an exception.
public static Rank ( NMatrix Mat ) : int
Mat NMatrix a Matrix object whose rank is to be found
리턴 int

Rank() 공개 정적인 메소드

Returns the rank of a matrix. In case of an error the error is raised as an exception.
public static Rank ( double Mat ) : int
Mat double An array whose rank is to be found
리턴 int

SVD() 공개 정적인 메소드

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.
public static SVD ( NMatrix Mat, NMatrix &S, NMatrix &U, NMatrix &V ) : void
Mat NMatrix Matrix object whose SVD is to be computed
S NMatrix A Matrix object where the S matrix is returned
U NMatrix A Matrix object where the U matrix is returned
V NMatrix A Matrix object where the V matrix is returned
리턴 void

SVD() 공개 정적인 메소드

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.
public static SVD ( double Mat_, double &S_, double &U_, double &V_ ) : void
Mat_ double Array whose SVD is to be computed
S_ double An array where the S matrix is returned
U_ double An array where the U matrix is returned
V_ double An array where the V matrix is returned
리턴 void

ScalarDivide() 공개 정적인 메소드

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.
public static ScalarDivide ( double Value, NMatrix Mat ) : NMatrix
Value double The scalar value to divide the array with
Mat NMatrix Matrix which is to be divided by a scalar
리턴 NMatrix

ScalarDivide() 공개 정적인 메소드

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.
public static ScalarDivide ( double Value, double Mat ) : ].double[
Value double The scalar value to divide the array with
Mat double Array which is to be divided by a scalar
리턴 ].double[

ScalarMultiply() 공개 정적인 메소드

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.
public static ScalarMultiply ( double Value, NMatrix Mat ) : NMatrix
Value double The scalar value to multiply the array
Mat NMatrix Matrix which is to be multiplied by a scalar
리턴 NMatrix

ScalarMultiply() 공개 정적인 메소드

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.
public static ScalarMultiply ( double Value, double Mat ) : ].double[
Value double The scalar value to multiply the array
Mat double Array which is to be multiplied by a scalar
리턴 ].double[

SolveLinear() 공개 정적인 메소드

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.
public static SolveLinear ( NMatrix MatA, NMatrix MatB ) : NMatrix
MatA NMatrix Matrix object 'A' on the left side of the equations A.X = B
MatB NMatrix Matrix object 'B' on the right side of the equations A.X = B
리턴 NMatrix

SolveLinear() 공개 정적인 메소드

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.
public static SolveLinear ( double MatA, double MatB ) : ].double[
MatA double The array 'A' on the left side of the equations A.X = B
MatB double The array 'B' on the right side of the equations A.X = B
리턴 ].double[

Subtract() 공개 정적인 메소드

Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
public static Subtract ( NMatrix Mat1, NMatrix Mat2 ) : NMatrix
Mat1 NMatrix First matrix in the subtraction
Mat2 NMatrix Second matrix in the subtraction
리턴 NMatrix

Subtract() 공개 정적인 메소드

Returns the difference of two matrices with compatible dimensions. In case of an error the error is raised as an exception.
public static Subtract ( double Mat1, double Mat2 ) : ].double[
Mat1 double First array in the subtraction
Mat2 double Second array in the subtraction
리턴 ].double[

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.
public ToString ( ) : string
리턴 string

Transpose() 공개 정적인 메소드

Returns the transpose of a matrix. In case of an error the error is raised as an exception.
public static Transpose ( NMatrix Mat ) : NMatrix
Mat NMatrix Matrix object whose transpose is to be found
리턴 NMatrix

Transpose() 공개 정적인 메소드

Returns the transpose of a matrix. In case of an error the error is raised as an exception.
public static Transpose ( double Mat ) : ].double[
Mat double Array whose transpose is to be found
리턴 ].double[

TryGaussJordanElimination() 공개 정적인 메소드

public static TryGaussJordanElimination ( NMatrix a, NMatrix b, NMatrix &result ) : bool
a NMatrix
b NMatrix
result NMatrix
리턴 bool

TwoD_2_OneD() 공개 정적인 메소드

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.
public static TwoD_2_OneD ( double Mat ) : double[]
Mat double /// the array to convert, with dimesions [n,1] ///
리턴 double[]

VectorMagnitude() 공개 정적인 메소드

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.
public static VectorMagnitude ( NMatrix V ) : double
V NMatrix Matrix object (dimension [3,1]) whose magnitude is to be found
리턴 double

VectorMagnitude() 공개 정적인 메소드

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.
public static VectorMagnitude ( double V ) : double
V double The vector array (dimension [3]) whose magnitude is to be found
리턴 double

operator() 공개 정적인 메소드

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.
public static operator ( ) : NMatrix
리턴 NMatrix

operator() 공개 정적인 메소드

Checks if two matrices of equal dimensions are not equal. In case of an error the error is raised as an exception.
public static operator ( ) : bool
리턴 bool

this() 공개 메소드

Set or get an element from the matrix
public this ( int Row, int Col ) : double
Row int
Col int
리턴 double