C# Класс numl.Math.LinearAlgebra.Matrix

A matrix.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Center() публичный метод

In place centering. WARNING: WILL UPDATE MATRIX!
public Center ( VectorType t ) : Matrix
t VectorType .
Результат Matrix

Cholesky() публичный статический метод

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.
Результат Matrix

Col() публичный метод

Cols.
public Col ( int i ) : Vector
i int Zero-based index of the.
Результат Vector

Copy() публичный метод

create deep copy of matrix.
public Copy ( ) : Matrix
Результат Matrix

Correlation() публичный статический метод

Correlations.
public static Correlation ( Matrix source, VectorType t = VectorType.Col ) : Matrix
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Результат Matrix

Covariance() публичный статический метод

Covariances.
public static Covariance ( Matrix source, VectorType t = VectorType.Col ) : Matrix
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Результат Matrix

CovarianceDiag() публичный статический метод

Covariance diagram.
public static CovarianceDiag ( Matrix source, VectorType t = VectorType.Col ) : Vector
source Matrix Source for the.
t VectorType (Optional) Row or Column sum.
Результат Vector

Create() публичный статический метод

Creates a new Matrix.
public static Create ( int n, Func f ) : Matrix
n int Size.
f Func The Func<int,int,double> to process.
Результат Matrix

Create() публичный статический метод

Creates a new Matrix.
public static Create ( int n, Func f ) : Matrix
n int Size.
f Func The Func<int,int,double> to process.
Результат Matrix

Create() публичный статический метод

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.
Результат Matrix

Create() публичный статический метод

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.
Результат Matrix

Det() публичный статический метод

Dets the given x coordinate.
Thrown when the requested operation is invalid.
public static Det ( Matrix x ) : double
x Matrix Matrix x.
Результат double

Diag() публичный статический метод

Diagrams the given m.
public static Diag ( Matrix m ) : Vector
m Matrix Input Matrix.
Результат Vector

Dot() публичный статический метод

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.
Результат Vector

Dot() публичный статический метод

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.
Результат Vector

Each() публичный статический метод

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.
Результат Matrix

Each() публичный статический метод

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.
Результат Matrix

Each() публичный статический метод

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.
Результат Matrix

Equals() публичный метод

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.
Результат bool

Equals() публичный метод

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.
Результат bool

Evd() публичный статический метод

Eigen Decomposition.
public static Evd ( Matrix A ) : Matrix>.Tuple
A Matrix Input Matrix.
Результат Matrix>.Tuple

Extract() публичный статический метод

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.
Результат Matrix

FrobeniusNorm() публичный статический метод

Matrix Frobenius Norm.
public static FrobeniusNorm ( Matrix A ) : double
A Matrix Input Matrix.
Результат double

GetCols() публичный метод

Gets the cols in this collection.
public GetCols ( ) : IEnumerable
Результат IEnumerable

GetHashCode() публичный метод

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Результат int

GetMatrix() публичный метод

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.
Результат Matrix

GetRows() публичный метод

Gets the rows in this collection.
public GetRows ( ) : IEnumerable
Результат IEnumerable

GetVector() публичный метод

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.
Результат Vector

Identity() публичный статический метод

n x n identity matrix.
public static Identity ( int n ) : Matrix
n int Size.
Результат Matrix

Identity() публичный статический метод

n x d identity matrix.
public static Identity ( int n, int d ) : Matrix
n int rows.
d int cols.
Результат Matrix

Indices() публичный статический метод

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.
Результат IEnumerable

Indices() публичный статический метод

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.
Результат IEnumerable

Insert() публичный метод

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
Результат Matrix

Inverse() публичный метод

Creates an inverse of the current matrix
public Inverse ( ) : Matrix
Результат Matrix

LU() публичный статический метод

NOT IMPLEMENTED!
Thrown when the requested operation is invalid.
public static LU ( Matrix A ) : Tuple
A Matrix .
Результат Tuple

Load() публичный статический метод

Loads the given stream.
Thrown when the requested file is not present.
public static Load ( string file ) : Matrix
file string The file to load.
Результат Matrix

Matrix() публичный метод

Create new matrix with prepopulated vals.
public Matrix ( double m ) : System
m double initial matrix.
Результат System

Matrix() публичный метод

Create matrix n x n matrix.
public Matrix ( int n ) : System
n int size.
Результат System

Matrix() публичный метод

Create new n x d matrix.
public Matrix ( int n, int d ) : System
n int rows.
d int cols.
Результат System

Max() публичный статический метод

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)
Результат Vector

Max() публичный статический метод

Determines the maximum of the given parameters.
public static Max ( Matrix source ) : double
source Matrix Source for the.
Результат double

Mean() публичный статический метод

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.
Результат Vector

Median() публичный статический метод

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.
Результат Vector

Min() публичный статический метод

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)
Результат Vector

Min() публичный статический метод

Determines the minimum of the given parameters.
public static Min ( Matrix source ) : double
source Matrix Source for the.
Результат double

Norm() публичный статический метод

Standard Matrix Norm.
public static Norm ( Matrix A, double p ) : double
A Matrix Input Matrix.
p double The double to process.
Результат double

NormRand() публичный статический метод

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.
Результат Matrix

NormRand() публичный статический метод

Normalise random.
public static NormRand ( int n, double min ) : Matrix
n int Size.
min double (Optional) the minimum.
Результат Matrix

