commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject Re: [math] Second thoughts on MATH-803 and "zip-visitor" for vectors.
Date Wed, 28 Nov 2012 03:00:52 GMT
Hi Gilles,


2012/11/27 Gilles Sadowski <gilles@harfang.homelinux.org>

> Hi.
>
> > > [...]
> > > >
> > > > Is "ebeDivide" a (mathematical) "vector" operation?
> > > > IMHO, it's an operation on 2 lists of values.
> > > >
> > >
> > I agree, but it's still useful to have it on vectors... But I'm happy
> with
> > map.
>
> Sorry, I've just implemented the MathArrays option.
> We can always add that in 3.2, but it would need further thought to be sure
> that we cannot come with a better alternative, as part of the overall
> cleanup...
>
> MathArrays is a good option. I just meant that map would be interesting on
top of that (for vectors which might not be array based). I agree, it needs
further thought.
Contrary to what I was satying previously, the visitor pattern might still
be a worthy option, since it allows nive idioms like
v.walkInXxxOrder(EbeMultiply.by(w)),
where EbeMultiply would be the class of the visitor, and EbeMultiply.by a
factory method which keeps a reference to w. I've implemented that locally,
it reads quite well. The downside is that the visitor keeps a local copy of
w.

S├ębastien

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message