C# Class numl.Math.LinearAlgebra.Matrix

A matrix.
Afficher le fichier Open project: sethjuarez/numl Class Usage Examples

Méthodes publiques

Méthode Description
Center ( VectorType t ) : Matrix

In place centering. WARNING: WILL UPDATE MATRIX!

Cholesky ( Matrix m ) : Matrix

Cholesky Factorization of a Matrix.

Col ( int i ) : Vector

Cols.

Copy ( ) : Matrix

create deep copy of matrix.

Correlation ( Matrix source, VectorType t = VectorType.Col ) : Matrix

Correlations.

Covariance ( Matrix source, VectorType t = VectorType.Col ) : Matrix

Covariances.

CovarianceDiag ( Matrix source, VectorType t = VectorType.Col ) : Vector

Covariance diagram.

Create ( int n, Func f ) : Matrix

Creates a new Matrix.

Create ( int n, Func f ) : Matrix

Creates a new Matrix.

Create ( int n, int d, Func f ) : Matrix

Creates a new Matrix.

Create ( int n, int d, Func f ) : Matrix

Creates a new Matrix.

Det ( Matrix x ) : double

Dets the given x coordinate.

Diag ( Matrix m ) : Vector

Diagrams the given m.

Dot ( Matrix x, Vector v ) : Vector

Dot product between a matrix and a vector.

Dot ( Vector v, Matrix x ) : Vector

Dot product between a matrix and a vector.

Each ( Matrix m, double>.Func fnElementWiseOp ) : Matrix

Performs an element wise operation on the input Matrix.

Each ( Matrix m, Func fnElementWiseOp ) : Matrix

Performs an element wise operation on the input Matrix.

Each ( Matrix m1, Matrix m2, Func fnElementWiseOp ) : Matrix

Performs an element-wise operation on the input Matrices.

Equals ( Matrix m, double tol ) : bool

Determines whether the specified T:System.Object is equal to the current T:System.Object.

Equals ( object obj ) : bool

Determines whether the specified T:System.Object is equal to the current T:System.Object.

Evd ( Matrix A ) : Matrix>.Tuple

Eigen Decomposition.

Extract ( Matrix m, int x, int y, int width, int height, bool safe = true ) : Matrix

Extracts this object.

FrobeniusNorm ( Matrix A ) : double

Matrix Frobenius Norm.

GetCols ( ) : IEnumerable

Gets the cols in this collection.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetMatrix ( int d1, int d2, int n1, int n2 ) : Matrix

Gets a matrix.

GetRows ( ) : IEnumerable

Gets the rows in this collection.

GetVector ( int index, int from, int to, VectorType type ) : Vector

Gets a vector.

Identity ( int n ) : Matrix

n x n identity matrix.

Identity ( int n, int d ) : Matrix

n x d identity matrix.

Indices ( Matrix source, bool>.Func f ) : IEnumerable

Enumerates indices in this collection.

Indices ( Matrix source, bool>.Func f, VectorType t ) : IEnumerable

Enumerates indices in this collection.

Insert ( Vector v, int index, VectorType t, bool insertAfter = true ) : Matrix

Returns a new Matrix with the Vector inserted at the specified position

Inverse ( ) : Matrix

Creates an inverse of the current matrix

LU ( Matrix A ) : Tuple

NOT IMPLEMENTED!

Load ( string file ) : Matrix

Loads the given stream.

Matrix ( double m ) : System

Create new matrix with prepopulated vals.

Matrix ( int n ) : System

Create matrix n x n matrix.

Matrix ( int n, int d ) : System

Create new n x d matrix.

Max ( Matrix source, VectorType t = VectorType.Col ) : Vector

Returns a vector of the maximum values for each row/column.

Max ( Matrix source ) : double

Determines the maximum of the given parameters.

Mean ( Matrix source, VectorType t ) : Vector

Determines the mean of the given parameters.

Median ( Matrix source, VectorType t = VectorType.Col ) : Vector

Returns a vector of the median values for each row or column.

Min ( Matrix source, VectorType t = VectorType.Col ) : Vector

Returns a vector of the minimum values for each row/column.

Min ( Matrix source ) : double

Determines the minimum of the given parameters.

