You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2015/02/16 23:40:47 UTC

[77/82] [math] Update for next development iteration: commons-math4

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/MultivariateRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/MultivariateRealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/MultivariateRealDistribution.java
index cde1f74..d734d96 100644
--- a/src/main/java/org/apache/commons/math4/distribution/MultivariateRealDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/MultivariateRealDistribution.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
 
 /**
  * Base interface for multivariate distributions on the reals.
@@ -69,7 +69,7 @@ public interface MultivariateRealDistribution {
      *
      * @param sampleSize the number of random vectors to generate.
      * @return an array representing the random samples.
-     * @throws org.apache.commons.math3.exception.NotStrictlyPositiveException
+     * @throws org.apache.commons.math4.exception.NotStrictlyPositiveException
      * if {@code sampleSize} is not positive.
      *
      * @see #sample()

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java b/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java
index 2b1f81f..94f57df 100644
--- a/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/NakagamiDistribution.java
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
-
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.FastMath;
+package org.apache.commons.math4.distribution;
+
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.special.Gamma;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * This class implements the Nakagami distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/NormalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/NormalDistribution.java b/src/main/java/org/apache/commons/math4/distribution/NormalDistribution.java
index 0fc839f..e033223 100644
--- a/src/main/java/org/apache/commons/math4/distribution/NormalDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/NormalDistribution.java
@@ -15,16 +15,16 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.special.Erf;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.special.Erf;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Implementation of the normal (gaussian) distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/ParetoDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/ParetoDistribution.java b/src/main/java/org/apache/commons/math4/distribution/ParetoDistribution.java
index 3c4d77a..d788d95 100644
--- a/src/main/java/org/apache/commons/math4/distribution/ParetoDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/ParetoDistribution.java
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Implementation of the Pareto distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/PascalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/PascalDistribution.java b/src/main/java/org/apache/commons/math4/distribution/PascalDistribution.java
index bf39933..05366aa 100644
--- a/src/main/java/org/apache/commons/math4/distribution/PascalDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/PascalDistribution.java
@@ -14,16 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
-
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.special.Beta;
-import org.apache.commons.math3.util.CombinatoricsUtils;
-import org.apache.commons.math3.util.FastMath;
+package org.apache.commons.math4.distribution;
+
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.special.Beta;
+import org.apache.commons.math4.util.CombinatoricsUtils;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * <p>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/PoissonDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/PoissonDistribution.java b/src/main/java/org/apache/commons/math4/distribution/PoissonDistribution.java
index 0d885e9..7463925 100644
--- a/src/main/java/org/apache/commons/math4/distribution/PoissonDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/PoissonDistribution.java
@@ -14,16 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.CombinatoricsUtils;
-import org.apache.commons.math3.util.FastMath;
-import org.apache.commons.math3.util.MathUtils;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.special.Gamma;
+import org.apache.commons.math4.util.CombinatoricsUtils;
+import org.apache.commons.math4.util.FastMath;
+import org.apache.commons.math4.util.MathUtils;
 
 /**
  * Implementation of the Poisson distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/RealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/RealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/RealDistribution.java
index cb2045d..d7b2499 100644
--- a/src/main/java/org/apache/commons/math4/distribution/RealDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/RealDistribution.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.OutOfRangeException;
 
 /**
  * Base interface for distributions on the reals.
@@ -189,7 +189,7 @@ public interface RealDistribution {
      *
      * @param sampleSize the number of random values to generate
      * @return an array representing the random sample
-     * @throws org.apache.commons.math3.exception.NotStrictlyPositiveException
+     * @throws org.apache.commons.math4.exception.NotStrictlyPositiveException
      * if {@code sampleSize} is not positive
      */
     double[] sample(int sampleSize);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/SaddlePointExpansion.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/SaddlePointExpansion.java b/src/main/java/org/apache/commons/math4/distribution/SaddlePointExpansion.java
