Accord.Math.Matrix.Inverse C# (CSharp) Метод

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

Computes the inverse of a matrix.
public static Inverse ( this matrix ) : ].decimal[
matrix this
Результат ].decimal[
        public static decimal[,] Inverse(this decimal[,] matrix)
        {
            return Inverse(matrix, false);
        }

Same methods

Matrix::Inverse ( this matrix, bool inPlace ) : ].decimal[
Matrix::Inverse ( this matrix ) : decimal[][]
Matrix::Inverse ( this matrix, bool inPlace ) : decimal[][]
Matrix::Inverse ( this matrix ) : ].double[
Matrix::Inverse ( this matrix, bool inPlace ) : ].double[
Matrix::Inverse ( this matrix ) : double[][]
Matrix::Inverse ( this matrix, bool inPlace ) : double[][]
Matrix::Inverse ( this matrix ) : ].float[
Matrix::Inverse ( this matrix, bool inPlace ) : ].float[
Matrix::Inverse ( this matrix ) : float[][]
Matrix::Inverse ( this matrix, bool inPlace ) : float[][]

Usage Example

Пример #1
0
        public static Bezier CreateBezierRegression(List <Vector2> points)
        {
            float[] X = points.Select(x => x.X).ToArray();
            float[] Y = points.Select(x => x.Y).ToArray();

            float[][] T = ComputeTMatrix(X, Y);

            float[] resultX = Matrix.Multiply(Matrix.Multiply(Matrix.Multiply(Matrix.Inverse(M_Matrix), Matrix.Inverse(Matrix.Multiply(Matrix.Transpose(T), T))), Matrix.Transpose(T)), X);
            float[] resultY = Matrix.Multiply(Matrix.Multiply(Matrix.Multiply(Matrix.Inverse(M_Matrix), Matrix.Inverse(Matrix.Multiply(Matrix.Transpose(T), T))), Matrix.Transpose(T)), Y);

            return(new Bezier()
            {
                P1 = new Vector2(resultX[0], resultY[0]),
                C1 = new Vector2(resultX[1], resultY[1]),
                C2 = new Vector2(resultX[2], resultY[2]),
                P2 = new Vector2(resultX[3], resultY[3]),
            });
        }