You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Dan F <df...@gmail.com> on 2009/02/09 19:29:32 UTC

Re: In-place matrix operations?

My mistake, you probably can't do multiple in place. However, there are
other operations which you can (e.g., scalar multiply), and those also
create copies.

Dan

On Mon, Feb 9, 2009 at 12:05 PM, Dan F <df...@gmail.com> wrote:

> Folks,
>
> Thanks for your work on Apache commons.
>
> It seems to me that Apache commons math is missing API for in-place matrix
> operations. For example, RealMatrix.multiply(RealMatrix m) returns the
> answer as a copy, and there is no other interface that modifies the existing
> matrix. If there are several operations (say 10 in a row) to compute
> something using fairly large matrices, it seems to me this could be a
> significant performance hit.
>
> Please tell me if I am missing something simple.
>
> Dan
>
>

Re: In-place matrix operations?

Posted by Ted Dunning <te...@gmail.com>.
I think you are dead on.

Unfortunately, based on the experience with JAMA and Colt, in-place updates
have two known outcomes ... either the API becomes enormous because of the
factorial nature of the required operations or it becomes fairly abstract as
in the case with Colt.  In the abstract case, it is hard to explain to
people how it works.  But you do get the speed you want.

On Mon, Feb 9, 2009 at 10:29 AM, Dan F <df...@gmail.com> wrote:

> My mistake, you probably can't do multiple in place. However, there are
> other operations which you can (e.g., scalar multiply), and those also
> create copies.
>
> Dan
>
> On Mon, Feb 9, 2009 at 12:05 PM, Dan F <df...@gmail.com> wrote:
>
> > Folks,
> >
> > Thanks for your work on Apache commons.
> >
> > It seems to me that Apache commons math is missing API for in-place
> matrix
> > operations. For example, RealMatrix.multiply(RealMatrix m) returns the
> > answer as a copy, and there is no other interface that modifies the
> existing
> > matrix. If there are several operations (say 10 in a row) to compute
> > something using fairly large matrices, it seems to me this could be a
> > significant performance hit.
> >
> > Please tell me if I am missing something simple.
> >
> > Dan
> >
> >
>



-- 
Ted Dunning, CTO
DeepDyve
4600 Bohannon Drive, Suite 220
Menlo Park, CA 94025
www.deepdyve.com
650-324-0110, ext. 738
858-414-0013 (m)