IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
DotNetMatrix.GeneralMatrix Class Reference

.NET GeneralMatrix class. More...

+ Inheritance diagram for DotNetMatrix.GeneralMatrix:
+ Collaboration diagram for DotNetMatrix.GeneralMatrix:

Public Member Functions

 GeneralMatrix (int m, int n)
 Construct an m-by-n matrix of zeros. More...
 
 GeneralMatrix (int m, int n, double s)
 Construct an m-by-n constant matrix. More...
 
 GeneralMatrix (double[][] A)
 Construct a matrix from a 2-D array. More...
 
 GeneralMatrix (double[][] A, int m, int n)
 Construct a matrix quickly without checking arguments. More...
 
 GeneralMatrix (double[] vals, int m)
 Construct a matrix from a one-dimensional packed array More...
 
virtual GeneralMatrix Copy ()
 Make a deep copy of a matrix More...
 
virtual double GetElement (int i, int j)
 Get a single element. More...
 
virtual GeneralMatrix GetMatrix (int i0, int i1, int j0, int j1)
 Get a submatrix. More...
 
virtual GeneralMatrix GetMatrix (int[] r, int[] c)
 Get a submatrix. More...
 
virtual GeneralMatrix GetMatrix (int i0, int i1, int[] c)
 Get a submatrix. More...
 
virtual GeneralMatrix GetMatrix (int[] r, int j0, int j1)
 Get a submatrix. More...
 
virtual void SetElement (int i, int j, double s)
 Set a single element. More...
 
virtual void SetMatrix (int i0, int i1, int j0, int j1, GeneralMatrix X)
 Set a submatrix. More...
 
virtual void SetMatrix (int[] r, int[] c, GeneralMatrix X)
 Set a submatrix. More...
 
virtual void SetMatrix (int[] r, int j0, int j1, GeneralMatrix X)
 Set a submatrix. More...
 
virtual void SetMatrix (int i0, int i1, int[] c, GeneralMatrix X)
 Set a submatrix. More...
 
virtual GeneralMatrix Transpose ()
 Matrix transpose. More...
 
virtual double Norm1 ()
 One norm More...
 
virtual double Norm2 ()
 Two norm More...
 
virtual double NormInf ()
 Infinity norm More...
 
virtual double NormF ()
 Frobenius norm More...
 
virtual GeneralMatrix UnaryMinus ()
 Unary minus More...
 
virtual GeneralMatrix Add (GeneralMatrix B)
 C = A + B More...
 
virtual GeneralMatrix AddEquals (GeneralMatrix B)
 A = A + B More...
 
virtual GeneralMatrix Subtract (GeneralMatrix B)
 C = A - B More...
 
virtual GeneralMatrix SubtractEquals (GeneralMatrix B)
 A = A - B More...
 
virtual GeneralMatrix ArrayMultiply (GeneralMatrix B)
 Element-by-element multiplication, C = A.*B More...
 
virtual GeneralMatrix ArrayMultiplyEquals (GeneralMatrix B)
 Element-by-element multiplication in place, A = A.*B More...
 
virtual GeneralMatrix ArrayRightDivide (GeneralMatrix B)
 Element-by-element right division, C = A./B More...
 
virtual GeneralMatrix ArrayRightDivideEquals (GeneralMatrix B)
 Element-by-element right division in place, A = A./B More...
 
virtual GeneralMatrix ArrayLeftDivide (GeneralMatrix B)
 Element-by-element left division, C = A. More...
 
virtual GeneralMatrix ArrayLeftDivideEquals (GeneralMatrix B)
 Element-by-element left division in place, A = A. More...
 
virtual GeneralMatrix Multiply (double s)
 Multiply a matrix by a scalar, C = s*A More...
 
virtual GeneralMatrix MultiplyEquals (double s)
 Multiply a matrix by a scalar in place, A = s*A More...
 
virtual GeneralMatrix Multiply (GeneralMatrix B)
 Linear algebraic matrix multiplication, A * B More...
 
virtual LUDecomposition LUD ()
 LU Decomposition More...
 
virtual QRDecomposition QRD ()
 QR Decomposition More...
 
virtual CholeskyDecomposition chol ()
 Cholesky Decomposition More...
 
virtual SingularValueDecomposition SVD ()
 Singular Value Decomposition More...
 
virtual EigenvalueDecomposition Eigen ()
 Eigenvalue Decomposition More...
 
virtual GeneralMatrix Solve (GeneralMatrix B)
 Solve A*X = B More...
 
virtual GeneralMatrix SolveTranspose (GeneralMatrix B)
 Solve X*A = B, which is also A'*X' = B' More...
 
virtual GeneralMatrix Inverse ()
 Matrix inverse or pseudoinverse More...
 
virtual double Determinant ()
 GeneralMatrix determinant More...
 
virtual int Rank ()
 GeneralMatrix rank More...
 
