commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [math] [linear] immutability
Date Tue, 01 Jan 2013 01:07:54 GMT
Hi.

> > If we stick to
> >
> > 0) algebraic objects are immutable
> > 1) algorithms defined using algebraic concepts should be implemented
> > using algebraic objects
> >
> > ...
> > 0)  Start, with Konstantin's help, by fleshing out the InPlace
> > matrix / vector interface
> > 1)  Integrate Mahout code as part of a wholesale refactoring of the
> > linear package

What do you mean by this?
Copy/paste or create a dependency? Something else?

> > 2)  Extend use of the visitor pattern to perform mutations
> > "in-place" (similar to 0) in effect)
> >

As suggested in a previous post:

3) a) Define a new "minimal matrix" interface, and create immutable
      implementations.
   b) Benchmark critical methods (entry access, iteration, add, multiply,
      etc.)
   c) Quantify the efficiency gain of in-place operations and only when this
      information is available decide whether the gain is worth the price.
      [Even if in-place operations are faster in a single thread context, it
      is not sure that immutability would not change that in a multi-thread
      implementation. Trying to outperform multi-threaded code with in-place
      operations is a dead end.]

Before embarking on any of this, please identify the rationale: Is there
_one_ identified problem that would require urgent action? This discussion
about clean-up/improvement/simplification of the CM matrix implementations
has been going on for months, and we should not start a "new" discussion
without referring to what has been recorded by S├ębastien on JIRA.


Regards,
Gilles

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


Mime
View raw message