From Sébastien, on the "dev" ML (in the thread with subject "RealMatrix.set(double)"):
I personnaly have come to dislike the schizophrenia in the RealVector
interface between double and RealVector. As double is the simplest
representation of a vector, all methods which take a RealVector as an
argument in the RealVector interface are duplicated to also take a
double as an argument. While this is very flexible for end-users, it
is a bit of a pain when you want to extend this interface in a
consistent way (and it also make the classes implementing RealVector
quite cluttered). I'm just wondering what the real benefit is, since
the existing hierarchy allows (at virtually no cost) the creation of a
RealArrayVector from a double without taking first a (costly) deep
copy of the specified double.
For example, for an end-user, it's not much of a hassle to write
v.add(new ArrayRealVector(w, false))
instead of v.add(w)
w being a double.
Also for the reason that in "AbstractRealVector" many of the methods taking a "double" argument actually delegate to the sibling method that taking an "ArrayRealVector" argument, which looks fairly strange (a superclass relying on one of its subclasses). Even stranger, some methods of the "RealVector" interface are not defined in "AbstractRealVector" e.g.
although its equivalent with a "double" is defined and seems to call the non-existent one above!
Of course, it works thanks to polymorphism and the fact that "AbstractRealVector" can never be instantiated; however it makes the code quite unobvious.
Hence, I'd like to remove all the methods that take a "double" argument as part of this issue.
Is there any objection?