Norm ( Matrix A, double p ) : double

Standard Matrix Norm.

NormRand ( Vector means, Vector stdDev, int n ) : Matrix

Normalise random.

NormRand ( int n, double min ) : Matrix

Normalise random.

NormRand ( int n, int d, double min ) : Matrix

Normalise random.

Normalize ( VectorType t ) : void

In place normalization. WARNING: WILL UPDATE MATRIX!

Parse ( string text ) : Matrix

Parses a string containing MATLAB style Matrix syntax, i.e. "[[1, 2, 3]; [3, 4, 5]]"

Pivot ( Matrix M ) : Matrix

Pivots the given m.

QR ( Matrix A ) : Matrix>.Tuple

Modified Gram-Schmidt QR Factorization.

Rand ( int n, double min ) : Matrix

Generate a matrix n x d with numbers 0 less than x less than 1 drawn uniformly at random.

Rand ( int n, int d, double min ) : Matrix

Generate a matrix n x d with numbers 0 less than x less than 1 drawn uniformly at random.

Remove ( int index, VectorType t ) : Matrix

Removes this object.

Reshape ( Matrix m, int rows, int cols ) : Matrix

Reshapes the supplied matrix into a new matrix shape.

Reshape ( Vector v, int dimension, VectorType dimensionType = VectorType.Col, VectorType byVector = VectorType.Row ) : Matrix

Reshapes the supplied Vector into a Matrix form.

Reshape ( Vector v, int rows, int columns, VectorType byVector = VectorType.Row ) : Matrix

Reshapes the supplied Vector into a Matrix form.

Reverse ( Matrix source, VectorType t = VectorType.Row ) : IEnumerable

Enumerates reverse in this collection.

Round ( Matrix m, int decimals ) : Matrix

Matrix Roundoff.

Row ( int i ) : Vector

Rows.

SVD ( Matrix A ) : Tuple

Singular Value Decomposition.

Save ( string file ) : void

Save matrix to file

Slice ( Matrix m, IEnumerable indices ) : Matrix

Slices.

Slice ( Matrix m, IEnumerable indices, VectorType t ) : Matrix

Slices.

Sort ( Matrix source, double>.Func keySelector, VectorType t, bool ascending = true ) : Matrix

Sorts the given Matrix by the specified row or column selector and returns the new Matrix

Sort ( Matrix source, double>.Func keySelector, VectorType t, bool ascending, Vector &indices ) : Matrix

Sorts the given Matrix by the specified row or column selector and returns the new Matrix along with the original indices.

Stack ( ) : Matrix

Stack a set of vectors into a matrix.

Stack ( Matrix m, Matrix t ) : Matrix

Stack a set of vectors into a matrix.

Stats ( Matrix x, VectorType t = VectorType.Row ) : Matrix[]

Statistics.

StdDev ( Matrix source, VectorType t = VectorType.Col ) : Vector

Computes the standard deviation of the given matrix

Sum ( Matrix m, VectorType t ) : Vector

Computes the sum of either the rows or columns of a matrix and returns a vector.

Sum ( Matrix m ) : double

Computes the sum of every element of the matrix.

Sum ( Matrix m, int i, VectorType t ) : double

Computes the sum of every element of the matrix.

Swap ( int from, int to, VectorType t ) : void

Swaps.

SwapCol ( int from, int to ) : void

Swap col.

SwapRow ( int from, int to ) : void

Swap row.

ToString ( ) : string

Returns a string that represents the current object.

ToVector ( ) : Vector

Converts this object to a vector.

Trace ( Matrix m ) : double

Computes the trace of a matrix.

Transpose ( ) : Matrix

Deep copy transpose.

Unshape ( Matrix m, VectorType dimensionType = VectorType.Col ) : Vector

Unshapes the given Matrix into a Vector form along the dimensionType axis.

Reads from the source Matrix and stacks from right to left when dimensionType equals 'Col' otherwise uses a bottom up approach.

VStack ( ) : Matrix

Stacks.

VStack ( Matrix m, Matrix t ) : Matrix

Stacks.

Zeros ( int n ) : Matrix

Initial Zero Matrix (n by n)

Zeros ( int n, int d ) : Matrix

