Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Matrix Class Reference

Matrix used in linear algebra More...

Public Member Functions

 Matrix (int Width, int Height, double[,] Values=null)
 Constructor More...
 
virtual double Determinant ()
 Gets the determinant of a square matrix More...
 
override bool Equals (object obj)
 Determines if the objects are equal More...
 
override int GetHashCode ()
 Gets the hash code for the object More...
 
override string ToString ()
 Gets the string representation of the matrix More...
 
virtual Matrix Transpose ()
 Transposes the matrix More...
 

Static Public Member Functions

static Matrix operator- (Matrix M1, Matrix M2)
 Subtracts two matrices More...
 
static Matrix operator- (Matrix M1)
 Negates a matrix More...
 
static bool operator!= (Matrix M1, Matrix M2)
 Determines if two matrices are unequal More...
 
static Matrix operator* (Matrix M1, Matrix M2)
 Multiplies two matrices More...
 
static Matrix operator* (Matrix M1, double D)
 Multiplies a matrix by a value More...
 
static Matrix operator* (double D, Matrix M1)
 Multiplies a matrix by a value More...
 
static Matrix operator/ (Matrix M1, double D)
 Divides a matrix by a value More...
 
static Matrix operator/ (double D, Matrix M1)
 Divides a matrix by a value More...
 
static Matrix operator+ (Matrix M1, Matrix M2)
 Adds two matrices More...
 
static bool operator== (Matrix M1, Matrix M2)
 Determines if two matrices are equal More...
 

Properties

virtual int Height [get, set]
 Height of the matrix More...
 
virtual double[,] Values [get, set]
 Values for the matrix More...
 
virtual int Width [get, set]
 Width of the matrix More...
 
virtual double this[int X, int Y] [get, set]
 Sets the values of the matrix More...
 

Detailed Description

Matrix used in linear algebra

Definition at line 32 of file Matrix.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.Matrix.Matrix ( int  Width,
int  Height,
double  Values[,] = null 
)

Constructor

Parameters
WidthWidth of the matrix
HeightHeight of the matrix
ValuesValues to use in the matrix

Definition at line 40 of file Matrix.cs.

Member Function Documentation

virtual double Utilities.DataTypes.Matrix.Determinant ( )
virtual

Gets the determinant of a square matrix

Returns
The determinant of a square matrix

Definition at line 269 of file Matrix.cs.

override bool Utilities.DataTypes.Matrix.Equals ( object  obj)

Determines if the objects are equal

Parameters
objObject to check
Returns
True if they are, false otherwise

Definition at line 305 of file Matrix.cs.

override int Utilities.DataTypes.Matrix.GetHashCode ( )

Gets the hash code for the object

Returns
The hash code for the object

Definition at line 315 of file Matrix.cs.

static bool Utilities.DataTypes.Matrix.operator!= ( Matrix  M1,
Matrix  M2 
)
static

Determines if two matrices are unequal

Parameters
M1Matrix 1
M2Matrix 2
Returns
True if they are not equal, false otherwise

Definition at line 138 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator* ( Matrix  M1,
Matrix  M2 
)
static

Multiplies two matrices

Parameters
M1Matrix 1
M2Matrix 2
Returns
The result

Definition at line 149 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator* ( Matrix  M1,
double  D 
)
static

Multiplies a matrix by a value

Parameters
M1Matrix 1
DValue to multiply by
Returns
The result

Definition at line 174 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator* ( double  D,
Matrix  M1 
)
static

Multiplies a matrix by a value

Parameters
M1Matrix 1
DValue to multiply by
Returns
The result

Definition at line 190 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator+ ( Matrix  M1,
Matrix  M2 
)
static

Adds two matrices

Parameters
M1Matrix 1
M2Matrix 2
Returns
The result

Definition at line 230 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator- ( Matrix  M1,
Matrix  M2 
)
static

Subtracts two matrices

Parameters
M1Matrix 1
M2Matrix 2
Returns
The result

Definition at line 105 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator- ( Matrix  M1)
static

Negates a matrix

Parameters
M1Matrix 1
Returns
The result

Definition at line 122 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator/ ( Matrix  M1,
double  D 
)
static

Divides a matrix by a value

Parameters
M1Matrix 1
DValue to divide by
Returns
The result

Definition at line 206 of file Matrix.cs.

static Matrix Utilities.DataTypes.Matrix.operator/ ( double  D,
Matrix  M1 
)
static

Divides a matrix by a value

Parameters
M1Matrix 1
DValue to divide by
Returns
The result

Definition at line 218 of file Matrix.cs.

static bool Utilities.DataTypes.Matrix.operator== ( Matrix  M1,
Matrix  M2 
)
static

Determines if two matrices are equal

Parameters
M1Matrix 1
M2Matrix 2
Returns
True if they are equal, false otherwise

Definition at line 248 of file Matrix.cs.

override string Utilities.DataTypes.Matrix.ToString ( )

Gets the string representation of the matrix

Returns
The matrix as a string

Definition at line 328 of file Matrix.cs.

virtual Matrix Utilities.DataTypes.Matrix.Transpose ( )
virtual

Transposes the matrix

Returns
Returns a new transposed matrix

Definition at line 352 of file Matrix.cs.

Property Documentation

virtual int Utilities.DataTypes.Matrix.Height
getset

Height of the matrix

Definition at line 51 of file Matrix.cs.

virtual double Utilities.DataTypes.Matrix.this[int X, int Y]
getset

Sets the values of the matrix

Parameters
XX position
YY position
Returns
the value at a point in the matrix

Definition at line 77 of file Matrix.cs.

virtual double [,] Utilities.DataTypes.Matrix.Values
getset

Values for the matrix

Definition at line 59 of file Matrix.cs.

virtual int Utilities.DataTypes.Matrix.Width
getset

Width of the matrix

Definition at line 65 of file Matrix.cs.


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