Return Vector/Matrix on inplace methods
If someone does one of the inplace Methods, normally this object will be used immediately.
Therefore it makes sense (and is the common way) to return the inplace modified object.
So, instead of
public void MapInplace(Func<T, T> f, Zeros zeros = Zeros.AllowSkip);
a
public Matrix<T> MapInplace(Func<T, T> f, Zeros zeros = Zeros.AllowSkip);
would be good. Also for Vector, and all other inplace methods.
1
vote
Jürgen Vogl
shared this idea