Initial zero matrix.

operator ( ) : IEnumerable

Returns an array of index (i, j) pairs matching indices that are not equal to the supplied value.

operator ( ) : Matrix

matrix multiplication.

operator ( ) : Vector

Solves Ax = b for x If A is not square or the system is overdetermined, this operation solves the linear least squares A.T * A x = A.T * b.

operator ( ) : bool

Inequality operator.

this ( bool>.Func f, VectorType t ) : Matrix

Indexer to get items within this collection using array index syntax.

this ( int i ) : Vector

Returns row vector specified at index i.

this ( int i, VectorType t ) : Vector

returns col/row vector at index j.

this ( bool>.Func f ) : double

Indexer to set items within this collection using array index syntax.

this ( IEnumerable slice ) : double

Indexer to set items within this collection using an n x 2 array of indices to set.

this ( int i, int j ) : double

Accessor.

Private Methods

Méthode Description
Backward ( Matrix A, Vector b ) : Vector

Backwards.

Forward ( Matrix A, Vector b ) : Vector

Forwards.

Inverse ( Matrix mat ) : Matrix

Inverses the given matrix.

Matrix ( ) : System

Used only internally.

Stack ( VectorType type ) : Matrix

Stack a set of vectors into a matrix.

ToArray ( ) : double[][]

Performs a deep copy of the underlying matrix and returns a 2D array.

ToTransposeArray ( ) : double[][]

Performs a deep copy of the underlying matrix, transpose it and returns a 2D array.

Method Details

Center() public méthode

In place centering. WARNING: WILL UPDATE MATRIX!
public Center ( VectorType t ) : Matrix
t VectorType .
Résultat Matrix

Cholesky() public static méthode

Cholesky Factorization of a Matrix.
Thrown when the requested operation is invalid. Thrown when a Singular Matrix error condition occurs.
public static Cholesky ( Matrix m ) : Matrix
m Matrix Input Matrix.
Résultat Matrix

Col() public méthode

Cols.
public Col ( int i ) : Vector
i int Zero-based index of the.
Résultat Vector

Copy() public méthode

create deep copy of matrix.
public Copy ( ) : Matrix
Résultat Matrix

Correlation() public static méthode

Correlations.
public static Correlation ( Matrix source, VectorType t = VectorType.Col ) : Matrix
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Résultat Matrix

Covariance() public static méthode

Covariances.
public static Covariance ( Matrix source, VectorType t = VectorType.Col ) : Matrix
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Résultat Matrix

CovarianceDiag() public static méthode

Covariance diagram.
public static CovarianceDiag ( Matrix source, VectorType t = VectorType.Col ) : Vector
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Résultat Vector

Create() public static méthode

Creates a new Matrix.
public static Create ( int n, Func f ) : Matrix
n int Size.
f Func The Func<int,int,double> to process.
Résultat Matrix

Create() public static méthode

Creates a new Matrix.
public static Create ( int n, Func f ) : Matrix
n int Size.
f Func The Func<int,int,double> to process.
Résultat Matrix

Create() public static méthode

Creates a new Matrix.
public static Create ( int n, int d, Func f ) : Matrix
n int Size.
d int cols.
f Func The Func<int,int,double> to process.
Résultat Matrix

Create() public static méthode

Creates a new Matrix.
public static Create ( int n, int d, Func f ) : Matrix
n int Size.
d int cols.
f Func The Func<int,int,double> to process.
Résultat Matrix

Det() public static méthode

Dets the given x coordinate.
Thrown when the requested operation is invalid.
public static Det ( Matrix x ) : double
x Matrix Matrix x.
Résultat double

Diag() public static méthode

Diagrams the given m.
public static Diag ( Matrix m ) : Vector
m Matrix Input Matrix.
Résultat Vector

Dot() public static méthode

Dot product between a matrix and a vector.
Thrown when the requested operation is invalid.
public static Dot ( Matrix x, Vector v ) : Vector
x Matrix Matrix x.
v Vector Vector v.
Résultat Vector

Dot() public static méthode

Dot product between a matrix and a vector.
Thrown when the requested operation is invalid.
public static Dot ( Vector v, Matrix x ) : Vector
v Vector Vector v.
x Matrix Matrix x.
Résultat Vector