index 63b3293..01b0f65 100644
--- a/src/main/java/org/apache/commons/math4/distribution/SaddlePointExpansion.java
+++ b/src/main/java/org/apache/commons/math4/distribution/SaddlePointExpansion.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.FastMath;
-import org.apache.commons.math3.util.MathUtils;
+import org.apache.commons.math4.special.Gamma;
+import org.apache.commons.math4.util.FastMath;
+import org.apache.commons.math4.util.MathUtils;
 
 /**
  * <p>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/TDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/TDistribution.java b/src/main/java/org/apache/commons/math4/distribution/TDistribution.java
index 0c0e1cb..6aa15f0 100644
--- a/src/main/java/org/apache/commons/math4/distribution/TDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/TDistribution.java
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.special.Beta;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.special.Beta;
+import org.apache.commons.math4.special.Gamma;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Implementation of Student's t-distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java b/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java
index 1a81ecb..5ac6800 100644
--- a/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/TriangularDistribution.java
@@ -15,15 +15,15 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Implementation of the triangular real distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/UniformIntegerDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/UniformIntegerDistribution.java b/src/main/java/org/apache/commons/math4/distribution/UniformIntegerDistribution.java
index dd5ffa4..de542b6 100644
--- a/src/main/java/org/apache/commons/math4/distribution/UniformIntegerDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/UniformIntegerDistribution.java
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
 
 /**
  * Implementation of the uniform integer distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
index 10c7712..92913bd 100644
--- a/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
 
 /**
  * Implementation of the uniform real distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/WeibullDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/WeibullDistribution.java b/src/main/java/org/apache/commons/math4/distribution/WeibullDistribution.java
index f1fdabd..0cb6f11 100644
--- a/src/main/java/org/apache/commons/math4/distribution/WeibullDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/WeibullDistribution.java
@@ -15,15 +15,15 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
-
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.FastMath;
+package org.apache.commons.math4.distribution;
+
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.special.Gamma;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Implementation of the Weibull distribution. This implementation uses the

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java b/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java
index 18cb2f4..019bde8 100644
--- a/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/ZipfDistribution.java
@@ -15,13 +15,13 @@
  * limitations under the License.
  */
 
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;
 
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.random.Well19937c;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Implementation of the Zipf distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java b/src/main/java/org/apache/commons/math4/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
index 0b4ac0d..2aaf65b 100644
--- a/src/main/java/org/apache/commons/math4/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
+++ b/src/main/java/org/apache/commons/math4/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
@@ -14,27 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.distribution.fitting;
+package org.apache.commons.math4.distribution.fitting;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.commons.math3.distribution.MultivariateNormalDistribution;
-import org.apache.commons.math3.distribution.MixtureMultivariateNormalDistribution;
-import org.apache.commons.math3.exception.ConvergenceException;
-import org.apache.commons.math3.exception.DimensionMismatchException;
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.NumberIsTooLargeException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.linear.Array2DRowRealMatrix;
-import org.apache.commons.math3.linear.RealMatrix;
-import org.apache.commons.math3.linear.SingularMatrixException;
-import org.apache.commons.math3.stat.correlation.Covariance;
-import org.apache.commons.math3.util.FastMath;
-import org.apache.commons.math3.util.MathArrays;
-import org.apache.commons.math3.util.Pair;
+import org.apache.commons.math4.distribution.MixtureMultivariateNormalDistribution;
+import org.apache.commons.math4.distribution.MultivariateNormalDistribution;
+import org.apache.commons.math4.exception.ConvergenceException;
+import org.apache.commons.math4.exception.DimensionMismatchException;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NumberIsTooLargeException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.linear.Array2DRowRealMatrix;
+import org.apache.commons.math4.linear.RealMatrix;
+import org.apache.commons.math4.linear.SingularMatrixException;
+import org.apache.commons.math4.stat.correlation.Covariance;
+import org.apache.commons.math4.util.FastMath;
+import org.apache.commons.math4.util.MathArrays;
+import org.apache.commons.math4.util.Pair;
 
 /**
  * Expectation-Maximization</a> algorithm for fitting the parameters of

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/fitting/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/fitting/package-info.java b/src/main/java/org/apache/commons/math4/distribution/fitting/package-info.java
index aa95c6d..4582120 100644
--- a/src/main/java/org/apache/commons/math4/distribution/fitting/package-info.java
+++ b/src/main/java/org/apache/commons/math4/distribution/fitting/package-info.java
@@ -17,4 +17,4 @@
 /**
  * Fitting of parameters against distributions.
  */
-package org.apache.commons.math3.distribution.fitting;
+package org.apache.commons.math4.distribution.fitting;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/distribution/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/package-info.java b/src/main/java/org/apache/commons/math4/distribution/package-info.java
index 4e11196..690777b 100644
--- a/src/main/java/org/apache/commons/math4/distribution/package-info.java
+++ b/src/main/java/org/apache/commons/math4/distribution/package-info.java
@@ -17,4 +17,4 @@
 /**
  * Implementations of common discrete and continuous distributions.
  */