virtual double Condition ()
 Matrix condition (2 norm) More...
 
virtual double Trace ()
 Matrix trace. More...
 
void Dispose ()
 Do not make this method virtual. A derived class should not be able to override this method. More...
 
System.Object Clone ()
 Clone the GeneralMatrix object. More...
 
 GeneralMatrix (int m, int n)
 Construct an m-by-n matrix of zeros. More...
 
 GeneralMatrix (int m, int n, double s)
 Construct an m-by-n constant matrix. More...
 
 GeneralMatrix (double[][] A)
 Construct a matrix from a 2-D array. More...
 
 GeneralMatrix (double[][] A, int m, int n)
 Construct a matrix quickly without checking arguments. More...
 
 GeneralMatrix (double[] vals, int m)
 Construct a matrix from a one-dimensional packed array More...
 
virtual GeneralMatrix Copy ()
 Make a deep copy of a matrix More...
 
virtual double GetElement (int i, int j)
 Get a single element. More...
 
virtual GeneralMatrix GetMatrix (int i0, int i1, int j0, int j1)
 Get a submatrix. More...
 
virtual GeneralMatrix GetMatrix (int[] r, int[] c)
 Get a submatrix. More...
 
virtual GeneralMatrix GetMatrix (int i0, int i1, int[] c)
 Get a submatrix. More...
 
virtual GeneralMatrix GetMatrix (int[] r, int j0, int j1)
 Get a submatrix. More...
 
virtual void SetElement (int i, int j, double s)
 Set a single element. More...
 
virtual void SetMatrix (int i0, int i1, int j0, int j1, GeneralMatrix X)
 Set a submatrix. More...
 
virtual void SetMatrix (int[] r, int[] c, GeneralMatrix X)
 Set a submatrix. More...
 
virtual void SetMatrix (int[] r, int j0, int j1, GeneralMatrix X)
 Set a submatrix. More...
 
virtual void SetMatrix (int i0, int i1, int[] c, GeneralMatrix X)
 Set a submatrix. More...
 
virtual GeneralMatrix Transpose ()
 Matrix transpose. More...
 
virtual double Norm1 ()
 One norm More...
 
virtual double Norm2 ()
 Two norm More...
 
virtual double NormInf ()
 Infinity norm More...
 
virtual double NormF ()
 Frobenius norm More...
 
virtual GeneralMatrix UnaryMinus ()
 Unary minus More...
 
virtual GeneralMatrix Add (GeneralMatrix B)
 C = A + B More...
 
virtual GeneralMatrix AddEquals (GeneralMatrix B)
 A = A + B More...
 
virtual GeneralMatrix Subtract (GeneralMatrix B)
 C = A - B More...
 
virtual GeneralMatrix SubtractEquals (GeneralMatrix B)
 A = A - B More...
 
virtual GeneralMatrix ArrayMultiply (GeneralMatrix B)
 Element-by-element multiplication, C = A.*B More...
 
virtual GeneralMatrix ArrayMultiplyEquals (GeneralMatrix B)
 Element-by-element multiplication in place, A = A.*B More...
 
virtual GeneralMatrix ArrayRightDivide (GeneralMatrix B)
 Element-by-element right division, C = A./B More...
 
virtual GeneralMatrix ArrayRightDivideEquals (GeneralMatrix B)
 Element-by-element right division in place, A = A./B More...
 
virtual GeneralMatrix ArrayLeftDivide (GeneralMatrix B)
 Element-by-element left division, C = A. More...
 
virtual GeneralMatrix ArrayLeftDivideEquals (GeneralMatrix B)
 Element-by-element left division in place, A = A. More...
 
virtual GeneralMatrix Multiply (double s)
 Multiply a matrix by a scalar, C = s*A More...
 
virtual GeneralMatrix MultiplyEquals (double s)
 Multiply a matrix by a scalar in place, A = s*A More...
 
virtual GeneralMatrix Multiply (GeneralMatrix B)
 Linear algebraic matrix multiplication, A * B More...
 
virtual LUDecomposition LUD ()
 LU Decomposition More...
 
virtual QRDecomposition QRD ()
 QR Decomposition More...
 
virtual CholeskyDecomposition chol ()
 Cholesky Decomposition More...
 
virtual SingularValueDecomposition SVD ()
 Singular Value Decomposition More...
 
virtual EigenvalueDecomposition Eigen ()
 Eigenvalue Decomposition More...
 
virtual GeneralMatrix Solve (GeneralMatrix B)
 Solve A*X = B More...
 
virtual GeneralMatrix SolveTranspose (GeneralMatrix B)
 Solve X*A = B, which is also A'*X' = B' More...
 
virtual GeneralMatrix Inverse ()
 Matrix inverse or pseudoinverse More...
 
virtual double Determinant ()
 GeneralMatrix determinant More...
 
virtual int Rank ()
 GeneralMatrix rank More...
 
