commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <p...@steitz.com>
Subject [math] DoubleArray changes
Date Sat, 12 Jun 2004 17:37:14 GMT
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


Mime
View raw message