-package org.apache.commons.math3.distribution;
+package org.apache.commons.math4.distribution;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/ConvergenceException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/ConvergenceException.java b/src/main/java/org/apache/commons/math4/exception/ConvergenceException.java
index 3aecfc2..f9b6207 100644
--- a/src/main/java/org/apache/commons/math4/exception/ConvergenceException.java
+++ b/src/main/java/org/apache/commons/math4/exception/ConvergenceException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Error thrown when a numerical computation can not be performed because the

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/DimensionMismatchException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/DimensionMismatchException.java b/src/main/java/org/apache/commons/math4/exception/DimensionMismatchException.java
index 2bf84c8..fa5b30a 100644
--- a/src/main/java/org/apache/commons/math4/exception/DimensionMismatchException.java
+++ b/src/main/java/org/apache/commons/math4/exception/DimensionMismatchException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when two dimensions differ.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/InsufficientDataException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/InsufficientDataException.java b/src/main/java/org/apache/commons/math4/exception/InsufficientDataException.java
index ec61d4e..5968c10 100644
--- a/src/main/java/org/apache/commons/math4/exception/InsufficientDataException.java
+++ b/src/main/java/org/apache/commons/math4/exception/InsufficientDataException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when there is insufficient data to perform a computation.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java b/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java
index c3826e4..d753ad5 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.exception.util.ExceptionContext;
-import org.apache.commons.math3.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.ExceptionContext;
+import org.apache.commons.math4.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Base class for arithmetic exceptions.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java b/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java
index 89012f0..e975031 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.ExceptionContext;
-import org.apache.commons.math3.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.ExceptionContext;
+import org.apache.commons.math4.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.Localizable;
 
 /**
  * Base class for all preconditions violation exceptions.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathIllegalNumberException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathIllegalNumberException.java b/src/main/java/org/apache/commons/math4/exception/MathIllegalNumberException.java
index 8edb2cb..2930516 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathIllegalNumberException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathIllegalNumberException.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.Localizable;
 
 /**
  * Base class for exceptions raised by a wrong number.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java b/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java
index f516536..d353848 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.exception.util.ExceptionContext;
-import org.apache.commons.math3.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.ExceptionContext;
+import org.apache.commons.math4.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Base class for all exceptions that signal that the process

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathInternalError.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathInternalError.java b/src/main/java/org/apache/commons/math4/exception/MathInternalError.java
index 5ca66c9..142bd45 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathInternalError.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathInternalError.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception triggered when something that shouldn't happen does happen.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathParseException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathParseException.java b/src/main/java/org/apache/commons/math4/exception/MathParseException.java
index 0c84767..0ef6a54 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathParseException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathParseException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.ExceptionContextProvider;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Class to signal parse failures.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java b/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java
index 9f04704..4dafc2c 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.ExceptionContext;
-import org.apache.commons.math3.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.ExceptionContext;
+import org.apache.commons.math4.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.Localizable;
 
 /**
  * As of release 4.0, all exceptions thrown by the Commons Math code (except

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java b/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java
index 4a829f0..bf32e31 100644
--- a/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.exception.util.ExceptionContext;
-import org.apache.commons.math3.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.ExceptionContext;
+import org.apache.commons.math4.exception.util.ExceptionContextProvider;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Base class for all unsupported features.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MaxCountExceededException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MaxCountExceededException.java b/src/main/java/org/apache/commons/math4/exception/MaxCountExceededException.java
index e846ce9..2813e6e 100644
--- a/src/main/java/org/apache/commons/math4/exception/MaxCountExceededException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MaxCountExceededException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when some counter maximum value is exceeded.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/MultiDimensionMismatchException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/MultiDimensionMismatchException.java b/src/main/java/org/apache/commons/math4/exception/MultiDimensionMismatchException.java
index 16b1fc9..4028971 100644
--- a/src/main/java/org/apache/commons/math4/exception/MultiDimensionMismatchException.java
+++ b/src/main/java/org/apache/commons/math4/exception/MultiDimensionMismatchException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when two sets of dimensions differ.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NoBracketingException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NoBracketingException.java b/src/main/java/org/apache/commons/math4/exception/NoBracketingException.java
index 50083e1..f48c91f 100644
--- a/src/main/java/org/apache/commons/math4/exception/NoBracketingException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NoBracketingException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when function values have the same sign at both

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NoDataException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NoDataException.java b/src/main/java/org/apache/commons/math4/exception/NoDataException.java
index 8a72c4a..90ca4d4 100644
--- a/src/main/java/org/apache/commons/math4/exception/NoDataException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NoDataException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when the required data is missing.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NonMonotonicSequenceException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NonMonotonicSequenceException.java b/src/main/java/org/apache/commons/math4/exception/NonMonotonicSequenceException.java
index ab479ab..7ee1908 100644
--- a/src/main/java/org/apache/commons/math4/exception/NonMonotonicSequenceException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NonMonotonicSequenceException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.util.MathArrays;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.util.MathArrays;
 
 /**
  * Exception to be thrown when the a sequence of values is not monotonically

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NotANumberException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NotANumberException.java b/src/main/java/org/apache/commons/math4/exception/NotANumberException.java
index f50d1e4..78a646f 100644
--- a/src/main/java/org/apache/commons/math4/exception/NotANumberException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NotANumberException.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when a number is not a number.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NotFiniteNumberException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NotFiniteNumberException.java b/src/main/java/org/apache/commons/math4/exception/NotFiniteNumberException.java
index d4dcece..5157c6f 100644
--- a/src/main/java/org/apache/commons/math4/exception/NotFiniteNumberException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NotFiniteNumberException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when a number is not finite.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NotPositiveException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NotPositiveException.java b/src/main/java/org/apache/commons/math4/exception/NotPositiveException.java
index 936c996..7d5515b 100644
--- a/src/main/java/org/apache/commons/math4/exception/NotPositiveException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NotPositiveException.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.Localizable;
 
 /**
  * Exception to be thrown when the argument is negative.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NotStrictlyPositiveException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NotStrictlyPositiveException.java b/src/main/java/org/apache/commons/math4/exception/NotStrictlyPositiveException.java
index b4f2bf5..156e78d 100644
--- a/src/main/java/org/apache/commons/math4/exception/NotStrictlyPositiveException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NotStrictlyPositiveException.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.Localizable;
 
 /**
  * Exception to be thrown when the argument is not greater than 0.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java b/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java
index d56f7e0..7b73be7 100644
--- a/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * All conditions checks that fail due to a {@code null} argument must throw

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NumberIsTooLargeException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NumberIsTooLargeException.java b/src/main/java/org/apache/commons/math4/exception/NumberIsTooLargeException.java
index a65c5e2..9498320 100644
--- a/src/main/java/org/apache/commons/math4/exception/NumberIsTooLargeException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NumberIsTooLargeException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when a number is too large.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/NumberIsTooSmallException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/NumberIsTooSmallException.java b/src/main/java/org/apache/commons/math4/exception/NumberIsTooSmallException.java
index 5073ef8..5a6cf70 100644
--- a/src/main/java/org/apache/commons/math4/exception/NumberIsTooSmallException.java
+++ b/src/main/java/org/apache/commons/math4/exception/NumberIsTooSmallException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when a number is too small.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/OutOfRangeException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/OutOfRangeException.java b/src/main/java/org/apache/commons/math4/exception/OutOfRangeException.java
index 99079d7..4e8dd62 100644
--- a/src/main/java/org/apache/commons/math4/exception/OutOfRangeException.java
+++ b/src/main/java/org/apache/commons/math4/exception/OutOfRangeException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when some argument is out of range.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/TooManyEvaluationsException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/TooManyEvaluationsException.java b/src/main/java/org/apache/commons/math4/exception/TooManyEvaluationsException.java
index 09da0a0..45d3c3a 100644
--- a/src/main/java/org/apache/commons/math4/exception/TooManyEvaluationsException.java
+++ b/src/main/java/org/apache/commons/math4/exception/TooManyEvaluationsException.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when the maximal number of evaluations is exceeded.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/TooManyIterationsException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/TooManyIterationsException.java b/src/main/java/org/apache/commons/math4/exception/TooManyIterationsException.java
index c49f405..bd68f6e 100644
--- a/src/main/java/org/apache/commons/math4/exception/TooManyIterationsException.java
+++ b/src/main/java/org/apache/commons/math4/exception/TooManyIterationsException.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when the maximal number of iterations is exceeded.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/ZeroException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/ZeroException.java b/src/main/java/org/apache/commons/math4/exception/ZeroException.java
index 58acf79..617193a 100644
--- a/src/main/java/org/apache/commons/math4/exception/ZeroException.java
+++ b/src/main/java/org/apache/commons/math4/exception/ZeroException.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;
 
-import org.apache.commons.math3.exception.util.Localizable;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math4.exception.util.Localizable;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
 
 /**
  * Exception to be thrown when zero is provided where it is not allowed.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/package-info.java b/src/main/java/org/apache/commons/math4/exception/package-info.java
index f6e7319..884f4c3 100644
--- a/src/main/java/org/apache/commons/math4/exception/package-info.java
+++ b/src/main/java/org/apache/commons/math4/exception/package-info.java
@@ -20,4 +20,4 @@
  *     using simple java properties.
  *
  */
