Added deprecation markers (conflict with immutable distribution instances).

Fixed typo in Javadoc.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1002660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2010-09-29 14:51:54 +00:00
parent c59919dabe
commit 635bc4b1b3
3 changed files with 21 additions and 3 deletions

View File

@ -35,7 +35,9 @@ import org.apache.commons.math.util.FastMath;
*/ */
public class TTestImpl implements TTest { 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; private TDistribution distribution;
/** /**
@ -50,6 +52,7 @@ public class TTestImpl implements TTest {
* inference statistics. * inference statistics.
* @param t distribution used to compute inference statistics. * @param t distribution used to compute inference statistics.
* @since 1.2 * @since 1.2
* @deprecated in 2.2 (to be removed in 3.0).
*/ */
public TTestImpl(TDistribution t) { public TTestImpl(TDistribution t) {
super(); super();
@ -1015,6 +1018,7 @@ public class TTestImpl implements TTest {
* Modify the distribution used to compute inference statistics. * Modify the distribution used to compute inference statistics.
* @param value the new distribution * @param value the new distribution
* @since 1.2 * @since 1.2
* @deprecated in 2.2 (to be removed in 3.0).
*/ */
public void setDistribution(TDistribution value) { public void setDistribution(TDistribution value) {
distribution = value; distribution = value;

View File

@ -101,12 +101,25 @@ public class SimpleRegression implements Serializable {
* compute inference statistics. * compute inference statistics.
* @param t the distribution used to compute inference statistics. * @param t the distribution used to compute inference statistics.
* @since 1.2 * @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) { public SimpleRegression(TDistribution t) {
super(); super();
setDistribution(t); setDistribution(t);
} }
/**
* 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. * Adds the observation (x,y) to the regression data set.
* <p> * <p>
@ -611,6 +624,7 @@ public class SimpleRegression implements Serializable {
* Modify the distribution used to compute inference statistics. * Modify the distribution used to compute inference statistics.
* @param value the new distribution * @param value the new distribution
* @since 1.2 * @since 1.2
* @deprecated in 2.2 (to be removed in 3.0).
*/ */
public void setDistribution(TDistribution value) { public void setDistribution(TDistribution value) {
distribution = value; distribution = value;

View File

@ -2881,8 +2881,8 @@ public class FastMath {
} }
/** Compute the cubic root of a number. /** Compute the cubic root of a number.
* @param a number on which evaluation is done * @param x number on which evaluation is done
* @return cubic root of a * @return cubic root of x
*/ */
public static double cbrt(double x) { public static double cbrt(double x) {
/* Convert input double to bits */ /* Convert input double to bits */