public double[] SloveSquare(ref SparseMatrix A, ref double[] rightB) { double[] unknown = new double[rightB.Length]; LinearSystemLib linearSolver = new LinearSystemLib(EnumSolver.UmfpackLU); linearSolver.Factorization(A); linearSolver.SolveLinerSystem(ref rightB, ref unknown); linearSolver.FreeSolver(); return unknown; }
public double[] SloveSymmetric(ref SparseMatrix A, ref double[] rightB) { double[] unknown = new double[rightB.Length]; LinearSystemLib linearSolver = new LinearSystemLib(EnumSolver.UmfpackLU); linearSolver.Factorization(A); linearSolver.SolveLinerSystem(ref rightB, ref unknown); linearSolver.FreeSolver(); return(unknown); }
public double[] SlovePositiveDefinite(ref SparseMatrix A, ref double[] rightB) { double[] unknown = new double[rightB.Length]; LinearSystemLib linearSolver = new LinearSystemLib(EnumSolver.CholmodCholesky); linearSolver.Factorization(A); linearSolver.SolveLinerSystem(ref rightB, ref unknown); linearSolver.FreeSolver(); return(unknown); }
public double[] SloveLeastSquare(ref SparseMatrix L, ref double[] b) { double[] result = new double[L.ColumnSize]; LinearSystemLib linearSolver = new LinearSystemLib(); linearSolver.SolverType = EnumSolver.SPQRLeastSqure; linearSolver.Factorization(L); linearSolver.SolveLinerSystem(ref b, ref result); linearSolver.FreeSolver(); return(result); }
public void Factorize(ref SparseMatrix A, EnumSolver solver) { linearSolverPreFactorize = new LinearSystemLib(solver); linearSolverPreFactorize.Factorization(A); }
public void Factorize(ref SparseMatrix A) { linearSolverPreFactorize = new LinearSystemLib(LinearSystemInfo.SolverType); linearSolverPreFactorize.Factorization(A); }
public double[] SlovePositiveDefinite(ref SparseMatrix A, ref double[] rightB) { double[] unknown = new double[rightB.Length]; LinearSystemLib linearSolver = new LinearSystemLib(EnumSolver.CholmodCholesky); linearSolver.Factorization(A); linearSolver.SolveLinerSystem(ref rightB, ref unknown); linearSolver.FreeSolver(); return unknown; }
public double[] SloveLeastNormal(ref SparseMatrix L, ref double[] b) { double[] result = new double[L.ColumnSize]; LinearSystemLib linearSolver = new LinearSystemLib(); linearSolver.SolverType = EnumSolver.SPQRLeastNormal; linearSolver.Factorization(L.Transpose()); linearSolver.SolveLinerSystem(ref b,ref result); linearSolver.FreeSolver(); return result; }