Each() public static méthode

Performs an element wise operation on the input Matrix.
public static Each ( Matrix m, double>.Func fnElementWiseOp ) : Matrix
m Matrix Matrix.
fnElementWiseOp double>.Func Function to apply.
Résultat Matrix

Each() public static méthode

Performs an element wise operation on the input Matrix.
public static Each ( Matrix m, Func fnElementWiseOp ) : Matrix
m Matrix Matrix.
fnElementWiseOp Func Function to update each cell specified by the value and cell coordinates.
Résultat Matrix

Each() public static méthode

Performs an element-wise operation on the input Matrices.
public static Each ( Matrix m1, Matrix m2, Func fnElementWiseOp ) : Matrix
m1 Matrix First Matrix.
m2 Matrix Second Matrix.
fnElementWiseOp Func Operation to perform on the value from the first and second matrices.
Résultat Matrix

Equals() public méthode

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( Matrix m, double tol ) : bool
m Matrix initial matrix.
tol double Double to be compared.
Résultat bool

Equals() public méthode

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( object obj ) : bool
obj object The object to compare with the current object.
Résultat bool

Evd() public static méthode

Eigen Decomposition.
public static Evd ( Matrix A ) : Matrix>.Tuple
A Matrix Input Matrix.
Résultat Matrix>.Tuple

Extract() public static méthode

Extracts this object.
public static Extract ( Matrix m, int x, int y, int width, int height, bool safe = true ) : Matrix
m Matrix Input Matrix.
x int Matrix x.
y int The y coordinate.
width int The width.
height int The height.
safe bool (Optional) true to safe.
Résultat Matrix

FrobeniusNorm() public static méthode

Matrix Frobenius Norm.
public static FrobeniusNorm ( Matrix A ) : double
A Matrix Input Matrix.
Résultat double

GetCols() public méthode

Gets the cols in this collection.
public GetCols ( ) : IEnumerable
Résultat IEnumerable

GetHashCode() public méthode

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Résultat int

GetMatrix() public méthode

Gets a matrix.
public GetMatrix ( int d1, int d2, int n1, int n2 ) : Matrix
d1 int The first int.
d2 int The second int.
n1 int The first int.
n2 int The second int.
Résultat Matrix

GetRows() public méthode

Gets the rows in this collection.
public GetRows ( ) : IEnumerable
Résultat IEnumerable

GetVector() public méthode

Gets a vector.
public GetVector ( int index, int from, int to, VectorType type ) : Vector
index int Zero-based index of the.
from int Source for the.
to int to.
type VectorType The type.
Résultat Vector

Identity() public static méthode

n x n identity matrix.
public static Identity ( int n ) : Matrix
n int Size.
Résultat Matrix

Identity() public static méthode

n x d identity matrix.
public static Identity ( int n, int d ) : Matrix
n int rows.
d int cols.
Résultat Matrix

Indices() public static méthode

Enumerates indices in this collection.
public static Indices ( Matrix source, bool>.Func f ) : IEnumerable
source Matrix Source for the.
f bool>.Func The Func<Vector,bool> to process.
Résultat IEnumerable

Indices() public static méthode

Enumerates indices in this collection.
public static Indices ( Matrix source, bool>.Func f, VectorType t ) : IEnumerable
source Matrix Source for the.
f bool>.Func The Func<Vector,bool> to process.
t VectorType Row or Column sum.
Résultat IEnumerable

Insert() public méthode

Returns a new Matrix with the Vector inserted at the specified position
public Insert ( Vector v, int index, VectorType t, bool insertAfter = true ) : Matrix
v Vector Vector to insert
index int The zero based row / column.
t VectorType Vector orientation
insertAfter bool Insert after or before the last row / column
Résultat Matrix

Inverse() public méthode

Creates an inverse of the current matrix
public Inverse ( ) : Matrix
Résultat Matrix

LU() public static méthode

NOT IMPLEMENTED!
Thrown when the requested operation is invalid.
public static LU ( Matrix A ) : Tuple
A Matrix .
Résultat Tuple

Load() public static méthode

