commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] RealMatrix.set(double)
Date Fri, 26 Aug 2011 05:45:50 GMT
On 8/25/11 8:11 AM, Ted Dunning wrote:
> 2011/8/25 S├ębastien Brisard <sebastien.brisard@m4x.org>
>
>> Hi Ted,
>>
>>> You missed my suggestion.
>>>
>> are you referring to the thread named "New method: "addToEntry" in
>> "RealVector""?
>> If yes, I initially thought that what you suggested was pretty similar
>> to the Visitor approach.
>> Thanks to the above message, I now understand that your suggestion is
>> the Visitor approach PLUS the ability to provide different "views" of
>> the same matrix/vector.
>> Is that correct?
>
> Yes.  Views are critical to the suggestion because they control where the
> visitor goes.
>
> Allowing more general visitors than a pure element function is probably a
> great idea.  It is not uncommon to need the indexes of the element.
>
>
>> Should I dive into Mahout to understand more on this topic?
>>
> Your choice.
>
> Here is some (very) recent code that makes use of these capabilities:
>
> https://github.com/tdunning/mahout/blob/new-stochastic/math/src/main/java/org/apache/mahout/math/CholeskyDecomposition.java
>
> https://github.com/tdunning/mahout/blob/new-stochastic/math/src/main/java/org/apache/mahout/math/ssvd/SequentialBigSvd.java
>

Thanks, Ted.  That does look very flexible and approachable too.  I
am sorry to flip-flop on this issue; but I am now thinking it might
actually be better to replace the visitor setup that we have with
something like the above, partly due to Greg's comments as well on
the limitations of the current code.  I encourage others to have a
look at the Mahout code and consider the pros and cons of
refactoring.  I don't think the visitor machinery is really used
internally, so refactoring would not be cataclysmic.  Now is the
time to do it if we want to go to a model based more on views and
the functional approach.

Phil

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


Mime
View raw message