protected static mat pinv(double[,] matrix) { return Matrix.PseudoInverse(matrix); } /// <summary>Creates a unit matrix.</summary>