NormRand() публичный статический метод

Normalise random.
public static NormRand ( int n, int d, double min ) : Matrix
n int Size.
d int cols.
min double (Optional) the minimum.
Результат Matrix

Normalize() публичный метод

In place normalization. WARNING: WILL UPDATE MATRIX!
public Normalize ( VectorType t ) : void
t VectorType .
Результат void

Parse() публичный статический метод

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.
Результат Matrix

Pivot() публичный статический метод

Pivots the given m.
Thrown when the requested operation is invalid.
public static Pivot ( Matrix M ) : Matrix
M Matrix The Matrix to process.
Результат Matrix

QR() публичный статический метод

Modified Gram-Schmidt QR Factorization.
public static QR ( Matrix A ) : Matrix>.Tuple
A Matrix Matrix A.
Результат Matrix>.Tuple

Rand() публичный статический метод

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.
Результат Matrix

Rand() публичный статический метод

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.
Результат Matrix

Remove() публичный метод

Removes this object.
public Remove ( int index, VectorType t ) : Matrix
index int Zero-based index of the.
t VectorType .
Результат Matrix

Reshape() публичный статический метод

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.
Результат Matrix

Reshape() публичный статический метод

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
Результат Matrix

Reshape() публичный статический метод

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
Результат Matrix

Reverse() публичный статический метод

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.
Результат IEnumerable

Round() публичный статический метод

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)
Результат Matrix

Row() публичный метод

Rows.
public Row ( int i ) : Vector
i int Zero-based index of the.
Результат Vector

SVD() публичный статический метод

Singular Value Decomposition.
Thrown when the requested operation is unimplemented.
public static SVD ( Matrix A ) : Tuple
A Matrix Input Matrix.
Результат Tuple

Save() публичный метод

Save matrix to file
public Save ( string file ) : void
file string file to save
Результат void

Slice() публичный статический метод

Slices.
public static Slice ( Matrix m, IEnumerable indices ) : Matrix
m Matrix Input Matrix.
indices IEnumerable The indices.
Результат Matrix

Slice() публичный статический метод

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.
Результат Matrix

Sort() публичный статический метод

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)
Результат Matrix

Sort() публичный статический метод

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.
Результат Matrix

Stack() публичный статический метод

Stack a set of vectors into a matrix.
public static Stack ( ) : Matrix
Результат Matrix

Stack() публичный статический метод

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.
Результат Matrix

Stats() публичный статический метод

Statistics.
public static Stats ( Matrix x, VectorType t = VectorType.Row ) : Matrix[]
x Matrix Matrix x.
t VectorType (Optional) Row or Column sum.
Результат Matrix[]

StdDev() публичный статический метод

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)
Результат Vector

Sum() публичный статический метод

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.
Результат Vector

Sum() публичный статический метод

Computes the sum of every element of the matrix.
public static Sum ( Matrix m ) : double
m Matrix Input Matrix.
Результат double

Sum() публичный статический метод

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.
Результат double

Swap() публичный метод

Swaps.
public Swap ( int from, int to, VectorType t ) : void
from int Source for the.
to int to.
t VectorType .
Результат void

SwapCol() публичный метод

Swap col.
public SwapCol ( int from, int to ) : void
from int Source for the.
to int to.
Результат void

SwapRow() публичный метод

Swap row.
public SwapRow ( int from, int to ) : void
from int Source for the.
to int to.
Результат void

ToString() публичный метод

Returns a string that represents the current object.
public ToString ( ) : string
Результат string

ToVector() публичный метод

Converts this object to a vector.
Thrown when the requested operation is invalid.
public ToVector ( ) : Vector
Результат Vector

Trace() публичный статический метод

Computes the trace of a matrix.
public static Trace ( Matrix m ) : double
m Matrix Input Matrix.
Результат double

Transpose() публичный метод

Deep copy transpose.
public Transpose ( ) : Matrix
Результат Matrix

Unshape() публичный статический метод

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.
Результат Vector

VStack() публичный статический метод

Stacks.
public static VStack ( ) : Matrix
Результат Matrix

VStack() публичный статический метод

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.
Результат Matrix

Zeros() публичный статический метод

Initial Zero Matrix (n by n)
public static Zeros ( int n ) : Matrix
n int Size.
Результат Matrix

Zeros() публичный статический метод

Initial zero matrix.
public static Zeros ( int n, int d ) : Matrix
n int .
d int .
Результат Matrix

operator() публичный статический метод

Returns an array of index (i, j) pairs matching indices that are not equal to the supplied value.
public static operator ( ) : IEnumerable
Результат IEnumerable

operator() публичный статический метод

matrix multiplication.
Thrown when the requested operation is invalid.
public static operator ( ) : Matrix
Результат Matrix

operator() публичный статический метод

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
Результат Vector

operator() публичный статический метод

Inequality operator.
public static operator ( ) : bool
Результат bool

this() публичный метод

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.
Результат Matrix

this() публичный метод

Returns row vector specified at index i.
public this ( int i ) : Vector
i int row index.
Результат Vector

this() публичный метод

returns col/row vector at index j.
public this ( int i, VectorType t ) : Vector
i int Col/Row.
t VectorType Row or Column.
Результат Vector

this() публичный метод

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.
Результат double

this() публичный метод

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.
Результат double

this() публичный метод

Accessor.
public this ( int i, int j ) : double
i int Row.
j int Column.
Результат double