virtual double Condition ()
 Matrix condition (2 norm) More...
 
virtual double Trace ()
 Matrix trace. More...
 
void Dispose ()
 Do not make this method virtual. A derived class should not be able to override this method. More...
 
System.Object Clone ()
 Clone the GeneralMatrix object. More...
 

Static Public Member Functions

static GeneralMatrix Create (double[][] A)
 Construct a matrix from a copy of a 2-D array. More...
 
static GeneralMatrix operator+ (GeneralMatrix m1, GeneralMatrix m2)
 Addition of matrices More...
 
static GeneralMatrix operator- (GeneralMatrix m1, GeneralMatrix m2)
 Subtraction of matrices More...
 
static GeneralMatrix operator* (GeneralMatrix m1, GeneralMatrix m2)
 Multiplication of matrices More...
 
static GeneralMatrix Random (int m, int n)
 Generate matrix with random elements More...
 
static GeneralMatrix Identity (int m, int n)
 Generate identity matrix More...
 
static GeneralMatrix Create (double[][] A)
 Construct a matrix from a copy of a 2-D array. More...
 
static GeneralMatrix operator+ (GeneralMatrix m1, GeneralMatrix m2)
 Addition of matrices More...
 
static GeneralMatrix operator- (GeneralMatrix m1, GeneralMatrix m2)
 Subtraction of matrices More...
 
static GeneralMatrix operator* (GeneralMatrix m1, GeneralMatrix m2)
 Multiplication of matrices More...
 
static GeneralMatrix Random (int m, int n)
 Generate matrix with random elements More...
 
static GeneralMatrix Identity (int m, int n)
 Generate identity matrix More...
 

Properties

virtual double[][] Array [get]
 Access the internal two-dimensional array. More...
 
virtual double[][] ArrayCopy [get]
 Copy the internal two-dimensional array. More...
 
virtual double[] ColumnPackedCopy [get]
 Make a one-dimensional column packed copy of the internal array. More...
 
virtual double[] RowPackedCopy [get]
 Make a one-dimensional row packed copy of the internal array. More...
 
virtual int RowDimension [get]
 Get row dimension. More...
 
virtual int ColumnDimension [get]
 Get column dimension. More...
 

Private Member Functions

void CheckMatrixDimensions (GeneralMatrix B)
 Check if size(A) == size(B) * More...
 
void Dispose (bool disposing)
 Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. More...
 
 ~GeneralMatrix ()
 This destructor will run only if the Dispose method does not get called. It gives your base class the opportunity to finalize. Do not provide destructors in types derived from this class. More...
 
void ISerializable. GetObjectData (SerializationInfo info, StreamingContext context)
 A method called when serializing this class More...
 
void CheckMatrixDimensions (GeneralMatrix B)
 Check if size(A) == size(B) * More...
 
void Dispose (bool disposing)
 Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. More...
 
 ~GeneralMatrix ()
 This destructor will run only if the Dispose method does not get called. It gives your base class the opportunity to finalize. Do not provide destructors in types derived from this class. More...
 
void ISerializable. GetObjectData (SerializationInfo info, StreamingContext context)
 A method called when serializing this class More...
 

Private Attributes

double[][] A
 Array for internal storage of elements. internal array storage. More...
 
int m
 Row and column dimensions. row dimension. column dimension. More...
 
int n
 

Detailed Description

.NET GeneralMatrix class.

The .NET GeneralMatrix Class provides the fundamental operations of numerical linear algebra. Various constructors create Matrices from two dimensional arrays of double precision floating point numbers. Various "gets" and "sets" provide access to submatrices and matrix elements. Several methods implement basic matrix arithmetic, including matrix addition and multiplication, matrix norms, and element-by-element array operations. Methods for reading and printing matrices are also included. All the operations in this version of the GeneralMatrix Class involve real matrices. Complex matrices may be handled in a future version.

Five fundamental matrix decompositions, which consist of pairs or triples of matrices, permutation vectors, and the like, produce results in five decomposition classes. These decompositions are accessed by the GeneralMatrix class to compute solutions of simultaneous linear equations, determinants, inverses and other matrix functions. The five decompositions are:

  • Cholesky Decomposition of symmetric, positive definite matrices.
  • LU Decomposition of rectangular matrices.
  • QR Decomposition of rectangular matrices.
  • Singular Value Decomposition of rectangular matrices.
  • Eigenvalue Decomposition of both symmetric and nonsymmetric square matrices.
Example of use:

Solve a linear system A x = b and compute the residual norm, ||b - A x||.

double[][] vals = {{1.,2.,3},{4.,5.,6.},{7.,8.,10.}};
GeneralMatrix A = new GeneralMatrix(vals);
GeneralMatrix b = GeneralMatrix.Random(3,1);
GeneralMatrix x = A.Solve(b);
GeneralMatrix r = A.Multiply(x).Subtract(b);
double rnorm = r.NormInf();