Loads the given stream.
Thrown when the requested file is not present.
public static Load ( string file ) : Matrix
file string The file to load.
Résultat Matrix

Matrix() public méthode

Create new matrix with prepopulated vals.
public Matrix ( double m ) : System
m double initial matrix.
Résultat System

Matrix() public méthode

Create matrix n x n matrix.
public Matrix ( int n ) : System
n int size.
Résultat System

Matrix() public méthode

Create new n x d matrix.
public Matrix ( int n, int d ) : System
n int rows.
d int cols.
Résultat System

Max() public static méthode

Returns a vector of the maximum values for each row/column.
public static Max ( Matrix source, VectorType t = VectorType.Col ) : Vector
source Matrix
t VectorType Use column or row (default: Col)
Résultat Vector

Max() public static méthode

Determines the maximum of the given parameters.
public static Max ( Matrix source ) : double
source Matrix Source for the.
Résultat double

Mean() public static méthode

Determines the mean of the given parameters.
public static Mean ( Matrix source, VectorType t ) : Vector
source Matrix Source for the.
t VectorType Row or Column sum.
Résultat Vector

Median() public static méthode

Returns a vector of the median values for each row or column.
public static Median ( Matrix source, VectorType t = VectorType.Col ) : Vector
source Matrix Matrix.
t VectorType VectorType.
Résultat Vector

Min() public static méthode

Returns a vector of the minimum values for each row/column.
public static Min ( Matrix source, VectorType t = VectorType.Col ) : Vector
source Matrix
t VectorType Use column or row (default: Col)
Résultat Vector

Min() public static méthode

Determines the minimum of the given parameters.
public static Min ( Matrix source ) : double
source Matrix Source for the.
Résultat double

Norm() public static méthode

Standard Matrix Norm.
public static Norm ( Matrix A, double p ) : double
A Matrix Input Matrix.
p double The double to process.
Résultat double

NormRand() public static méthode

Normalise random.
Thrown when the requested operation is invalid.
public static NormRand ( Vector means, Vector stdDev, int n ) : Matrix
means Vector The means.
stdDev Vector The standard development.
n int Size.
Résultat Matrix

NormRand() public static méthode

Normalise random.
public static NormRand ( int n, double min ) : Matrix
n int Size.
min double (Optional) the minimum.
Résultat Matrix

NormRand() public static méthode

Normalise random.
public static NormRand ( int n, int d, double min ) : Matrix
n int Size.
d int cols.
min double (Optional) the minimum.
Résultat Matrix

Normalize() public méthode

In place normalization. WARNING: WILL UPDATE MATRIX!
public Normalize ( VectorType t ) : void
t VectorType .
Résultat void

Parse() public static méthode

Parses a string containing MATLAB style Matrix syntax, i.e. "[[1, 2, 3]; [3, 4, 5]]"
public static Parse ( string text ) : Matrix
text string Input string to parse.
Résultat Matrix

Pivot() public static méthode

Pivots the given m.
Thrown when the requested operation is invalid.
public static Pivot ( Matrix M ) : Matrix
M Matrix The Matrix to process.
Résultat Matrix

QR() public static méthode

Modified Gram-Schmidt QR Factorization.
public static QR ( Matrix A ) : Matrix>.Tuple
A Matrix Matrix A.
Résultat Matrix>.Tuple

Rand() public static méthode

Generate a matrix n x d with numbers 0 less than x less than 1 drawn uniformly at random.
public static Rand ( int n, double min ) : Matrix
n int rows.
min double (Optional) the minimum.
Résultat Matrix

Rand() public static méthode

Generate a matrix n x d with numbers 0 less than x less than 1 drawn uniformly at random.
public static Rand ( int n, int d, double min ) : Matrix
n int rows.
d int cols.
min double (Optional) the minimum.
Résultat Matrix

Remove() public méthode

Removes this object.
public Remove ( int index, VectorType t ) : Matrix
index int Zero-based index of the.
t VectorType .
Résultat Matrix

Reshape() public static méthode

Reshapes the supplied matrix into a new matrix shape.
public static Reshape ( Matrix m, int rows, int cols ) : Matrix
m Matrix Matrix to reshape.
rows int Number of rows of the new matrix.
cols int Number of columns of the new matrix.
Résultat Matrix

