C# Class xFunc.Maths.Expressions.Matrices.MatrixExtentions

Provides extention methods for matrices and vectors.
Show file Open project: sys27/xFunc

Public Methods

Method Description
Abs ( this vector, ExpressionParameters parameters ) : double

Calculates the absolute value (norm) of vector.

Add ( this left, Matrix right ) : Matrix

Adds the right matrix to the left matrix.

Add ( this left, Matrix right, ExpressionParameters parameters ) : Matrix

Adds the right matrix to the left matrix.

Add ( this left, xFunc.Maths.Expressions.Matrices.Vector right ) : xFunc.Maths.Expressions.Matrices.Vector

Adds the right vector to the left vector.

Add ( this left, xFunc.Maths.Expressions.Matrices.Vector right, ExpressionParameters parameters ) : xFunc.Maths.Expressions.Matrices.Vector

Adds the right vector to the left vector.

Determinant ( this matrix ) : double

Calculates a determinant of specified matrix.

Determinant ( this matrix, ExpressionParameters parameters ) : double

Calculates a determinant of specified matrix.

Inverse ( this matrix, ExpressionParameters parameters ) : Matrix

Inverts a matrix.

LUPDecomposition ( this matrix, ExpressionParameters parameters, int &permutation, int &toggle ) : Matrix

Decomposes a matrix.

Mul ( this matrix, IExpression number ) : Matrix

Multiplies matrix by number.

Mul ( this matrix, IExpression number, ExpressionParameters parameters ) : Matrix

Multiplies matrix by number.

Mul ( this left, Matrix right ) : Matrix

Multiplies the left matrix by the right matrix.

Mul ( this left, Matrix right, ExpressionParameters parameters ) : Matrix

Multiplies the left matrix by the right matrix.

Mul ( this left, xFunc.Maths.Expressions.Matrices.Vector right ) : Matrix

Multiplies the left matrix by the right vector.

Mul ( this left, xFunc.Maths.Expressions.Matrices.Vector right, ExpressionParameters parameters ) : Matrix

Multiplies the left matrix by the right vector.

Mul ( this vector, IExpression number ) : xFunc.Maths.Expressions.Matrices.Vector

Multiplies vector by number.

Mul ( this vector, IExpression number, ExpressionParameters parameters ) : xFunc.Maths.Expressions.Matrices.Vector

Multiplies vector by number.

Sub ( this left, Matrix right ) : Matrix

Subtracts the right matrix from the left matrix.

Sub ( this left, Matrix right, ExpressionParameters parameters ) : Matrix

Subtracts the right matrix from the left matrix.

Sub ( this left, xFunc.Maths.Expressions.Matrices.Vector right ) : xFunc.Maths.Expressions.Matrices.Vector

Subtracts the right vector from the left vector.

Sub ( this left, xFunc.Maths.Expressions.Matrices.Vector right, ExpressionParameters parameters ) : xFunc.Maths.Expressions.Matrices.Vector

Subtracts the right vector from the left vector.

Transpose ( this matrix ) : IExpression

Transposes the specified matrix.

Transpose ( this vector ) : Matrix

Transposes the specified vector.

Private Methods

Method Description
Determinant_ ( double matrix ) : double
HelperSolve ( double lu, double b ) : double[]
Inverse_ ( double matrix ) : double[][]
LUPDecomposition_ ( double matrix, int &permutation, int &toggle ) : double[][]

Method Details

Abs() public static method

Calculates the absolute value (norm) of vector.
public static Abs ( this vector, ExpressionParameters parameters ) : double
vector this The vector.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return double

Add() public static method

Adds the right matrix to the left matrix.
public static Add ( this left, Matrix right ) : Matrix
left this The left matrix.
right Matrix The right matrix.
return Matrix

Add() public static method

Adds the right matrix to the left matrix.
The size of matrices is invalid.
public static Add ( this left, Matrix right, ExpressionParameters parameters ) : Matrix
left this The left matrix.
right Matrix The right matrix.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return Matrix

Add() public static method

Adds the right vector to the left vector.
public static Add ( this left, xFunc.Maths.Expressions.Matrices.Vector right ) : xFunc.Maths.Expressions.Matrices.Vector
left this The left vector.
right xFunc.Maths.Expressions.Matrices.Vector The right vector.
return xFunc.Maths.Expressions.Matrices.Vector

Add() public static method

Adds the right vector to the left vector.
The size of matrices is invalid.
public static Add ( this left, xFunc.Maths.Expressions.Matrices.Vector right, ExpressionParameters parameters ) : xFunc.Maths.Expressions.Matrices.Vector
left this The left vector.
right xFunc.Maths.Expressions.Matrices.Vector The right vector.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return xFunc.Maths.Expressions.Matrices.Vector