<author> The MathWorks, Inc. and the National Institute of Standards and Technology. </author> <version> 5 August 1998 </version>

Constructor & Destructor Documentation

DotNetMatrix.GeneralMatrix.GeneralMatrix ( int  m,
int  n,
double  s 
)
inline

Construct an m-by-n constant matrix.

Parameters
mNumber of rows.
nNumber of colums.
sFill the matrix with this scalar value.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( double  A[][])
inline

Construct a matrix from a 2-D array.

Parameters
ATwo-dimensional array of doubles.
Exceptions
System.ArgumentExceptionAll rows must have the same length
See also
Create

References DotNetMatrix.GeneralMatrix.A, and DotNetMatrix.GeneralMatrix.m.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( double  A[][],
int  m,
int  n 
)
inline

Construct a matrix quickly without checking arguments.

Parameters
ATwo-dimensional array of doubles.
mNumber of rows.
nNumber of colums.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( double[]  vals,
int  m 
)
inline

Construct a matrix from a one-dimensional packed array

Parameters
valsOne-dimensional array of doubles, packed by columns (ala Fortran).
mNumber of rows.
Exceptions
System.ArgumentExceptionArray length must be a multiple of m.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.~GeneralMatrix ( )
inlineprivate

This destructor will run only if the Dispose method does not get called. It gives your base class the opportunity to finalize. Do not provide destructors in types derived from this class.

References DotNetMatrix.GeneralMatrix.Dispose().

DotNetMatrix.GeneralMatrix.GeneralMatrix ( int  m,
int  n 
)
inline

Construct an m-by-n matrix of zeros.

Parameters
mNumber of rows.
nNumber of colums.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( int  m,
int  n,
double  s 
)
inline

Construct an m-by-n constant matrix.

Parameters
mNumber of rows.
nNumber of colums.
sFill the matrix with this scalar value.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( double  A[][])
inline

Construct a matrix from a 2-D array.

Parameters
ATwo-dimensional array of doubles.
Exceptions
System.ArgumentExceptionAll rows must have the same length
See also
Create

References DotNetMatrix.GeneralMatrix.A, and DotNetMatrix.GeneralMatrix.m.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( double  A[][],
int  m,
int  n 
)
inline

Construct a matrix quickly without checking arguments.

Parameters
ATwo-dimensional array of doubles.
mNumber of rows.
nNumber of colums.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.GeneralMatrix ( double[]  vals,
int  m 
)
inline

Construct a matrix from a one-dimensional packed array

Parameters
valsOne-dimensional array of doubles, packed by columns (ala Fortran).
mNumber of rows.
Exceptions
System.ArgumentExceptionArray length must be a multiple of m.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

DotNetMatrix.GeneralMatrix.~GeneralMatrix ( )
inlineprivate

This destructor will run only if the Dispose method does not get called. It gives your base class the opportunity to finalize. Do not provide destructors in types derived from this class.

References DotNetMatrix.GeneralMatrix.Dispose().

Member Function Documentation

static GeneralMatrix DotNetMatrix.GeneralMatrix.Create ( double  A[][])
inlinestatic

Construct a matrix from a copy of a 2-D array.

Parameters
ATwo-dimensional array of doubles.
Exceptions
System.ArgumentExceptionAll rows must have the same length

References DotNetMatrix.GeneralMatrix.Array, DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual double DotNetMatrix.GeneralMatrix.GetElement ( int  i,
int  j 
)
inlinevirtual

Get a single element.

Parameters
iRow index.
jColumn index.
Returns
A(i,j)
Exceptions
System.IndexOutOfRangeException

Referenced by DotNetMatrix.examples.MagicSquareExample.magic(), DotNetMatrix.test.TestMatrix.Main(), and DotNetMatrix.GeneralMatrix.SetMatrix().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int  i0,
int  i1,
int  j0,
int  j1 
)
inlinevirtual

Get a submatrix.

Parameters
i0Initial row index
i1Final row index
j0Initial column index
j1Final column index
Returns
A(i0:i1,j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.Array, and DotNetMatrix.GeneralMatrix.GeneralMatrix().

Referenced by DotNetMatrix.test.TestMatrix.Main(), DotNetMatrix.examples.MagicSquareExample.Main(), DotNetMatrix.QRDecomposition.Solve(), and DotNetMatrix.LUDecomposition.Solve().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int[]  r,
int[]  c 
)
inlinevirtual

Get a submatrix.

Parameters
rArray of row indices.
cArray of column indices.
Returns
A(r(:),c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.Array, and DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int  i0,
int  i1,
int[]  c 
)
inlinevirtual

Get a submatrix.

Parameters
i0Initial row index
i1Final row index
cArray of column indices.
Returns
A(i0:i1,c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.Array, and DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int[]  r,
int  j0,
int  j1 
)
inlinevirtual

Get a submatrix.

