You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@steitz.com> on 2004/06/12 19:37:14 UTC

[math] DoubleArray changes

I would like to make the following changes to the DoubleArray utilities. 
This is partly to make maintenance and documentation easier and to limit 
what we release to what we are actually using.

1. Drop FixedDoubleArray.  It is not used anywhere in [math] and its 
implementation of addElementRolling makes it hard to correctly document 
what this method means at the DoubleArray level.

2. Make setInitialCapacity protected (should only be invoked by constructors)

3. Address TODO regarding "additive" expansion in ExpandableDoubleArray by 
adding a property, "expansionMode" with (int) values ADDITIVE_MODE and 
MULTIPLICATIVE_MODE determining whether expansion means adding 
expansionFactor elements or multiplying the size by this factor. I have 
written code, documenation and test cases for this.

4. Combine ExpandableDoubleArray and ContractableDoubleArray. The latter 
is what we use in [math] and the addElementRolling impl in 
ExpandableDoubleArray is dangerous (the internal array just keeps 
growing). Alternatively, if others feel strongly that 
ExpandableDoubleArray provides an important extension point, we could make 
this class abstract.  I just don't see practical use cases for concrete 
instances of ExpandableDoubleArray.

Phil



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


Re: [math] DoubleArray changes

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Go for it... +1

Phil Steitz wrote:

> I would like to make the following changes to the DoubleArray utilities. 
> This is partly to make maintenance and documentation easier and to limit 
> what we release to what we are actually using.
> 
> 1. Drop FixedDoubleArray.  It is not used anywhere in [math] and its 
> implementation of addElementRolling makes it hard to correctly document 
> what this method means at the DoubleArray level.
> 
> 2. Make setInitialCapacity protected (should only be invoked by 
> constructors)
> 
> 3. Address TODO regarding "additive" expansion in ExpandableDoubleArray 
> by adding a property, "expansionMode" with (int) values ADDITIVE_MODE 
> and MULTIPLICATIVE_MODE determining whether expansion means adding 
> expansionFactor elements or multiplying the size by this factor. I have 
> written code, documenation and test cases for this.
> 
> 4. Combine ExpandableDoubleArray and ContractableDoubleArray. The latter 
> is what we use in [math] and the addElementRolling impl in 
> ExpandableDoubleArray is dangerous (the internal array just keeps 
> growing). Alternatively, if others feel strongly that 
> ExpandableDoubleArray provides an important extension point, we could 
> make this class abstract.  I just don't see practical use cases for 
> concrete instances of ExpandableDoubleArray.
> 
> Phil
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 

-- 
Mark Diggory
Software Developer
Harvard MIT Data Center
http://www.hmdc.harvard.edu

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