Determinant() public static method

Calculates a determinant of specified matrix.
public static Determinant ( this matrix ) : double
matrix this The matrix.
return double

Determinant() public static method

Calculates a determinant of specified matrix.
The size of matrices is invalid.
public static Determinant ( this matrix, ExpressionParameters parameters ) : double
matrix this The matrix.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return double

Inverse() public static method

Inverts a matrix.
public static Inverse ( this matrix, ExpressionParameters parameters ) : Matrix
matrix this The matrix.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return Matrix

LUPDecomposition() public static method

Decomposes a matrix.
public static LUPDecomposition ( this matrix, ExpressionParameters parameters, int &permutation, int &toggle ) : Matrix
matrix this The matrix.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
permutation int An array of permutations.
toggle int Used for calculating a determinant.
return Matrix

Mul() public static method

Multiplies matrix by number.
public static Mul ( this matrix, IExpression number ) : Matrix
matrix this The matrix.
number IExpression The number.
return Matrix

Mul() public static method

Multiplies matrix by number.
public static Mul ( this matrix, IExpression number, ExpressionParameters parameters ) : Matrix
matrix this The matrix.
number IExpression The number.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return Matrix

Mul() public static method

Multiplies the left matrix by the right matrix.
public static Mul ( this left, Matrix right ) : Matrix
left this The left matrix.
right Matrix The right matrix.
return Matrix

Mul() public static method

Multiplies the left matrix by the right matrix.
The size of matrices is invalid.
public static Mul ( this left, Matrix right, ExpressionParameters parameters ) : Matrix
left this The left matrix.
right Matrix The right matrix.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return Matrix

Mul() public static method

Multiplies the left matrix by the right vector.
public static Mul ( this left, xFunc.Maths.Expressions.Matrices.Vector right ) : Matrix
left this The left matrix.
right xFunc.Maths.Expressions.Matrices.Vector The right vector.
return Matrix

Mul() public static method

Multiplies the left matrix by the right vector.
The size of matrices is invalid.
public static Mul ( this left, xFunc.Maths.Expressions.Matrices.Vector right, ExpressionParameters parameters ) : Matrix
left this The left matrix.
right xFunc.Maths.Expressions.Matrices.Vector The right vector.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return Matrix

Mul() public static method

Multiplies vector by number.
public static Mul ( this vector, IExpression number ) : xFunc.Maths.Expressions.Matrices.Vector
vector this The vector.
number IExpression The number.
return xFunc.Maths.Expressions.Matrices.Vector

Mul() public static method

Multiplies vector by number.
public static Mul ( this vector, IExpression number, ExpressionParameters parameters ) : xFunc.Maths.Expressions.Matrices.Vector
vector this The vector.
number IExpression The number.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return xFunc.Maths.Expressions.Matrices.Vector

Sub() public static method

Subtracts the right matrix from the left matrix.
public static Sub ( this left, Matrix right ) : Matrix
left this The left matrix.
right Matrix The right matrix.
return Matrix

Sub() public static method

Subtracts the right matrix from the left matrix.
The size of matrices is invalid.
public static Sub ( this left, Matrix right, ExpressionParameters parameters ) : Matrix
left this The left matrix.
right Matrix The right matrix.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return Matrix

Sub() public static method

Subtracts the right vector from the left vector.
public static Sub ( this left, xFunc.Maths.Expressions.Matrices.Vector right ) : xFunc.Maths.Expressions.Matrices.Vector
left this The left vector.
right xFunc.Maths.Expressions.Matrices.Vector The right vector.
return xFunc.Maths.Expressions.Matrices.Vector

Sub() public static method

Subtracts the right vector from the left vector.
The size of matrices is invalid.
public static Sub ( this left, xFunc.Maths.Expressions.Matrices.Vector right, ExpressionParameters parameters ) : xFunc.Maths.Expressions.Matrices.Vector
left this The left vector.
right xFunc.Maths.Expressions.Matrices.Vector The right vector.
parameters ExpressionParameters An object that contains all parameters and functions for expressions.
return xFunc.Maths.Expressions.Matrices.Vector

Transpose() public static method

Transposes the specified matrix.
public static Transpose ( this matrix ) : IExpression
matrix this The matrix.
return IExpression

Transpose() public static method

Transposes the specified vector.
public static Transpose ( this vector ) : Matrix
vector this The vector.
return Matrix