commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <>
Subject [math] visitor pattern for vectors
Date Fri, 25 May 2012 01:26:20 GMT
MATH-765 turns out to be too ambitious [1], but one of the points I
raised was deemed worth implementing.

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).

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

Best regards,



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message