commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
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.


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

View raw message