-package org.apache.commons.math3.exception;
+package org.apache.commons.math4.exception;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/ArgUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/ArgUtils.java b/src/main/java/org/apache/commons/math4/exception/util/ArgUtils.java
index 74214cc..577b0a5 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/ArgUtils.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/ArgUtils.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;
 
 import java.util.List;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java b/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java
index cd56708..97aa51b 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;
 
 import java.util.Locale;
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/ExceptionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/ExceptionContext.java b/src/main/java/org/apache/commons/math4/exception/util/ExceptionContext.java
index a9fd95c..7eb367a 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/ExceptionContext.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/ExceptionContext.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;
 
 import java.util.List;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/ExceptionContextProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/ExceptionContextProvider.java b/src/main/java/org/apache/commons/math4/exception/util/ExceptionContextProvider.java
index 913f66a..06f5e2c 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/ExceptionContextProvider.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/ExceptionContextProvider.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;
 
 /**
  * Interface for accessing the context data structure stored in Commons Math

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/Localizable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/Localizable.java b/src/main/java/org/apache/commons/math4/exception/util/Localizable.java
index 9758bc2..9e4a38f 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/Localizable.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/Localizable.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;
 
 import java.io.Serializable;
 import java.util.Locale;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java b/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
index 0f3848f..ebac0d3 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;
 
 import java.util.Locale;
 import java.util.MissingResourceException;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/exception/util/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/exception/util/package-info.java b/src/main/java/org/apache/commons/math4/exception/util/package-info.java
index 6439a8d..25c583b 100644
--- a/src/main/java/org/apache/commons/math4/exception/util/package-info.java
+++ b/src/main/java/org/apache/commons/math4/exception/util/package-info.java
@@ -19,4 +19,4 @@
  *    Classes supporting exception localization.
  *
  */
