vkostyukov / la4j

Linear Algebra for Java
http://la4j.org
Apache License 2.0
373 stars 108 forks source link

.transpose() reimplemented with MatrixSource proxy #204

Closed vvvvalvalval closed 9 years ago

vvvvalvalval commented 9 years ago

The tests pass on my machine.

vkostyukov commented 9 years ago

Hi @vvvvalvalval,

Thanks for the PR. I can understand why this benefits on CCS matrix: the CCSMatrix constructor fills the matrix column-by-column using the given source, while the transpose() method always does it in a row-by-row way.

There is new operations design concept which is already working for vectors. I was planing to keep doing the same thing for matrices. This performance issue should be gone with TransposeOperation(). But for now we can have you fix merged. Could you please fix the identation (use 4 spaces instead a tab) so I can merge the fix?

vvvvalvalval commented 9 years ago

Here you go!

vkostyukov commented 9 years ago

Thanks @vvvvalvalval! :+1: