commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math] Questions about sparse implementations
Date Tue, 27 Jan 2009 10:59:32 GMT
Bill Barker wrote:
> I've been working on a SparseRealVector that implements RealVector but is 
> backed by OpenIntToDoubleHashMap.  Unlike SparseRealMatrix, the goal is more 
> speed than space.  Mostly it is going well, but running into a few problems 
> where some RealVector methods are almost nonsensical for sparse vectors 
> (e.g. mapInvToSelf).
> Since the default value of OpenIntToDoubleHashMap is final, this means that 
> I currently have to replace the map in this case (so it really isn't 'self' 
> afterwards).  So what i'm asking is if it is better to have the default 
> value mutable or to allow the backing to be replaced in a "*ToSelf" method. 
I don't understand the question.  Is it that different *ToSelf methods 
require different missingEntries values?  I don't follow how that could 
be the case.  In any case, the question has me thinking that at least 
OpenIntToDoubleHashMap should expose a getter for missingEntries.  I 
agree with Luc though that this field should not be mutable.

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

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

View raw message