Matrix ClassEncog Machine Learning Framework for .Net
Matrix: This class implements a mathematical matrix. Matrix math is very important to neural network processing. Many of the classes developed in this book will make use of the matrix classes in this package.
Inheritance Hierarchy

System Object
  Encog.MathUtil.Matrices Matrix

Namespace: Encog.MathUtil.Matrices
Assembly: encog-core-cs (in encog-core-cs.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax

[SerializableAttribute]
public class Matrix

The Matrix type exposes the following members.

Constructors

  NameDescription
Public methodMatrix(  Boolean  )
Construct a matrix from a 2D boolean array. Translate true to 1, false to -1.
Public methodMatrix(  Double  )
Construct a matrix from a 2D double array.
Public methodMatrix(Int32, Int32)
Construct a blank matrix with the specified number of rows and columns.
Top
Methods

  NameDescription
Public methodAdd(Matrix)
Add the specified matrix to this matrix. This will modify the matrix to hold the result of the addition.
Public methodAdd(Int32, Int32, Double)
Add the specified value to the specified row and column of the matrix.
Public methodClear
Clear the matrix.
Public methodClone
Clone the matrix.
Public methodStatic memberCreateColumnMatrix
Create a matrix that is a single column.
Public methodStatic memberCreateRowMatrix( Double )
Create a matrix that is a single row.
Public methodStatic memberCreateRowMatrix(IMLData)
Create a matrix that is a single row.
Public methodequals
Compare the matrix to another with the specified level of precision.
Public methodEquals
Determine if this matrix is equal to another. Use a precision of 10 decimal places.
(Overrides Object Equals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFromPackedArray
Take the values of thie matrix from a packed array.
Public methodGetArrayCopy
Make a copy of this matrix as an array.
Public methodGetCol
Get one column from this matrix as a column matrix.
Public methodGetHashCode
Generate a hash code, this is just rows+cols. Probably a better way to do this, but I really don't see the Matrix class being used as the key to a hash table.
(Overrides Object GetHashCode .)
Public methodGetMatrix( Int32 ,  Int32 )
Get a submatrix.
Public methodGetMatrix(Int32, Int32,  Int32 )
Get a submatrix.
Public methodGetMatrix( Int32 , Int32, Int32)
Get a submatrix.
Public methodGetMatrix(Int32, Int32, Int32, Int32)
Get a submatrix.
Public methodGetRow
Get the specified row as a row matrix.
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodInverse
The matrix inverted.
Public methodIsVector
Determine if this matrix is a vector. A vector matrix only has a single row or column.
Public methodIsZero
Determine if all of the values in the matrix are zero.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMultiply
Multiply every row by the specified vector.
Public methodRamdomize
Fill the matrix with random values in the specified range.
Public methodRandomize
Randomize the matrix.
Public methodSet(Double)
Set every value in the matrix to the specified value.
Public methodSet(Matrix)
Set the values from the other matrix into this one.
Public methodSetMatrix( Int32 ,  Int32 , Matrix)
Set a submatrix.
Public methodSetMatrix(Int32, Int32,  Int32 , Matrix)
Set a submatrix.
Public methodSetMatrix( Int32 , Int32, Int32, Matrix)
Set a submatrix.
Public methodSetMatrix(Int32, Int32, Int32, Int32, Matrix)
Set a submatrix.
Public methodSolve
Solve A*X = B
Public methodSum
Sum all of the values in the matrix.
Public methodToPackedArray
Convert the matrix to a packed array.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyCols
Get the number of columns in this matrix
Public propertyData
Get the matrix array for this matrix.
Public propertyItem
Allows index access to the elements of the matrix. Warning: This can be a somewhat slow way to access the matrix. Do not put this in performance critical loops. Make sure to use the Data property and access the matrix array directly.
Public propertyRows
Get the number of rows in this matrix
Public propertySize
Get the size fo the matrix. This is thr rows times the columns.
Top
See Also