Ejemplo n.º 1
0
//---------------------------------------------------------
DVec& lu_solve(DMat& LU, const DVec& b)
//---------------------------------------------------------
{
  // Solve a linear system using lu-factored square matrix.

  DVec *x = new DVec("x", OBJ_temp);
  try {
    LU.solve_LU(b, (*x), false, false);
  } catch(...) { x->Free(); }
  return (*x);
}