You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Greg Sterijevski <gs...@gmail.com> on 2011/07/20 06:55:57 UTC

[math] Backsolve and Frontsolve

Hello,

I was working on some regression issues when I stumbled into the need to
solve a system like

  R y = b or R'y = b.

R is an upper or lower triangular, b is a vector.

Does this functionality exist? If not, can I add it? And where?

Thanks,

-Greg

Re: [math] Backsolve and Frontsolve

Posted by Greg Sterijevski <gs...@gmail.com>.
Gents,

I noticed that QR and LU have this functionality, but I thought it would be
a bit of a hack. I have the 15 lines of code ready. I will submit it.

-Greg

On Wed, Jul 20, 2011 at 12:54 AM, Phil Steitz <ph...@gmail.com> wrote:

> On 7/19/11 9:55 PM, Greg Sterijevski wrote:
> > Hello,
> >
> > I was working on some regression issues when I stumbled into the need to
> > solve a system like
> >
> >   R y = b or R'y = b.
> >
> > R is an upper or lower triangular, b is a vector.
> >
> > Does this functionality exist? If not, can I add it? And where?
>
> As Ted pointed out, you may be able to somewhat awkwardly get what
> you need from either the QR or LU decomp embedded Solver
> implementations.  If you have the need, itch and time, I would be +1
> to cleanly encapsulate direct back/front solving methods (with the
> appropriate zoo of double[] and matrix operands - see the
> DecompositionSolver interface) into either a DirectSolver class or
> as utility methods added to MatrixUtils.  The latter might make
> replacement of the (duplicate) impls in the decomp solvers and other
> applications easier.  Others may have different / better ideas on this.
>
> Phil
> >
> > Thanks,
> >
> > -Greg
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [math] Backsolve and Frontsolve

Posted by Phil Steitz <ph...@gmail.com>.
On 7/19/11 9:55 PM, Greg Sterijevski wrote:
> Hello,
>
> I was working on some regression issues when I stumbled into the need to
> solve a system like
>
>   R y = b or R'y = b.
>
> R is an upper or lower triangular, b is a vector.
>
> Does this functionality exist? If not, can I add it? And where?

As Ted pointed out, you may be able to somewhat awkwardly get what
you need from either the QR or LU decomp embedded Solver
implementations.  If you have the need, itch and time, I would be +1
to cleanly encapsulate direct back/front solving methods (with the
appropriate zoo of double[] and matrix operands - see the
DecompositionSolver interface) into either a DirectSolver class or
as utility methods added to MatrixUtils.  The latter might make
replacement of the (duplicate) impls in the decomp solvers and other
applications easier.  Others may have different / better ideas on this.

Phil
>
> Thanks,
>
> -Greg
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Backsolve and Frontsolve

Posted by Ted Dunning <te...@gmail.com>.
Can you just use the back-substitution phase of an LUD or QR solver?

On Tue, Jul 19, 2011 at 9:55 PM, Greg Sterijevski <gs...@gmail.com>wrote:

> Hello,
>
> I was working on some regression issues when I stumbled into the need to
> solve a system like
>
>  R y = b or R'y = b.
>
> R is an upper or lower triangular, b is a vector.
>
> Does this functionality exist? If not, can I add it? And where?
>
> Thanks,
>
> -Greg
>