Reshape() public static méthode

Reshapes the supplied Vector into a Matrix form.
public static Reshape ( Vector v, int dimension, VectorType dimensionType = VectorType.Col, VectorType byVector = VectorType.Row ) : Matrix
v Vector Source vector to act on.
dimension int Length of the specified dimension.
dimensionType VectorType Dimension type to use for creating a by n matrix.
byVector VectorType Direction to process, i.e. Row = Fill Down then Right, or Col = Fill Right then Down
Résultat Matrix

Reshape() public static méthode

Reshapes the supplied Vector into a Matrix form.
public static Reshape ( Vector v, int rows, int columns, VectorType byVector = VectorType.Row ) : Matrix
v Vector Vector to reshape.
rows int Height of the matrix to return
columns int Width of the matrix to return
byVector VectorType Direction to process, i.e. Row = Fill Down then Right, or Col = Fill Right then Down
Résultat Matrix

Reverse() public static méthode

Enumerates reverse in this collection.
public static Reverse ( Matrix source, VectorType t = VectorType.Row ) : IEnumerable
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Résultat IEnumerable

Round() public static méthode

Matrix Roundoff.
public static Round ( Matrix m, int decimals ) : Matrix
m Matrix Input Matrix.
decimals int (Optional) Max number of decimals (default 0 - integral members)
Résultat Matrix

Row() public méthode

Rows.
public Row ( int i ) : Vector
i int Zero-based index of the.
Résultat Vector

SVD() public static méthode

Singular Value Decomposition.
Thrown when the requested operation is unimplemented.
public static SVD ( Matrix A ) : Tuple
A Matrix Input Matrix.
Résultat Tuple

Save() public méthode

Save matrix to file
public Save ( string file ) : void
file string file to save
Résultat void

Slice() public static méthode

Slices.
public static Slice ( Matrix m, IEnumerable indices ) : Matrix
m Matrix Input Matrix.
indices IEnumerable The indices.
Résultat Matrix

Slice() public static méthode

Slices.
public static Slice ( Matrix m, IEnumerable indices, VectorType t ) : Matrix
m Matrix Input Matrix.
indices IEnumerable The indices.
t VectorType Row or Column sum.
Résultat Matrix

Sort() public static méthode

Sorts the given Matrix by the specified row or column selector and returns the new Matrix
public static Sort ( Matrix source, double>.Func keySelector, VectorType t, bool ascending = true ) : Matrix
source Matrix The Matrix
keySelector double>.Func Property selector to sort by.
t VectorType Specifies whether to sort horizontally or vertically.
ascending bool Determines whether to sort ascending or descending (Default: True)
Résultat Matrix

Sort() public static méthode

Sorts the given Matrix by the specified row or column selector and returns the new Matrix along with the original indices.
public static Sort ( Matrix source, double>.Func keySelector, VectorType t, bool ascending, Vector &indices ) : Matrix
source Matrix The Matrix
keySelector double>.Func Property selector to sort by.
t VectorType Specifies whether to sort horizontally or vertically.
ascending bool Determines whether to sort ascending or descending (Default: True)
indices Vector Vector of indices in the original Matrix before the sort operation.
Résultat Matrix

Stack() public static méthode

Stack a set of vectors into a matrix.
public static Stack ( ) : Matrix
Résultat Matrix

Stack() public static méthode

Stack a set of vectors into a matrix.
Thrown when the requested operation is invalid.
public static Stack ( Matrix m, Matrix t ) : Matrix
m Matrix Input Matrix.
t Matrix Row or Column sum.
Résultat Matrix

Stats() public static méthode

Statistics.
public static Stats ( Matrix x, VectorType t = VectorType.Row ) : Matrix[]
x Matrix Matrix x.
t VectorType (Optional) Row or Column sum.
Résultat Matrix[]

StdDev() public static méthode

Computes the standard deviation of the given matrix
public static StdDev ( Matrix source, VectorType t = VectorType.Col ) : Vector
source Matrix
t VectorType Use column or row (default: Col)
Résultat Vector

Sum() public static méthode