Parameters
rArray of row indices.
j0Initial column index
j1Final column index
Returns
A(r(:),j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.Array, and DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual void DotNetMatrix.GeneralMatrix.SetElement ( int  i,
int  j,
double  s 
)
inlinevirtual

Set a single element.

Parameters
iRow index.
jColumn index.
sA(i,j).
Exceptions
System.IndexOutOfRangeException

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int  i0,
int  i1,
int  j0,
int  j1,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
i0Initial row index
i1Final row index
j0Initial column index
j1Final column index
XA(i0:i1,j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GetElement().

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int[]  r,
int[]  c,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
rArray of row indices.
cArray of column indices.
XA(r(:),c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GetElement().

virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int[]  r,
int  j0,
int  j1,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
rArray of row indices.
j0Initial column index
j1Final column index
XA(r(:),j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GetElement().

virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int  i0,
int  i1,
int[]  c,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
i0Initial row index
i1Final row index
cArray of column indices.
XA(i0:i1,c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GetElement().

virtual double DotNetMatrix.GeneralMatrix.Norm1 ( )
inlinevirtual
virtual double DotNetMatrix.GeneralMatrix.Norm2 ( )
inlinevirtual

Two norm

Returns
maximum singular value.

Referenced by DotNetMatrix.GeneralMatrix.Norm2().

virtual double DotNetMatrix.GeneralMatrix.NormInf ( )
inlinevirtual

Infinity norm

Returns
maximum row sum.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual double DotNetMatrix.GeneralMatrix.NormF ( )
inlinevirtual

Frobenius norm

Returns
sqrt of sum of squares of all elements.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.UnaryMinus ( )
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.AddEquals ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.SubtractEquals ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayMultiply ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayMultiplyEquals ( GeneralMatrix  B)
inlinevirtual

Element-by-element multiplication in place, A = A.*B

Parameters
Banother matrix
Returns
A.*B

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayRightDivide ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayRightDivideEquals ( GeneralMatrix  B)
inlinevirtual

Element-by-element right division in place, A = A./B

Parameters
Banother matrix
Returns
A./B

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayLeftDivide ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayLeftDivideEquals ( GeneralMatrix  B)
inlinevirtual

Element-by-element left division in place, A = A.

Parameters
Banother matrix
Returns
A.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Multiply ( double  s)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.MultiplyEquals ( double  s)
inlinevirtual

Multiply a matrix by a scalar in place, A = s*A

Parameters
sscalar
Returns
replace A by s*A

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Multiply ( GeneralMatrix  B)
inlinevirtual

Linear algebraic matrix multiplication, A * B

Parameters
Banother matrix
Returns
Matrix product, A * B
Exceptions
System.ArgumentExceptionMatrix inner dimensions must agree.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.Array, DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

static GeneralMatrix DotNetMatrix.GeneralMatrix.operator+ ( GeneralMatrix  m1,
GeneralMatrix  m2 
)
inlinestatic

Addition of matrices

Parameters
m1
m2
Returns

References DotNetMatrix.GeneralMatrix.Add().

static GeneralMatrix DotNetMatrix.GeneralMatrix.operator- ( GeneralMatrix  m1,
GeneralMatrix  m2 
)
inlinestatic

Subtraction of matrices

Parameters
m1
m2
Returns

References DotNetMatrix.GeneralMatrix.Subtract().

static GeneralMatrix DotNetMatrix.GeneralMatrix.operator* ( GeneralMatrix  m1,
GeneralMatrix  m2 
)
inlinestatic

Multiplication of matrices

Parameters
m1
m2
Returns

References DotNetMatrix.GeneralMatrix.Multiply().

virtual LUDecomposition DotNetMatrix.GeneralMatrix.LUD ( )
inlinevirtual

LU Decomposition

Returns
LUDecomposition
See also
LUDecomposition

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual QRDecomposition DotNetMatrix.GeneralMatrix.QRD ( )
inlinevirtual

QR Decomposition

Returns
QRDecomposition
See also
QRDecomposition

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual CholeskyDecomposition DotNetMatrix.GeneralMatrix.chol ( )
inlinevirtual

Cholesky Decomposition

Returns
CholeskyDecomposition
See also
CholeskyDecomposition

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual SingularValueDecomposition DotNetMatrix.GeneralMatrix.SVD ( )
inlinevirtual

Singular Value Decomposition

Returns
SingularValueDecomposition
See also
SingularValueDecomposition

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual EigenvalueDecomposition DotNetMatrix.GeneralMatrix.Eigen ( )
inlinevirtual

Eigenvalue Decomposition

Returns
EigenvalueDecomposition
See also
EigenvalueDecomposition

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Solve ( GeneralMatrix  B)
inlinevirtual

Solve A*X = B

Parameters
Bright hand side
Returns
solution if A is square, least squares solution otherwise

Referenced by DotNetMatrix.GeneralMatrix.Inverse(), DotNetMatrix.test.TestMatrix.Main(), DotNetMatrix.GeneralMatrix.Solve(), and DotNetMatrix.GeneralMatrix.SolveTranspose().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.SolveTranspose ( GeneralMatrix  B)
inlinevirtual

Solve X*A = B, which is also A'*X' = B'

Parameters
Bright hand side
Returns
solution if A is square, least squares solution otherwise.

References DotNetMatrix.GeneralMatrix.Solve(), and DotNetMatrix.GeneralMatrix.Transpose().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Inverse ( )
inlinevirtual

Matrix inverse or pseudoinverse

Returns
inverse(A) if A is square, pseudoinverse otherwise.

References DotNetMatrix.GeneralMatrix.Identity(), and DotNetMatrix.GeneralMatrix.Solve().

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual double DotNetMatrix.GeneralMatrix.Determinant ( )
inlinevirtual

GeneralMatrix determinant

Returns
determinant

References DotNetMatrix.LUDecomposition.Determinant().

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual int DotNetMatrix.GeneralMatrix.Rank ( )
inlinevirtual

GeneralMatrix rank

Returns
effective numerical rank, obtained from SVD.

References DotNetMatrix.SingularValueDecomposition.Rank().

Referenced by DotNetMatrix.test.TestMatrix.Main(), and DotNetMatrix.examples.MagicSquareExample.Main().

virtual double DotNetMatrix.GeneralMatrix.Condition ( )
inlinevirtual

Matrix condition (2 norm)

Returns
ratio of largest to smallest singular value.

References DotNetMatrix.SingularValueDecomposition.Condition().

Referenced by DotNetMatrix.test.TestMatrix.Main(), and DotNetMatrix.examples.MagicSquareExample.Main().

virtual double DotNetMatrix.GeneralMatrix.Trace ( )
inlinevirtual

Matrix trace.

Returns
sum of the diagonal elements.

Referenced by DotNetMatrix.test.TestMatrix.Main(), and DotNetMatrix.examples.MagicSquareExample.Main().

static GeneralMatrix DotNetMatrix.GeneralMatrix.Random ( int  m,
int  n 
)
inlinestatic

Generate matrix with random elements

Parameters
mNumber of rows.
nNumber of colums.
Returns
An m-by-n matrix with uniformly distributed random elements.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.Array, DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.test.TestMatrix.Main().

static GeneralMatrix DotNetMatrix.GeneralMatrix.Identity ( int  m,
int  n 
)
inlinestatic

Generate identity matrix

Parameters
mNumber of rows.
nNumber of colums.
Returns
An m-by-n matrix with ones on the diagonal and zeros elsewhere.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.Array, DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

Referenced by DotNetMatrix.GeneralMatrix.Inverse(), and DotNetMatrix.test.TestMatrix.Main().

void DotNetMatrix.GeneralMatrix.Dispose ( )
inline

Do not make this method virtual. A derived class should not be able to override this method.

Referenced by DotNetMatrix.GeneralMatrix.~GeneralMatrix().

void DotNetMatrix.GeneralMatrix.Dispose ( bool  disposing)
inlineprivate

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

Parameters
disposing
System.Object DotNetMatrix.GeneralMatrix.Clone ( )
inline

Clone the GeneralMatrix object.

References DotNetMatrix.GeneralMatrix.Copy().

void ISerializable. DotNetMatrix.GeneralMatrix.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
inlineprivate

A method called when serializing this class

Parameters
info
context
static GeneralMatrix DotNetMatrix.GeneralMatrix.Create ( double  A[][])
inlinestatic

Construct a matrix from a copy of a 2-D array.

Parameters
ATwo-dimensional array of doubles.
Exceptions
System.ArgumentExceptionAll rows must have the same length

References DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Copy ( )
inlinevirtual
virtual double DotNetMatrix.GeneralMatrix.GetElement ( int  i,
int  j 
)
inlinevirtual

Get a single element.

Parameters
iRow index.
jColumn index.
Returns
A(i,j)
Exceptions
System.IndexOutOfRangeException
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int  i0,
int  i1,
int  j0,
int  j1 
)
inlinevirtual

Get a submatrix.

Parameters
i0Initial row index
i1Final row index
j0Initial column index
j1Final column index
Returns
A(i0:i1,j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int[]  r,
int[]  c 
)
inlinevirtual

Get a submatrix.

Parameters
rArray of row indices.
cArray of column indices.
Returns
A(r(:),c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int  i0,
int  i1,
int[]  c 
)
inlinevirtual

Get a submatrix.

Parameters
i0Initial row index
i1Final row index
cArray of column indices.
Returns
A(i0:i1,c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.GetMatrix ( int[]  r,
int  j0,
int  j1 
)
inlinevirtual

Get a submatrix.

Parameters
rArray of row indices.
j0Initial column index
j1Final column index
Returns
A(r(:),j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices

References DotNetMatrix.GeneralMatrix.GeneralMatrix().

virtual void DotNetMatrix.GeneralMatrix.SetElement ( int  i,
int  j,
double  s 
)
inlinevirtual

Set a single element.

Parameters
iRow index.
jColumn index.
sA(i,j).
Exceptions
System.IndexOutOfRangeException
virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int  i0,
int  i1,
int  j0,
int  j1,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
i0Initial row index
i1Final row index
j0Initial column index
j1Final column index
XA(i0:i1,j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices
virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int[]  r,
int[]  c,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
rArray of row indices.
cArray of column indices.
XA(r(:),c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices
virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int[]  r,
int  j0,
int  j1,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
rArray of row indices.
j0Initial column index
j1Final column index
XA(r(:),j0:j1)
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices
virtual void DotNetMatrix.GeneralMatrix.SetMatrix ( int  i0,
int  i1,
int[]  c,
GeneralMatrix  X 
)
inlinevirtual

Set a submatrix.

Parameters
i0Initial row index
i1Final row index
cArray of column indices.
XA(i0:i1,c(:))
Exceptions
System.IndexOutOfRangeExceptionSubmatrix indices
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Transpose ( )
inlinevirtual
virtual double DotNetMatrix.GeneralMatrix.Norm1 ( )
inlinevirtual

One norm

Returns
maximum column sum.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual double DotNetMatrix.GeneralMatrix.Norm2 ( )
inlinevirtual

Two norm

Returns
maximum singular value.

References DotNetMatrix.GeneralMatrix.Norm2().

virtual double DotNetMatrix.GeneralMatrix.NormInf ( )
inlinevirtual

Infinity norm

Returns
maximum row sum.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual double DotNetMatrix.GeneralMatrix.NormF ( )
inlinevirtual

Frobenius norm

Returns
sqrt of sum of squares of all elements.

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.UnaryMinus ( )
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Add ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.AddEquals ( GeneralMatrix  B)
inlinevirtual

A = A + B

Parameters
Banother matrix
Returns
A + B

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Subtract ( GeneralMatrix  B)
inlinevirtual
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.SubtractEquals ( GeneralMatrix  B)
inlinevirtual

A = A - B

Parameters
Banother matrix
Returns
A - B

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayMultiply ( GeneralMatrix  B)
inlinevirtual

Element-by-element multiplication, C = A.*B

Parameters
Banother matrix
Returns
A.*B

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayMultiplyEquals ( GeneralMatrix  B)
inlinevirtual

Element-by-element multiplication in place, A = A.*B

Parameters
Banother matrix
Returns
A.*B

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayRightDivide ( GeneralMatrix  B)
inlinevirtual

Element-by-element right division, C = A./B

Parameters
Banother matrix
Returns
A./B

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayRightDivideEquals ( GeneralMatrix  B)
inlinevirtual

Element-by-element right division in place, A = A./B

Parameters
Banother matrix
Returns
A./B

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayLeftDivide ( GeneralMatrix  B)
inlinevirtual

Element-by-element left division, C = A.

Parameters
Banother matrix
Returns
A.

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.ArrayLeftDivideEquals ( GeneralMatrix  B)
inlinevirtual

Element-by-element left division in place, A = A.

Parameters
Banother matrix
Returns
A.

References DotNetMatrix.GeneralMatrix.CheckMatrixDimensions(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Multiply ( double  s)
inlinevirtual

Multiply a matrix by a scalar, C = s*A

Parameters
sscalar
Returns
s*A

References DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.MultiplyEquals ( double  s)
inlinevirtual

Multiply a matrix by a scalar in place, A = s*A

Parameters
sscalar
Returns
replace A by s*A

References DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Multiply ( GeneralMatrix  B)
inlinevirtual

Linear algebraic matrix multiplication, A * B

Parameters
Banother matrix
Returns
Matrix product, A * B
Exceptions
System.ArgumentExceptionMatrix inner dimensions must agree.

References DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

static GeneralMatrix DotNetMatrix.GeneralMatrix.operator+ ( GeneralMatrix  m1,
GeneralMatrix  m2 
)
inlinestatic

Addition of matrices

Parameters
m1
m2
Returns
static GeneralMatrix DotNetMatrix.GeneralMatrix.operator- ( GeneralMatrix  m1,
GeneralMatrix  m2 
)
inlinestatic

Subtraction of matrices

Parameters
m1
m2
Returns
static GeneralMatrix DotNetMatrix.GeneralMatrix.operator* ( GeneralMatrix  m1,
GeneralMatrix  m2 
)
inlinestatic

Multiplication of matrices

Parameters
m1
m2
Returns
virtual LUDecomposition DotNetMatrix.GeneralMatrix.LUD ( )
inlinevirtual

LU Decomposition

Returns
LUDecomposition
See also
LUDecomposition
virtual QRDecomposition DotNetMatrix.GeneralMatrix.QRD ( )
inlinevirtual

QR Decomposition

Returns
QRDecomposition
See also
QRDecomposition
virtual CholeskyDecomposition DotNetMatrix.GeneralMatrix.chol ( )
inlinevirtual

Cholesky Decomposition

Returns
CholeskyDecomposition
See also
CholeskyDecomposition
virtual SingularValueDecomposition DotNetMatrix.GeneralMatrix.SVD ( )
inlinevirtual

Singular Value Decomposition

Returns
SingularValueDecomposition
See also
SingularValueDecomposition
virtual EigenvalueDecomposition DotNetMatrix.GeneralMatrix.Eigen ( )
inlinevirtual

Eigenvalue Decomposition

Returns
EigenvalueDecomposition
See also
EigenvalueDecomposition
virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Solve ( GeneralMatrix  B)
inlinevirtual

Solve A*X = B

Parameters
Bright hand side
Returns
solution if A is square, least squares solution otherwise

References DotNetMatrix.GeneralMatrix.Solve().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.SolveTranspose ( GeneralMatrix  B)
inlinevirtual

Solve X*A = B, which is also A'*X' = B'

Parameters
Bright hand side
Returns
solution if A is square, least squares solution otherwise.

References DotNetMatrix.GeneralMatrix.Solve(), and DotNetMatrix.GeneralMatrix.Transpose().

virtual GeneralMatrix DotNetMatrix.GeneralMatrix.Inverse ( )
inlinevirtual

Matrix inverse or pseudoinverse

Returns
inverse(A) if A is square, pseudoinverse otherwise.

References DotNetMatrix.GeneralMatrix.Identity(), and DotNetMatrix.GeneralMatrix.Solve().

virtual double DotNetMatrix.GeneralMatrix.Determinant ( )
inlinevirtual

GeneralMatrix determinant

Returns
determinant

References DotNetMatrix.LUDecomposition.Determinant().

virtual int DotNetMatrix.GeneralMatrix.Rank ( )
inlinevirtual

GeneralMatrix rank

Returns
effective numerical rank, obtained from SVD.

References DotNetMatrix.SingularValueDecomposition.Rank().

virtual double DotNetMatrix.GeneralMatrix.Condition ( )
inlinevirtual

Matrix condition (2 norm)

Returns
ratio of largest to smallest singular value.

References DotNetMatrix.SingularValueDecomposition.Condition().

virtual double DotNetMatrix.GeneralMatrix.Trace ( )
inlinevirtual

Matrix trace.

Returns
sum of the diagonal elements.
static GeneralMatrix DotNetMatrix.GeneralMatrix.Random ( int  m,
int  n 
)
inlinestatic

Generate matrix with random elements

Parameters
mNumber of rows.
nNumber of colums.
Returns
An m-by-n matrix with uniformly distributed random elements.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

static GeneralMatrix DotNetMatrix.GeneralMatrix.Identity ( int  m,
int  n 
)
inlinestatic

Generate identity matrix

Parameters
mNumber of rows.
nNumber of colums.
Returns
An m-by-n matrix with ones on the diagonal and zeros elsewhere.

References DotNetMatrix.GeneralMatrix.A, DotNetMatrix.GeneralMatrix.GeneralMatrix(), DotNetMatrix.GeneralMatrix.m, and DotNetMatrix.GeneralMatrix.n.

void DotNetMatrix.GeneralMatrix.CheckMatrixDimensions ( GeneralMatrix  B)
inlineprivate

Check if size(A) == size(B) *

void DotNetMatrix.GeneralMatrix.Dispose ( )
inline

Do not make this method virtual. A derived class should not be able to override this method.

void DotNetMatrix.GeneralMatrix.Dispose ( bool  disposing)
inlineprivate

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

Parameters
disposing
System.Object DotNetMatrix.GeneralMatrix.Clone ( )
inline

Clone the GeneralMatrix object.

References DotNetMatrix.GeneralMatrix.Copy().

void ISerializable. DotNetMatrix.GeneralMatrix.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
inlineprivate

A method called when serializing this class

Parameters
info
context

Member Data Documentation

Property Documentation

virtual double [][] DotNetMatrix.GeneralMatrix.ArrayCopy
get
virtual double [] DotNetMatrix.GeneralMatrix.ColumnPackedCopy
get

Make a one-dimensional column packed copy of the internal array.

Returns
Matrix elements packed in a one-dimensional array by columns.

Referenced by DotNetMatrix.test.TestMatrix.Main().

virtual double [] DotNetMatrix.GeneralMatrix.RowPackedCopy
get

Make a one-dimensional row packed copy of the internal array.

Returns
Matrix elements packed in a one-dimensional array by rows.

Referenced by DotNetMatrix.test.TestMatrix.Main().


The documentation for this class was generated from the following file: