Jutho / KrylovKit.jl

Krylov methods for linear problems, eigenvalues, singular values and matrix functions
Other
284 stars 37 forks source link

mistake in mul! #25

Closed rveltz closed 4 years ago

rveltz commented 4 years ago

Hi,

I am wondering if this line is not a mistake. Indeed this corresponds to mul!(w, α, v) and not the definition in your docs: "mul!(w, v, α): out of place scalar multiplication; multiply vector v with scalar α and store the result in w".

Jutho commented 4 years ago

It took me some time to understand your question, but you mean that the order of the scalar and vector (2nd and 3rd argument) are interchanged with respect to what I write in the docs? Yes this probably needs to be changed to be compatible with the minimal implementation of vector type as written in the docs. Well caught. Julia's AbstractArray's accept both forms of course.

rveltz commented 4 years ago

Yes that is what I mean! You can either change the docs or the code. I hope the others functions linsolve, eigsolve... respect this.

Julia's AbstractArray's accept both forms of course.

I dont like AbstractArray's ;D

Jutho commented 4 years ago

Code update already in place on master, I will tag a new version if tests turn green.

Jutho commented 4 years ago

version 0.4.1 is up.

rveltz commented 4 years ago

Thank you!