C# 클래스 Encog.MathUtil.Matrices.Matrix

파일 보기 프로젝트 열기: encog/encog-silverlight-core 1 사용 예제들

공개 메소드들

메소드 설명
Add ( Matrix matrix ) : void

Add the specified matrix to this matrix. This will modify the matrix to hold the result of the addition.

Add ( int row, int col, double value_ren ) : void

Add the specified value to the specified row and column of the matrix.

Clear ( ) : void

Clear the matrix.

Clone ( ) : object

Clone the matrix.

CreateColumnMatrix ( double input ) : Matrix

Create a matrix that is a single column.

CreateRowMatrix ( double input ) : Matrix

Create a matrix that is a single row.

Equals ( Object other ) : bool

Determine if this matrix is equal to another. Use a precision of 10 decimal places.

FromPackedArray ( double array, int index ) : int

Take the values of thie matrix from a packed array.

GetArrayCopy ( ) : double[][]

Make a copy of this matrix as an array.

GetCol ( int col ) : Matrix

Get one column from this matrix as a column matrix.

GetHashCode ( ) : int

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.

GetMatrix ( int r, int c ) : Matrix

Get a submatrix.

GetMatrix ( int i0, int i1, int c ) : Matrix

Get a submatrix.

GetMatrix ( int i0, int i1, int j0, int j1 ) : Matrix

Get a submatrix.

GetRow ( int row ) : Matrix

Get the specified row as a row matrix.

Inverse ( ) : Matrix

The matrix inverted.

IsVector ( ) : bool

Determine if this matrix is a vector. A vector matrix only has a single row or column.

IsZero ( ) : bool

Determine if all of the values in the matrix are zero.

Matrix ( bool sourceMatrix ) : System

Construct a matrix from a 2D boolean array. Translate true to 1, false to -1.

Matrix ( double sourceMatrix ) : System

Construct a matrix from a 2D double array.

Matrix ( int rows, int cols ) : System

Construct a blank matrix with the specified number of rows and columns.

Multiply ( double vector, double result ) : void

Multiply every row by the specified vector.

Ramdomize ( double min, double max ) : void

Fill the matrix with random values in the specified range.

Randomize ( double min, double max ) : void

Randomize the matrix.

Set ( Matrix other ) : void

Set the values from the other matrix into this one.

Set ( double value_ren ) : void

Set every value in the matrix to the specified value.

SetMatrix ( int r, int c, Matrix x ) : void

Set a submatrix.

SetMatrix ( int r, int j0, int j1, Matrix x ) : void

Set a submatrix.

SetMatrix ( int i0, int i1, int j0, int j1, Matrix x ) : void

Set a submatrix.

Solve ( Matrix b ) : Matrix

Solve A*X = B

Sum ( ) : double

Sum all of the values in the matrix.

ToPackedArray ( ) : double[]

Convert the matrix to a packed array.

equals ( Matrix matrix, int precision ) : bool

Compare the matrix to another with the specified level of precision.

this ( int row, int col ) : double

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.

비공개 메소드들

메소드 설명
Validate ( int row, int col ) : void

Validate that the specified row and column are inside of the range of the matrix.

메소드 상세

Add() 공개 메소드

Add the specified matrix to this matrix. This will modify the matrix to hold the result of the addition.
public Add ( Matrix matrix ) : void
matrix Matrix The matrix to add.
리턴 void

Add() 공개 메소드

Add the specified value to the specified row and column of the matrix.
public Add ( int row, int col, double value_ren ) : void
row int The row to add to.
col int The column to add to.
value_ren double The value to add.
리턴 void

Clear() 공개 메소드

Clear the matrix.
public Clear ( ) : void
리턴 void

Clone() 공개 메소드

Clone the matrix.
public Clone ( ) : object
리턴 object

CreateColumnMatrix() 공개 정적인 메소드

Create a matrix that is a single column.
public static CreateColumnMatrix ( double input ) : Matrix
input double A 1D array to make the matrix from.
리턴 Matrix

CreateRowMatrix() 공개 정적인 메소드

Create a matrix that is a single row.
public static CreateRowMatrix ( double input ) : Matrix
input double A 1D array to make the matrix from.
리턴 Matrix

Equals() 공개 메소드

Determine if this matrix is equal to another. Use a precision of 10 decimal places.
public Equals ( Object other ) : bool
other Object The other matrix to compare.
리턴 bool

FromPackedArray() 공개 메소드

Take the values of thie matrix from a packed array.
public FromPackedArray ( double array, int index ) : int
array double The packed array to read the matrix from.
index int The index to begin reading at in the array.
리턴 int

GetArrayCopy() 공개 메소드

Make a copy of this matrix as an array.
public GetArrayCopy ( ) : double[][]
리턴 double[][]

GetCol() 공개 메소드

Get one column from this matrix as a column matrix.
public GetCol ( int col ) : Matrix
col int The desired column.
리턴 Matrix

GetHashCode() 공개 메소드

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.
public GetHashCode ( ) : int
리턴 int

GetMatrix() 공개 메소드

Get a submatrix.
public GetMatrix ( int r, int c ) : Matrix
r int Array of row indices.
c int Array of column indices.
리턴 Matrix

GetMatrix() 공개 메소드

Get a submatrix.
public GetMatrix ( int i0, int i1, int c ) : Matrix
i0 int Initial row index.
i1 int Final row index.
c int Array of column indices.
리턴 Matrix

GetMatrix() 공개 메소드

Get a submatrix.
public GetMatrix ( int i0, int i1, int j0, int j1 ) : Matrix
i0 int Initial row index.
i1 int Final row index.
j0 int Initial column index.
j1 int Final column index.
리턴 Matrix

GetRow() 공개 메소드

Get the specified row as a row matrix.
public GetRow ( int row ) : Matrix
row int The desired row.
리턴 Matrix

Inverse() 공개 메소드

The matrix inverted.
public Inverse ( ) : Matrix
리턴 Matrix

IsVector() 공개 메소드

Determine if this matrix is a vector. A vector matrix only has a single row or column.
public IsVector ( ) : bool
리턴 bool

IsZero() 공개 메소드

Determine if all of the values in the matrix are zero.
public IsZero ( ) : bool
리턴 bool

Matrix() 공개 메소드

Construct a matrix from a 2D boolean array. Translate true to 1, false to -1.
public Matrix ( bool sourceMatrix ) : System
sourceMatrix bool A 2D array to construcat the matrix from.
리턴 System

Matrix() 공개 메소드

Construct a matrix from a 2D double array.
public Matrix ( double sourceMatrix ) : System
sourceMatrix double A 2D double array.
리턴 System

Matrix() 공개 메소드

Construct a blank matrix with the specified number of rows and columns.
public Matrix ( int rows, int cols ) : System
rows int How many rows.
cols int How many columns.
리턴 System

Multiply() 공개 메소드

Multiply every row by the specified vector.
public Multiply ( double vector, double result ) : void
vector double The vector to multiply by.
result double The result to hold the values.
리턴 void

Ramdomize() 공개 메소드

Fill the matrix with random values in the specified range.
public Ramdomize ( double min, double max ) : void
min double The minimum value for the random numbers.
max double The maximum value for the random numbers.
리턴 void

Randomize() 공개 메소드

Randomize the matrix.
public Randomize ( double min, double max ) : void
min double Minimum random value.
max double Maximum random value.
리턴 void

Set() 공개 메소드

Set the values from the other matrix into this one.
public Set ( Matrix other ) : void
other Matrix The source matrix.
리턴 void

Set() 공개 메소드

Set every value in the matrix to the specified value.
public Set ( double value_ren ) : void
value_ren double The value to set the matrix to.
리턴 void

SetMatrix() 공개 메소드

Set a submatrix.
public SetMatrix ( int r, int c, Matrix x ) : void
r int Array of row indices.
c int Array of column indices.
x Matrix The matrix to set.
리턴 void

SetMatrix() 공개 메소드

Set a submatrix.
public SetMatrix ( int r, int j0, int j1, Matrix x ) : void
r int Array of row indices.
j0 int Initial column index
j1 int Final column index
x Matrix A(r(:),j0:j1)
리턴 void

SetMatrix() 공개 메소드

Set a submatrix.
public SetMatrix ( int i0, int i1, int j0, int j1, Matrix x ) : void
i0 int Initial row index
i1 int Final row index
j0 int Initial column index
j1 int Final column index
x Matrix A(i0:i1,j0:j1)
리턴 void

Solve() 공개 메소드

Solve A*X = B
public Solve ( Matrix b ) : Matrix
b Matrix right hand side.
리턴 Matrix

Sum() 공개 메소드

Sum all of the values in the matrix.
public Sum ( ) : double
리턴 double

ToPackedArray() 공개 메소드

Convert the matrix to a packed array.
public ToPackedArray ( ) : double[]
리턴 double[]

equals() 공개 메소드

Compare the matrix to another with the specified level of precision.
public equals ( Matrix matrix, int precision ) : bool
matrix Matrix The other matrix to compare.
precision int The number of decimal places of precision to use.
리턴 bool

this() 공개 메소드

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 this ( int row, int col ) : double
row int The row to access.
col int The column to access.
리턴 double