C# Class Encog.MathUtil.Matrices.MatrixMath

MatrixMath: This class can perform many different mathematical operations on matrixes.
Exibir arquivo Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
Add ( Matrix a, Matrix b ) : Matrix

Add two matrixes together, producing a third.

Copy ( Matrix source, Matrix target ) : void

Copy the source matrix to the target matrix. Both matrixes must have the same dimensions.

DeleteCol ( Matrix matrix, int deleted ) : Matrix

Delete a single column from a matrix. A new matrix, with the delete is returned.

DeleteRow ( Matrix matrix, int deleted ) : Matrix

Delete a row from a matrix. A new matrix, with the row deleted, is returned.

Divide ( Matrix a, double b ) : Matrix

Divide every cell in the matrix by the specified number.

DotProduct ( Matrix a, Matrix b ) : double

Compute the dot product for two matrixes. Note: both matrixes must be vectors.

Identity ( int size ) : Matrix

Create an identiry matrix, of the specified size. An identity matrix is always square.

Multiply ( Matrix a, Matrix b ) : Matrix

Multiply two matrixes.

Multiply ( Matrix a, double b ) : Matrix

Multiply every cell in the matrix by the specified value.

Subtract ( Matrix a, Matrix b ) : Matrix

Subtract one matrix from another. The two matrixes must have the same number of rows and columns.

Transpose ( Matrix input ) : Matrix

Transpose the specified matrix.

VectorLength ( Matrix input ) : double

Calculate the vector length of the matrix.

Private Methods

Method Description
MatrixMath ( ) : System

Private constructor. All methods are static.

Method Details

Add() public static method

Add two matrixes together, producing a third.
public static Add ( Matrix a, Matrix b ) : Matrix
a Matrix The first matrix to add.
b Matrix The second matrix to add.
return Matrix

Copy() public static method

Copy the source matrix to the target matrix. Both matrixes must have the same dimensions.
public static Copy ( Matrix source, Matrix target ) : void
source Matrix The source matrix.
target Matrix The target matrix.
return void

DeleteCol() public static method

Delete a single column from a matrix. A new matrix, with the delete is returned.
public static DeleteCol ( Matrix matrix, int deleted ) : Matrix
matrix Matrix The matrix to delete from.
deleted int The column to delete.
return Matrix

DeleteRow() public static method

Delete a row from a matrix. A new matrix, with the row deleted, is returned.
public static DeleteRow ( Matrix matrix, int deleted ) : Matrix
matrix Matrix The matrix to delete from.
deleted int The row to delete.
return Matrix

Divide() public static method

Divide every cell in the matrix by the specified number.
public static Divide ( Matrix a, double b ) : Matrix
a Matrix The matrix to divide.
b double The number to divide by.
return Matrix

DotProduct() public static method

Compute the dot product for two matrixes. Note: both matrixes must be vectors.
public static DotProduct ( Matrix a, Matrix b ) : double
a Matrix The first matrix, must be a vector.
b Matrix The second matrix, must be a vector.
return double

Identity() public static method

Create an identiry matrix, of the specified size. An identity matrix is always square.
public static Identity ( int size ) : Matrix
size int
return Matrix

Multiply() public static method

Multiply two matrixes.
public static Multiply ( Matrix a, Matrix b ) : Matrix
a Matrix The first matrix.
b Matrix The second matrix.
return Matrix

Multiply() public static method

Multiply every cell in the matrix by the specified value.
public static Multiply ( Matrix a, double b ) : Matrix
a Matrix Multiply every cell in a matrix by the specified value.
b double The value to multiply by.
return Matrix

Subtract() public static method

Subtract one matrix from another. The two matrixes must have the same number of rows and columns.
public static Subtract ( Matrix a, Matrix b ) : Matrix
a Matrix The first matrix.
b Matrix The second matrix.
return Matrix

Transpose() public static method

Transpose the specified matrix.
public static Transpose ( Matrix input ) : Matrix
input Matrix The matrix to transpose.
return Matrix

VectorLength() public static method

Calculate the vector length of the matrix.
public static VectorLength ( Matrix input ) : double
input Matrix The vector to calculate for.
return double