I should also note that the reason why any correctness error has
not been seen in minus() is that it's basically not used - any time
I want to use something like that, I first check whether a new copy
is needed, or whether a mutating method can be allowed, and if
it can, I just do:
mutatableOne.
On Mon, Apr 19, 2010 at 5:33 PM, Jake Mannix wrote:
> result.times(-1.0)
> with
> result.assign(Functions.negate)
Cool, good one.
> The efficiency points are twofold: number of nonzero elements, and
> the impl: you don't want to iterate over a vector of any type while
> continually calling setQu
On Mon, Apr 19, 2010 at 9:43 PM, Sean Owen wrote:
> More on Vector, as I'm browsing through it:
>
> AbstractVector.minus(Vector) says:
>
> public Vector minus(Vector x) {
>if (size() != x.size()) {
> throw new CardinalityException();
&g
On Mon, Apr 19, 2010 at 9:13 AM, Sean Owen wrote:
> More on Vector, as I'm browsing through it:
>
> AbstractVector.minus(Vector) says:
>
//snip
> The stanza after the instanceof checks can just become the body of an
> overriding method in these two subclasses right?