clusteringfittingintegrationinterpolationjavaleast-squaresmathoptimizationpolynomialsolverstattransforms
7651a6b14d
need for a DoubleArray interface. * ExpandableDoubleArray and the extension ContractableDoubleArray should aim towards presenting a public interface that does not expose any details of the internal. To this end, one is no longer able to get the internal storage array via public double[] getValues(), and the startIndex (which was relative to the internal storage array) is no longer available. * [Expandable|Contractable]DoubleArray now allow one to discard elements from the front of the array. Before this commit, one could accomplish the same goal by changing the starting index of the element array within the internal storage array. This solution allowed one to discard elements from the front of the array (as well as) reclaiming elements by decreases the startIndex. There were two problems with this approach (especially in ContractableDoubleArray). The ContractableDoubleArray can be "compacted" at anytime thereby reseting the startIndex to zero and the size of the internal store array to number of elements plus one. Second, "reclaiming" elements from the internal storage array by finagling internal "pointers" to the start and end index seems to violate the principles of encapsulation. If you "discard" an element from the front of the array, consider it unavailable. It should be noted that calling setNumElements allows one to move the end index of the internal element array at will. Assume one has a 100 element array, and one calls setNumElements(10), thereby decreasing the ending index of the element array by 90. The 90 "dumped" elements are not currently reinitializied to the default double primitive value. This is an open question. * Tests for ExpandableDoubleArray and ContractableDoubleArray were refactored. both test classes now extend a DoubleArrayAbstractTest JUnit class which contained shared unit tests for both "implementations". An approach like this should be adopted to test the Univariate implementations. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140833 13f79535-47bb-0310-9956-ffa450edef68 |
||
---|---|---|
src | ||
.cvsignore | ||
PROPOSAL.html | ||
RELEASE-NOTES.txt | ||
STATUS.html | ||
build.properties.sample | ||
build.xml | ||
project.xml |