-package org.apache.commons.math3.exception.util;
+package org.apache.commons.math4.exception.util;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/filter/DefaultMeasurementModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/filter/DefaultMeasurementModel.java b/src/main/java/org/apache/commons/math4/filter/DefaultMeasurementModel.java
index 10c6f2b..d03f63a 100644
--- a/src/main/java/org/apache/commons/math4/filter/DefaultMeasurementModel.java
+++ b/src/main/java/org/apache/commons/math4/filter/DefaultMeasurementModel.java
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.filter;
+package org.apache.commons.math4.filter;
 
-import org.apache.commons.math3.exception.DimensionMismatchException;
-import org.apache.commons.math3.exception.NoDataException;
-import org.apache.commons.math3.exception.NullArgumentException;
-import org.apache.commons.math3.linear.Array2DRowRealMatrix;
-import org.apache.commons.math3.linear.RealMatrix;
+import org.apache.commons.math4.exception.DimensionMismatchException;
+import org.apache.commons.math4.exception.NoDataException;
+import org.apache.commons.math4.exception.NullArgumentException;
+import org.apache.commons.math4.linear.Array2DRowRealMatrix;
+import org.apache.commons.math4.linear.RealMatrix;
 
 /**
  * Default implementation of a {@link MeasurementModel} for the use with a {@link KalmanFilter}.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/filter/DefaultProcessModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/filter/DefaultProcessModel.java b/src/main/java/org/apache/commons/math4/filter/DefaultProcessModel.java
index 732e2c1..b89be26 100644
--- a/src/main/java/org/apache/commons/math4/filter/DefaultProcessModel.java
+++ b/src/main/java/org/apache/commons/math4/filter/DefaultProcessModel.java
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.filter;
-
-import org.apache.commons.math3.exception.DimensionMismatchException;
-import org.apache.commons.math3.exception.NoDataException;
-import org.apache.commons.math3.exception.NullArgumentException;
-import org.apache.commons.math3.linear.Array2DRowRealMatrix;
-import org.apache.commons.math3.linear.ArrayRealVector;
-import org.apache.commons.math3.linear.RealMatrix;
-import org.apache.commons.math3.linear.RealVector;
+package org.apache.commons.math4.filter;
+
+import org.apache.commons.math4.exception.DimensionMismatchException;
+import org.apache.commons.math4.exception.NoDataException;
+import org.apache.commons.math4.exception.NullArgumentException;
+import org.apache.commons.math4.linear.Array2DRowRealMatrix;
+import org.apache.commons.math4.linear.ArrayRealVector;
+import org.apache.commons.math4.linear.RealMatrix;
+import org.apache.commons.math4.linear.RealVector;
 
 /**
  * Default implementation of a {@link ProcessModel} for the use with a {@link KalmanFilter}.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/filter/KalmanFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/filter/KalmanFilter.java b/src/main/java/org/apache/commons/math4/filter/KalmanFilter.java
index 2f204bf..81b1807 100644
--- a/src/main/java/org/apache/commons/math4/filter/KalmanFilter.java
+++ b/src/main/java/org/apache/commons/math4/filter/KalmanFilter.java
@@ -14,20 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.filter;
-
-import org.apache.commons.math3.exception.DimensionMismatchException;
-import org.apache.commons.math3.exception.NullArgumentException;
-import org.apache.commons.math3.linear.Array2DRowRealMatrix;
-import org.apache.commons.math3.linear.ArrayRealVector;
-import org.apache.commons.math3.linear.CholeskyDecomposition;
-import org.apache.commons.math3.linear.MatrixDimensionMismatchException;
-import org.apache.commons.math3.linear.MatrixUtils;
-import org.apache.commons.math3.linear.NonSquareMatrixException;
-import org.apache.commons.math3.linear.RealMatrix;
-import org.apache.commons.math3.linear.RealVector;
-import org.apache.commons.math3.linear.SingularMatrixException;
-import org.apache.commons.math3.util.MathUtils;
+package org.apache.commons.math4.filter;
+
+import org.apache.commons.math4.exception.DimensionMismatchException;
+import org.apache.commons.math4.exception.NullArgumentException;
+import org.apache.commons.math4.linear.Array2DRowRealMatrix;
+import org.apache.commons.math4.linear.ArrayRealVector;
+import org.apache.commons.math4.linear.CholeskyDecomposition;
+import org.apache.commons.math4.linear.MatrixDimensionMismatchException;
+import org.apache.commons.math4.linear.MatrixUtils;
+import org.apache.commons.math4.linear.NonSquareMatrixException;
+import org.apache.commons.math4.linear.RealMatrix;
+import org.apache.commons.math4.linear.RealVector;
+import org.apache.commons.math4.linear.SingularMatrixException;
+import org.apache.commons.math4.util.MathUtils;
 
 /**
  * Implementation of a Kalman filter to estimate the state <i>x<sub>k</sub></i>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/filter/MeasurementModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/filter/MeasurementModel.java b/src/main/java/org/apache/commons/math4/filter/MeasurementModel.java
index 2e0a379..192df2d 100644
--- a/src/main/java/org/apache/commons/math4/filter/MeasurementModel.java
+++ b/src/main/java/org/apache/commons/math4/filter/MeasurementModel.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.filter;
+package org.apache.commons.math4.filter;
 
-import org.apache.commons.math3.linear.RealMatrix;
+import org.apache.commons.math4.linear.RealMatrix;
 
 /**
  * Defines the measurement model for the use with a {@link KalmanFilter}.
@@ -38,7 +38,7 @@ public interface MeasurementModel {
      *
      * @return the measurement noise matrix
      * @see KalmanFilter#correct(double[])
-     * @see KalmanFilter#correct(org.apache.commons.math3.linear.RealVector)
+     * @see KalmanFilter#correct(org.apache.commons.math4.linear.RealVector)
      */
     RealMatrix getMeasurementNoise();
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/filter/ProcessModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/filter/ProcessModel.java b/src/main/java/org/apache/commons/math4/filter/ProcessModel.java
index 179ed1b..07c91ef 100644
--- a/src/main/java/org/apache/commons/math4/filter/ProcessModel.java
+++ b/src/main/java/org/apache/commons/math4/filter/ProcessModel.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.filter;
+package org.apache.commons.math4.filter;
 
