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 [math] visitor pattern for vectors
Date Fri, 25 May 2012 01:26:20 GMT
Hi,
MATH-765 turns out to be too ambitious [1], but one of the points I
raised was deemed worth implementing.

{quote}
My first suggestion would be on the visitor design pattern vs.
map(UnivariateFunction). The former is specified in the RealMatrix
interface, the latter is specified in the RealVector abstract class. I
think both concepts are similar, and both are useful:
  - visitors know about the cell they are visiting,
  - map() doesn't.
Maybe it would be nice as a first step to unify these concepts. Two
options there
1. Specify both in both interfaces,
2. Specify only the visitor design pattern, and create a factory which
would return a visitor from a UnivariateFunction (ignoring the indices
of the current cell).
{quote}


Gilles wrote that he liked this proposal, and favored option #2. What
do others think?

Best regards,

S├ębastien

[1] http://markmail.org/thread/gvorzl6cvgibkjun


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message