using System; namespace Science.Mathematics.LinearAlgebra { public class LeastSquareApproximation { public LeastSquareApproximation(Matrix A, Vector b) { Matrix AtA = A.Transpose * A; Vector Atb = A.Transpose * b; LinearEquation eq = new LinearEquation(AtA, Atb); eq.Solve(); s = eq.Solution; } private double[] s; public double[] Solution { get { return s; } } } }