C# 클래스 numl.Math.LinearAlgebra.MatrixExtensions

A matrix extensions.
파일 보기 프로젝트 열기: sethjuarez/numl 1 사용 예제들

공개 메소드들

메소드 설명
Cholesky ( this m ) : Matrix

A Matrix extension method that choleskies the given m.

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

A Matrix extension method that correlations.

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

A Matrix extension method that covariances.

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

A Matrix extension method that covariance diagram.

Det ( this m ) : double

computes matrix determinant NOTE: currently using cholesky factorization to save time so non symmetric positive semi-definite matrices will cause problems...

Diag ( this m ) : Vector

A Matrix extension method that diagrams the given m.

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

Performs an element-wise operation on the input Matrix.

Each ( this m, Func fnElementWiseOp ) : Matrix

Performs an element wise operation on the input Matrix.

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

Performs an element-wise operation on the input Matrices.

Eigs ( this m ) : Matrix>.Tuple

A Matrix extension method that eigs the given m.

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

A Matrix extension method that extracts this object.

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

Enumerates indices in this collection.

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

Enumerates indices in this collection.

Max ( this source, VectorType t ) : Vector

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

Max ( this source ) : double

A Matrix extension method that determines the maximum of the given parameters.

Mean ( this source, VectorType t ) : Vector

A Matrix extension method that determines the mean of the given parameters.

Median ( this source, VectorType t ) : Vector

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

Min ( this source, VectorType t ) : Vector

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

Min ( this source ) : double

A Matrix extension method that determines the minimum of the given parameters.

Norm ( this m ) : double

A Matrix extension method that normals.

Norm ( this m, double p ) : double

A Matrix extension method that normals.

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

Enumerates reverse in this collection.

Round ( this m, int decimals ) : Matrix

A Matrix extension method that rounds.

SVD ( this m ) : Tuple

A Matrix extension method that svds the given m.

Slice ( this m, IEnumerable indices ) : Matrix

A Matrix extension method that slices.

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

A Matrix extension method that slices.

Slice ( this m, int minIndex, int maxIndex, VectorType t = VectorType.Row ) : Matrix

Slices the input matrix using starting and stopping positions.

Sort ( this m, double>.Func keySelector, VectorType t, bool isAscending = true ) : Matrix

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

Sort ( this m, double>.Func keySelector, VectorType t, bool isAscending, Vector &indices ) : Matrix

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

Stack ( this m, Matrix t ) : Matrix

A Matrix extension method that stacks.

Stats ( this m ) : Matrix[]

A Matrix extension method that statistics.

Stats ( this m, VectorType t ) : Matrix[]

A Matrix extension method that statistics.

StdDev ( this source, VectorType t ) : Vector

Computes the standard deviation of the given matrix

Sum ( this m, VectorType t ) : Vector

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

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

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

Sum ( this m ) : double

Computes the entire sum of every element in the Matrix.

ToBinary ( this m, bool>.Func fnPredicate, double trueValue = 1.0, double falseValue = 0.0 ) : Matrix

Converts a matrix to a binary indicator matrix based on the specified predicate.

Trace ( this m ) : double

Computes the trace of a matrix.

Unshape ( this m ) : Vector

Unrolls the matrix into an n x 1 vector.

VStack ( this m, Matrix t ) : Matrix

A Matrix extension method that stacks.

메소드 상세

Cholesky() 공개 정적인 메소드

A Matrix extension method that choleskies the given m.
public static Cholesky ( this m ) : Matrix
m this Matrix.
리턴 Matrix

Correlation() 공개 정적인 메소드

A Matrix extension method that correlations.
public static Correlation ( this source, VectorType t = VectorType.Col ) : Matrix
source this The source to act on.
t VectorType (Optional) Row or Column sum.
리턴 Matrix

Covariance() 공개 정적인 메소드

A Matrix extension method that covariances.
public static Covariance ( this source, VectorType t = VectorType.Col ) : Matrix
source this The source to act on.
t VectorType (Optional) Row or Column sum.
리턴 Matrix

CovarianceDiag() 공개 정적인 메소드

A Matrix extension method that covariance diagram.
public static CovarianceDiag ( this source, VectorType t = VectorType.Col ) : Vector
source this The source to act on.
t VectorType (Optional) Row or Column sum.
리턴 Vector

Det() 공개 정적인 메소드

computes matrix determinant NOTE: currently using cholesky factorization to save time so non symmetric positive semi-definite matrices will cause problems...
public static Det ( this m ) : double
m this Matrix.
리턴 double

Diag() 공개 정적인 메소드

A Matrix extension method that diagrams the given m.
public static Diag ( this m ) : Vector
m this Matrix.
리턴 Vector

Each() 공개 정적인 메소드

Performs an element-wise operation on the input Matrix.
public static Each ( this m, double>.Func fnElementWiseOp ) : Matrix
m this Matrix.
fnElementWiseOp double>.Func Function to apply.
리턴 Matrix

Each() 공개 정적인 메소드

Performs an element wise operation on the input Matrix.
public static Each ( this m, Func fnElementWiseOp ) : Matrix
m this Matrix.
fnElementWiseOp Func Function to apply to each cell specified by the value and cell coordinates.
리턴 Matrix

Each() 공개 정적인 메소드

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

Eigs() 공개 정적인 메소드

A Matrix extension method that eigs the given m.
public static Eigs ( this m ) : Matrix>.Tuple
m this Matrix.
리턴 Matrix>.Tuple

Extract() 공개 정적인 메소드

A Matrix extension method that extracts this object.
public static Extract ( this m, int x, int y, int width, int height, bool safe = true ) : Matrix
m this Matrix.
x int The x coordinate.
y int The y coordinate.
width int The width.
height int The height.
safe bool (Optional) true to safe.
리턴 Matrix

