From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-04-13 14:41:58
Warning: I think the wiki says that this code will crash on a singular
> -----Original Message-----
> From: ublas-bounces_at_[hidden]
> [mailto:ublas-bounces_at_[hidden]] On Behalf Of Manoj Rajagopalan
> Sent: Thursday, April 13, 2006 7:06 AM
> To: ublas mailing list
> Subject: Re: [ublas] Solving linear equations of the form Ax = b ?
> you can solve Ax=b using three lines of ublas code:
> permutation_matrix<> piv;
> lu_factorize(A, piv);
> lu_substitute(A, piv, x);
> Then x will contain the solution and A is overwritten with its LU
> decomposition. i.e., the original values of A and x are
> destroyed so the
> above lines are actually the inplace_solve(A, x) for a dense,
> generic A.
> BTW, I've come across this in many places - what does
> "boilerplate code"
> mean and why is it called so?
> John Maddock wrote:
> > I gather from a quick web search that ublas does have LUP
> > routines, however a grep of the docs failed to find any
> mention of the
> > routine in question, and how they should be used.
> > So.... does anyone have the boiler plate code needed to
> solve for x given
> > matrix A and vector b ?
> > Many thanks,
> > John Maddock.
> > _______________________________________________
> > ublas mailing list
> > ublas_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/ublas
> ublas mailing list