-import org.apache.commons.math3.linear.RealMatrix;
-import org.apache.commons.math3.linear.RealVector;
+import org.apache.commons.math4.linear.RealMatrix;
+import org.apache.commons.math4.linear.RealVector;
 
 /**
  * Defines the process dynamics model for the use with a {@link KalmanFilter}.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/filter/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/filter/package-info.java b/src/main/java/org/apache/commons/math4/filter/package-info.java
index 4e76536..92a5535 100644
--- a/src/main/java/org/apache/commons/math4/filter/package-info.java
+++ b/src/main/java/org/apache/commons/math4/filter/package-info.java
@@ -17,4 +17,4 @@
 /**
  * Implementations of common discrete-time linear filters.
  */
-package org.apache.commons.math3.filter;
+package org.apache.commons.math4.filter;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java
index 6f39c23..62fb0fc 100644
--- a/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/AbstractCurveFitter.java
@@ -14,16 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
 import java.util.Collection;
 
-import org.apache.commons.math3.analysis.MultivariateVectorFunction;
-import org.apache.commons.math3.analysis.MultivariateMatrixFunction;
-import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresOptimizer;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem;
-import org.apache.commons.math3.fitting.leastsquares.LevenbergMarquardtOptimizer;
+import org.apache.commons.math4.analysis.MultivariateMatrixFunction;
+import org.apache.commons.math4.analysis.MultivariateVectorFunction;
+import org.apache.commons.math4.analysis.ParametricUnivariateFunction;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresOptimizer;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresProblem;
+import org.apache.commons.math4.fitting.leastsquares.LevenbergMarquardtOptimizer;
 
 /**
  * Base class that contains common code for fitting parametric univariate

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/CurveFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/CurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/CurveFitter.java
index 0ddeacc..8cce426 100644
--- a/src/main/java/org/apache/commons/math4/fitting/CurveFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/CurveFitter.java
@@ -14,21 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.commons.math3.analysis.MultivariateVectorFunction;
-import org.apache.commons.math3.analysis.MultivariateMatrixFunction;
-import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
-import org.apache.commons.math3.optim.MaxEval;
-import org.apache.commons.math3.optim.InitialGuess;
-import org.apache.commons.math3.optim.PointVectorValuePair;
-import org.apache.commons.math3.optim.nonlinear.vector.MultivariateVectorOptimizer;
-import org.apache.commons.math3.optim.nonlinear.vector.ModelFunction;
-import org.apache.commons.math3.optim.nonlinear.vector.ModelFunctionJacobian;
-import org.apache.commons.math3.optim.nonlinear.vector.Target;
-import org.apache.commons.math3.optim.nonlinear.vector.Weight;
+
+import org.apache.commons.math4.analysis.MultivariateMatrixFunction;
+import org.apache.commons.math4.analysis.MultivariateVectorFunction;
+import org.apache.commons.math4.analysis.ParametricUnivariateFunction;
+import org.apache.commons.math4.optim.InitialGuess;
+import org.apache.commons.math4.optim.MaxEval;
+import org.apache.commons.math4.optim.PointVectorValuePair;
+import org.apache.commons.math4.optim.nonlinear.vector.ModelFunction;
+import org.apache.commons.math4.optim.nonlinear.vector.ModelFunctionJacobian;
+import org.apache.commons.math4.optim.nonlinear.vector.MultivariateVectorOptimizer;
+import org.apache.commons.math4.optim.nonlinear.vector.Target;
+import org.apache.commons.math4.optim.nonlinear.vector.Weight;
 
 /**
  * Fitter for parametric univariate real functions y = f(x).
@@ -131,7 +132,7 @@ public class CurveFitter<T extends ParametricUnivariateFunction> {
      * @param f parametric function to fit.
      * @param initialGuess first guess of the function parameters.
      * @return the fitted parameters.
-     * @throws org.apache.commons.math3.exception.DimensionMismatchException
+     * @throws org.apache.commons.math4.exception.DimensionMismatchException
      * if the start point dimension is wrong.
      */
     public double[] fit(T f, final double[] initialGuess) {
@@ -149,9 +150,9 @@ public class CurveFitter<T extends ParametricUnivariateFunction> {
      * @param initialGuess first guess of the function parameters.
      * @param maxEval Maximum number of function evaluations.
      * @return the fitted parameters.
-     * @throws org.apache.commons.math3.exception.TooManyEvaluationsException
+     * @throws org.apache.commons.math4.exception.TooManyEvaluationsException
      * if the number of allowed evaluations is exceeded.
-     * @throws org.apache.commons.math3.exception.DimensionMismatchException
+     * @throws org.apache.commons.math4.exception.DimensionMismatchException
      * if the start point dimension is wrong.
      * @since 3.0
      */

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java
index 64e0bda..05fcf47 100644
--- a/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/GaussianCurveFitter.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -22,21 +22,21 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 
-import org.apache.commons.math3.analysis.function.Gaussian;
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.NullArgumentException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.ZeroException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresBuilder;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem;
-import org.apache.commons.math3.linear.DiagonalMatrix;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.analysis.function.Gaussian;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NullArgumentException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.ZeroException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresBuilder;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresProblem;
+import org.apache.commons.math4.linear.DiagonalMatrix;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Fits points to a {@link
- * org.apache.commons.math3.analysis.function.Gaussian.Parametric Gaussian}
+ * org.apache.commons.math4.analysis.function.Gaussian.Parametric Gaussian}
  * function.
  * <br/>
  * The {@link #withStartPoint(double[]) initial guess values} must be passed
@@ -188,7 +188,7 @@ public class GaussianCurveFitter extends AbstractCurveFitter {
 
     /**
      * Guesses the parameters {@code norm}, {@code mean}, and {@code sigma}
-     * of a {@link org.apache.commons.math3.analysis.function.Gaussian.Parametric}
+     * of a {@link org.apache.commons.math4.analysis.function.Gaussian.Parametric}
      * based on the specified observed points.
      */
     public static class ParameterGuesser {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/GaussianFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/GaussianFitter.java b/src/main/java/org/apache/commons/math4/fitting/GaussianFitter.java
index 3946540..285a467 100644
--- a/src/main/java/org/apache/commons/math4/fitting/GaussianFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/GaussianFitter.java
@@ -14,23 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
 import java.util.Arrays;
 import java.util.Comparator;
-import org.apache.commons.math3.analysis.function.Gaussian;
-import org.apache.commons.math3.exception.NullArgumentException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.OutOfRangeException;
-import org.apache.commons.math3.exception.ZeroException;
-import org.apache.commons.math3.exception.NotStrictlyPositiveException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.optim.nonlinear.vector.MultivariateVectorOptimizer;
-import org.apache.commons.math3.util.FastMath;
+
+import org.apache.commons.math4.analysis.function.Gaussian;
+import org.apache.commons.math4.exception.NotStrictlyPositiveException;
+import org.apache.commons.math4.exception.NullArgumentException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.OutOfRangeException;
+import org.apache.commons.math4.exception.ZeroException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.optim.nonlinear.vector.MultivariateVectorOptimizer;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Fits points to a {@link
- * org.apache.commons.math3.analysis.function.Gaussian.Parametric Gaussian} function.
+ * org.apache.commons.math4.analysis.function.Gaussian.Parametric Gaussian} function.
  * <p>
  * Usage example:
  * <pre>
@@ -122,7 +123,7 @@ public class GaussianFitter extends CurveFitter<Gaussian.Parametric> {
 
     /**
      * Guesses the parameters {@code norm}, {@code mean}, and {@code sigma}
-     * of a {@link org.apache.commons.math3.analysis.function.Gaussian.Parametric}
+     * of a {@link org.apache.commons.math4.analysis.function.Gaussian.Parametric}
      * based on the specified observed points.
      */
     public static class ParameterGuesser {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/HarmonicCurveFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/HarmonicCurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/HarmonicCurveFitter.java
index e5e7be4..c8a2a8e 100644
--- a/src/main/java/org/apache/commons/math4/fitting/HarmonicCurveFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/HarmonicCurveFitter.java
@@ -14,25 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.commons.math3.analysis.function.HarmonicOscillator;
-import org.apache.commons.math3.exception.MathIllegalStateException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.ZeroException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresBuilder;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem;
-import org.apache.commons.math3.linear.DiagonalMatrix;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.analysis.function.HarmonicOscillator;
+import org.apache.commons.math4.exception.MathIllegalStateException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.ZeroException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresBuilder;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresProblem;
+import org.apache.commons.math4.linear.DiagonalMatrix;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Fits points to a {@link
- * org.apache.commons.math3.analysis.function.HarmonicOscillator.Parametric harmonic oscillator}
+ * org.apache.commons.math4.analysis.function.HarmonicOscillator.Parametric harmonic oscillator}
  * function.
  * <br/>
  * The {@link #withStartPoint(double[]) initial guess values} must be passed

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/HarmonicFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/HarmonicFitter.java b/src/main/java/org/apache/commons/math4/fitting/HarmonicFitter.java
index 24952a6..e74d0ac 100644
--- a/src/main/java/org/apache/commons/math4/fitting/HarmonicFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/HarmonicFitter.java
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
-import org.apache.commons.math3.optim.nonlinear.vector.MultivariateVectorOptimizer;
-import org.apache.commons.math3.analysis.function.HarmonicOscillator;
-import org.apache.commons.math3.exception.ZeroException;
-import org.apache.commons.math3.exception.NumberIsTooSmallException;
-import org.apache.commons.math3.exception.MathIllegalStateException;
-import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math4.analysis.function.HarmonicOscillator;
+import org.apache.commons.math4.exception.MathIllegalStateException;
+import org.apache.commons.math4.exception.NumberIsTooSmallException;
+import org.apache.commons.math4.exception.ZeroException;
+import org.apache.commons.math4.exception.util.LocalizedFormats;
+import org.apache.commons.math4.optim.nonlinear.vector.MultivariateVectorOptimizer;
+import org.apache.commons.math4.util.FastMath;
 
 /**
  * Class that implements a curve fitting specialized for sinusoids.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e4e1ac23/src/main/java/org/apache/commons/math4/fitting/PolynomialCurveFitter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/fitting/PolynomialCurveFitter.java b/src/main/java/org/apache/commons/math4/fitting/PolynomialCurveFitter.java
index 9a6f3a9..30d86a9 100644
--- a/src/main/java/org/apache/commons/math4/fitting/PolynomialCurveFitter.java
+++ b/src/main/java/org/apache/commons/math4/fitting/PolynomialCurveFitter.java
@@ -14,19 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.math3.fitting;
+package org.apache.commons.math4.fitting;
 
 import java.util.Collection;
 
-import org.apache.commons.math3.analysis.polynomials.PolynomialFunction;
-import org.apache.commons.math3.exception.MathInternalError;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresBuilder;
-import org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem;
-import org.apache.commons.math3.linear.DiagonalMatrix;
+import org.apache.commons.math4.analysis.polynomials.PolynomialFunction;
+import org.apache.commons.math4.exception.MathInternalError;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresBuilder;
+import org.apache.commons.math4.fitting.leastsquares.LeastSquaresProblem;
+import org.apache.commons.math4.linear.DiagonalMatrix;
 
 /**
  * Fits points to a {@link
- * org.apache.commons.math3.analysis.polynomials.PolynomialFunction.Parametric polynomial}
+ * org.apache.commons.math4.analysis.polynomials.PolynomialFunction.Parametric polynomial}
  * function.
  * <br/>
  * The size of the {@link #withStartPoint(double[]) initial guess} array defines the