adamaulia / efficient-java-matrix-library

Automatically exported from code.google.com/p/efficient-java-matrix-library
0 stars 0 forks source link

Request for adding a multiplication method for more than two matrices #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Peter,

When I have to multiply more than two matrices (e.g., A*B*C*...), I try to 
search for a simple method defined in CommonOps but failed.  Is there any one 
could do this?  Or I guess it is not possible to implement such a method.

For a more specific situation in quadratic-form related computation, one has to 
compute C = A * B * A' (or C = A' * B * A).  I think this is possible to add a 
method as multQuadratic(A,B,C) to CommonOps, avoiding allocating temporary 
memory for tmp = A * B and then C = tmp * A'.

I do not find any other libraries implement such a method.  So I can only 
provide you:
http://en.wikipedia.org/wiki/Quadratic_form
for reference.

Original issue reported on code.google.com by miniufo....@gmail.com on 3 Jun 2013 at 12:42

GoogleCodeExporter commented 9 years ago
I looked into doing this.  The implementation I came up with runs about 30% 
slower than performing two separate operations.  Another variant where it uses 
a local array for storage might be faster.  Going to table this suggestion for 
now.  The code is available in the experimental module.

Original comment by peter.ab...@gmail.com on 15 Sep 2014 at 1:40

GoogleCodeExporter commented 9 years ago

Original comment by peter.ab...@gmail.com on 15 Sep 2014 at 1:41