You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2010/09/29 16:51:55 UTC
svn commit: r1002660 - in
/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math:
stat/inference/TTestImpl.java stat/regression/SimpleRegression.java
util/FastMath.java
Author: erans
Date: Wed Sep 29 14:51:54 2010
New Revision: 1002660
URL: http://svn.apache.org/viewvc?rev=1002660&view=rev
Log:
Added deprecation markers (conflict with immutable distribution instances).
Fixed typo in Javadoc.
Modified:
commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java
commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/regression/SimpleRegression.java
commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/FastMath.java
Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java?rev=1002660&r1=1002659&r2=1002660&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java Wed Sep 29 14:51:54 2010
@@ -35,7 +35,9 @@ import org.apache.commons.math.util.Fast
*/
public class TTestImpl implements TTest {
- /** Distribution used to compute inference statistics. */
+ /** Distribution used to compute inference statistics.
+ * @deprecated in 2.2 (to be removed in 3.0).
+ */
private TDistribution distribution;
/**
@@ -50,6 +52,7 @@ public class TTestImpl implements TTest
* inference statistics.
* @param t distribution used to compute inference statistics.
* @since 1.2
+ * @deprecated in 2.2 (to be removed in 3.0).
*/
public TTestImpl(TDistribution t) {
super();
@@ -1015,6 +1018,7 @@ public class TTestImpl implements TTest
* Modify the distribution used to compute inference statistics.
* @param value the new distribution
* @since 1.2
+ * @deprecated in 2.2 (to be removed in 3.0).
*/
public void setDistribution(TDistribution value) {
distribution = value;
Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/regression/SimpleRegression.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/regression/SimpleRegression.java?rev=1002660&r1=1002659&r2=1002660&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/regression/SimpleRegression.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/stat/regression/SimpleRegression.java Wed Sep 29 14:51:54 2010
@@ -101,6 +101,8 @@ public class SimpleRegression implements
* compute inference statistics.
* @param t the distribution used to compute inference statistics.
* @since 1.2
+ * @deprecated in 2.2 (to be removed in 3.0). Please use the {@link
+ * #SimpleRegression(int) other constructor} instead.
*/
public SimpleRegression(TDistribution t) {
super();
@@ -108,6 +110,17 @@ public class SimpleRegression implements
}
/**
+ * Create an empty SimpleRegression.
+ *
+ * @param degrees Number of degrees of freedom of the distribution
+ * used to compute inference statistics.
+ * @since 2.2
+ */
+ public SimpleRegression(int degrees) {
+ setDistribution(new TDistributionImpl(degrees));
+ }
+
+ /**
* Adds the observation (x,y) to the regression data set.
* <p>
* Uses updating formulas for means and sums of squares defined in
@@ -611,6 +624,7 @@ public class SimpleRegression implements
* Modify the distribution used to compute inference statistics.
* @param value the new distribution
* @since 1.2
+ * @deprecated in 2.2 (to be removed in 3.0).
*/
public void setDistribution(TDistribution value) {
distribution = value;
Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/FastMath.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/FastMath.java?rev=1002660&r1=1002659&r2=1002660&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/FastMath.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/util/FastMath.java Wed Sep 29 14:51:54 2010
@@ -2881,8 +2881,8 @@ public class FastMath {
}
/** Compute the cubic root of a number.
- * @param a number on which evaluation is done
- * @return cubic root of a
+ * @param x number on which evaluation is done
+ * @return cubic root of x
*/
public static double cbrt(double x) {
/* Convert input double to bits */