Author: luc
Date: Sun Dec  7 06:39:30 2008
New Revision: 724136

URL: http://svn.apache.org/viewvc?rev=724136&view=rev
Log:
renamed getValues() into getInternalValues() in ResizeableDoubleArray
(the old name is still there, but deprecated)

Modified:
    
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
    
commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java?rev=724136&r1=724135&r2=724136&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
 Sun Dec  7 06:39:30 2008
@@ -421,7 +421,7 @@
      * @return the computed value of the statistic.
      */
     public double apply(UnivariateStatistic stat) {
-        return stat.evaluate(eDA.getValues(), eDA.start(), 
eDA.getNumElements());
+        return stat.evaluate(eDA.getInternalValues(), eDA.start(), 
eDA.getNumElements());
     }
 
     // Implementation getters and setter

Modified: 
commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java?rev=724136&r1=724135&r2=724136&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
 (original)
+++ 
commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
 Sun Dec  7 06:39:30 2008
@@ -619,12 +619,29 @@
      *
      * 
      * @return the internal storage array used by this object
+     * @deprecated replaced by [EMAIL PROTECTED] #getInternalValues()} as of 
2.0
      */
     public synchronized double[] getValues() {
         return (internalArray);
     }
 
     /**
+     * Returns the internal storage array.  Note that this method returns
+     * a reference to the internal storage array, not a copy, and to correctly
+     * address elements of the array, the <code>startIndex</code> is
+     * required (available via the [EMAIL PROTECTED] #start} method).  This 
method should
+     * only be used in cases where copying the internal array is not practical.
+     * The [EMAIL PROTECTED] #getElements} method should be used in all other 
cases.
+     *
+     * 
+     * @return the internal storage array used by this object
+     * @since 2.0
+     */
+    public synchronized double[] getInternalValues() {
+        return (internalArray);
+    }
+
+    /**
      * Sets the contraction criteria for this ExpandContractDoubleArray. 
      * 
      * @param contractionCriteria contraction criteria


Reply via email to