Computes the sum of either the rows or columns of a matrix and returns a vector.
public static Sum ( Matrix m, VectorType t ) : Vector
m Matrix Input Matrix.
t VectorType Row or Column sum.
Résultat Vector

Sum() public static méthode

Computes the sum of every element of the matrix.
public static Sum ( Matrix m ) : double
m Matrix Input Matrix.
Résultat double

Sum() public static méthode

Computes the sum of every element of the matrix.
public static Sum ( Matrix m, int i, VectorType t ) : double
m Matrix Input Matrix.
i int Zero-based index of the.
t VectorType Row or Column sum.
Résultat double

Swap() public méthode

Swaps.
public Swap ( int from, int to, VectorType t ) : void
from int Source for the.
to int to.
t VectorType .
Résultat void

SwapCol() public méthode

Swap col.
public SwapCol ( int from, int to ) : void
from int Source for the.
to int to.
Résultat void

SwapRow() public méthode

Swap row.
public SwapRow ( int from, int to ) : void
from int Source for the.
to int to.
Résultat void

ToString() public méthode

Returns a string that represents the current object.
public ToString ( ) : string
Résultat string

ToVector() public méthode

Converts this object to a vector.
Thrown when the requested operation is invalid.
public ToVector ( ) : Vector
Résultat Vector

Trace() public static méthode

Computes the trace of a matrix.
public static Trace ( Matrix m ) : double
m Matrix Input Matrix.
Résultat double

Transpose() public méthode

Deep copy transpose.
public Transpose ( ) : Matrix
Résultat Matrix

Unshape() public static méthode

Unshapes the given Matrix into a Vector form along the dimensionType axis.

Reads from the source Matrix and stacks from right to left when dimensionType equals 'Col' otherwise uses a bottom up approach.

public static Unshape ( Matrix m, VectorType dimensionType = VectorType.Col ) : Vector
m Matrix The Matrix to act on.
dimensionType VectorType Type of the dimension to use when unrolling the Matrix.
Résultat Vector

VStack() public static méthode

Stacks.
public static VStack ( ) : Matrix
Résultat Matrix

VStack() public static méthode

Stacks.
Thrown when the requested operation is invalid.
public static VStack ( Matrix m, Matrix t ) : Matrix
m Matrix Input Matrix.
t Matrix Row or Column sum.
Résultat Matrix

Zeros() public static méthode

Initial Zero Matrix (n by n)
public static Zeros ( int n ) : Matrix
n int Size.
Résultat Matrix

Zeros() public static méthode

Initial zero matrix.
public static Zeros ( int n, int d ) : Matrix
n int .
d int .
Résultat Matrix

operator() public static méthode

Returns an array of index (i, j) pairs matching indices that are not equal to the supplied value.
public static operator ( ) : IEnumerable
Résultat IEnumerable

operator() public static méthode

matrix multiplication.
Thrown when the requested operation is invalid.
public static operator ( ) : Matrix
Résultat Matrix

operator() public static méthode

Solves Ax = b for x If A is not square or the system is overdetermined, this operation solves the linear least squares A.T * A x = A.T * b.
Thrown when the requested operation is invalid.
public static operator ( ) : Vector
Résultat Vector

operator() public static méthode

Inequality operator.
public static operator ( ) : bool
Résultat bool

this() public méthode

Indexer to get items within this collection using array index syntax.
public this ( bool>.Func f, VectorType t ) : Matrix
f bool>.Func The Func<Vector,bool> to process.
t VectorType The VectorType to process.
Résultat Matrix

this() public méthode

Returns row vector specified at index i.
public this ( int i ) : Vector
i int row index.
Résultat Vector

this() public méthode

returns col/row vector at index j.
public this ( int i, VectorType t ) : Vector
i int Col/Row.
t VectorType Row or Column.
Résultat Vector

this() public méthode

Indexer to set items within this collection using array index syntax.
public this ( bool>.Func f ) : double
f bool>.Func The Func<double,bool> to process.
Résultat double

this() public méthode

Indexer to set items within this collection using an n x 2 array of indices to set.
public this ( IEnumerable slice ) : double
slice IEnumerable An n x 2 array of indices to set.
Résultat double

this() public méthode

Accessor.
public this ( int i, int j ) : double
i int Row.
j int Column.
Résultat double