Table of Contents

Class MathNetUtil

Namespace
Hi.Geom
Assembly
HiGeom.dll

Utility class for MathNet.Numerics operations.

public static class MathNetUtil
Inheritance
MathNetUtil
Inherited Members

Methods

ClearFloatingZero(Matrix<double>, double)

the elements which the absolute value lower to gap are set to zero.

public static void ClearFloatingZero(Matrix<double> mat, double gap = 1E-07)

Parameters

mat Matrix<double>

target matrix

gap double

gap value

GetCovMatByMultiThread(IList<double[]>, Action<double>, int)

Calculates the covariance matrix for a list of vectors using multi-threading.

public static DenseMatrix GetCovMatByMultiThread(IList<double[]> vecs, Action<double> progressAction = null, int progressTickPerVec = 20)

Parameters

vecs IList<double[]>

The list of vectors to calculate covariance for.

progressAction Action<double>

Optional action to report progress.

progressTickPerVec int

Number of progress ticks per vector processed.

Returns

DenseMatrix

A dense matrix representing the covariance.

GetDiagonalString(Matrix<double>)

Gets a string representation of the diagonal elements of a matrix.

public static string GetDiagonalString(Matrix<double> src)

Parameters

src Matrix<double>

The source matrix to extract diagonal elements from.

Returns

string

A comma-separated string of the diagonal elements with 6 significant digits.

GetInversedWeightMat(Matrix<double>, out int, double, double)

public static Matrix<double> GetInversedWeightMat(Matrix<double> w, out int abandonedIndex, double minGap = 1E-05, double sumTerminate = 0.99999999)

Parameters

w Matrix<double>
abandonedIndex int

abandoned index. Inclusive.

minGap double
sumTerminate double

Returns

Matrix<double>