Indices() 공개 정적인 메소드

Enumerates indices in this collection.
public static Indices ( this source, bool>.Func f ) : IEnumerable
source this The source to act on.
f bool>.Func The Func<Vector,bool> to process.
리턴 IEnumerable

Indices() 공개 정적인 메소드

Enumerates indices in this collection.
public static Indices ( this source, bool>.Func f, VectorType t ) : IEnumerable
source this The source to act on.
f bool>.Func The Func<Vector,bool> to process.
t VectorType Row or Column sum.
리턴 IEnumerable

Max() 공개 정적인 메소드

Returns a vector of the maximum values for each row/column.
public static Max ( this source, VectorType t ) : Vector
source this
t VectorType
리턴 Vector

Max() 공개 정적인 메소드

A Matrix extension method that determines the maximum of the given parameters.
public static Max ( this source ) : double
source this The source to act on.
리턴 double

Mean() 공개 정적인 메소드

A Matrix extension method that determines the mean of the given parameters.
public static Mean ( this source, VectorType t ) : Vector
source this The source to act on.
t VectorType Row or Column sum.
리턴 Vector

Median() 공개 정적인 메소드

Returns a vector of the median values for each row or column.
public static Median ( this source, VectorType t ) : Vector
source this
t VectorType
리턴 Vector

Min() 공개 정적인 메소드

Returns a vector of the minimum values for each row/column.
public static Min ( this source, VectorType t ) : Vector
source this
t VectorType
리턴 Vector

Min() 공개 정적인 메소드

A Matrix extension method that determines the minimum of the given parameters.
public static Min ( this source ) : double
source this The source to act on.
리턴 double

Norm() 공개 정적인 메소드

A Matrix extension method that normals.
public static Norm ( this m ) : double
m this Matrix.
리턴 double

Norm() 공개 정적인 메소드

A Matrix extension method that normals.
public static Norm ( this m, double p ) : double
m this Matrix.
p double The double to process.
리턴 double

Reverse() 공개 정적인 메소드

Enumerates reverse in this collection.
public static Reverse ( this source, VectorType t = VectorType.Row ) : IEnumerable
source this The source to act on.
t VectorType (Optional) Row or Column sum.
리턴 IEnumerable

Round() 공개 정적인 메소드

A Matrix extension method that rounds.
public static Round ( this m, int decimals ) : Matrix
m this Matrix.
decimals int (Optional) the decimals.
리턴 Matrix

SVD() 공개 정적인 메소드

A Matrix extension method that svds the given m.
public static SVD ( this m ) : Tuple
m this Matrix.
리턴 Tuple

Slice() 공개 정적인 메소드

A Matrix extension method that slices.
public static Slice ( this m, IEnumerable indices ) : Matrix
m this Matrix.
indices IEnumerable The indices.
리턴 Matrix

Slice() 공개 정적인 메소드

A Matrix extension method that slices.
public static Slice ( this m, IEnumerable indices, VectorType t ) : Matrix
m this Matrix.
indices IEnumerable The indices.
t VectorType Row or Column sum.
리턴 Matrix

Slice() 공개 정적인 메소드

Slices the input matrix using starting and stopping positions.
public static Slice ( this m, int minIndex, int maxIndex, VectorType t = VectorType.Row ) : Matrix
m this Source matrix.
minIndex int Minimum index to slice from.
maxIndex int Maximum index to slice.
t VectorType
리턴 Matrix

Sort() 공개 정적인 메소드

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

Sort() 공개 정적인 메소드

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

Stack() 공개 정적인 메소드

A Matrix extension method that stacks.
public static Stack ( this m, Matrix t ) : Matrix
m this Matrix.
t Matrix Row or Column sum.
리턴 Matrix

Stats() 공개 정적인 메소드

A Matrix extension method that statistics.
public static Stats ( this m ) : Matrix[]
m this Matrix.
리턴 Matrix[]

Stats() 공개 정적인 메소드

A Matrix extension method that statistics.
public static Stats ( this m, VectorType t ) : Matrix[]
m this Matrix.
t VectorType Row or Column sum.
리턴 Matrix[]

StdDev() 공개 정적인 메소드

Computes the standard deviation of the given matrix
public static StdDev ( this source, VectorType t ) : Vector
source this
t VectorType Return a Row or Column vector
리턴 Vector

Sum() 공개 정적인 메소드

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

Sum() 공개 정적인 메소드

Computes the sum of either the rows or columns of a matrix and returns a vector.
public static Sum ( Matrix m, int i, VectorType t ) : double
m Matrix Matrix.
i int Zero-based index of the.
t VectorType Row or Column sum.
리턴 double

Sum() 공개 정적인 메소드

Computes the entire sum of every element in the Matrix.
public static Sum ( this m ) : double
m this Matrix.
리턴 double

ToBinary() 공개 정적인 메소드

Converts a matrix to a binary indicator matrix based on the specified predicate.
public static ToBinary ( this m, bool>.Func fnPredicate, double trueValue = 1.0, double falseValue = 0.0 ) : Matrix
m this Matrix.
fnPredicate bool>.Func Function to test each Value.
trueValue double (Optional) Value to set when condition () returns True
falseValue double (Optional) Value to set when condition () returns False
리턴 Matrix

Trace() 공개 정적인 메소드

Computes the trace of a matrix.
public static Trace ( this m ) : double
m this Matrix.
리턴 double

Unshape() 공개 정적인 메소드

Unrolls the matrix into an n x 1 vector.
public static Unshape ( this m ) : Vector
m this
리턴 Vector

VStack() 공개 정적인 메소드

A Matrix extension method that stacks.
public static VStack ( this m, Matrix t ) : Matrix
m this Matrix.
t Matrix Row or Column sum.
리턴 Matrix