[Math] Change on branch "master": Commons Math MasterBranch - Build # 12 - Successful

2016-09-20 Thread Apache Jenkins Server
The Apache Jenkins build system has built Commons Math MasterBranch (build #12)

Status: Successful

Check console output at 
https://builds.apache.org/job/Commons%20Math%20MasterBranch/12/ to view the 
results.

[Math] Change on branch "develop": Commons Math DeveloperBranch - Build # 33 - Unstable

2016-09-20 Thread Apache Jenkins Server
The Apache Jenkins build system has built Commons Math DeveloperBranch (build 
#33)

Status: Unstable

Check console output at 
https://builds.apache.org/job/Commons%20Math%20DeveloperBranch/33/ to view the 
results.

[math] chore: adding tagging comments to development.howto

2016-09-20 Thread chtompki
Repository: commons-math
Updated Branches:
  refs/heads/master 6ddd71b06 -> d9e43edd1


chore: adding tagging comments to development.howto


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d9e43edd
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d9e43edd
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d9e43edd

Branch: refs/heads/master
Commit: d9e43edd13d55224fabc9a65b75884a77a3d56b7
Parents: 6ddd71b
Author: Rob Tompkins 
Authored: Tue Sep 20 14:20:27 2016 -0400
Committer: Rob Tompkins 
Committed: Tue Sep 20 14:20:27 2016 -0400

--
 doc/development/development.howto.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/d9e43edd/doc/development/development.howto.txt
--
diff --git a/doc/development/development.howto.txt 
b/doc/development/development.howto.txt
index 7b5ec93..525ce2f 100644
--- a/doc/development/development.howto.txt
+++ b/doc/development/development.howto.txt
@@ -5,9 +5,9 @@ This document summarizes a discussion that took place on the 
"dev" ML:
 The conclusions reported here are based on ideas presented in this blog post:
   http://nvie.com/posts/a-successful-git-branching-model/
 
-1. The "master" branch can only contain released code; i.e. the only
-   accepted commits are the result of a merge from the "release" branch
-   (from a release candidate that passed a vote).
+1. A tag in git will represent a full release (from a release candidate that
+   passed a vote). Note, this tag will not have the suffix "RC#", as tags
+   with that suffix represent a release candidate.
 2. Contents that is candidate for being released must be merged into the
"release" branch, from the "master" branch.
 3. The "master" branch collects all modifications that will be part



[55/57] [abbrv] [math] Add missing '@Override' annotations.

2016-09-20 Thread chtompki
Add missing '@Override' annotations.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/221c843b
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/221c843b
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/221c843b

Branch: refs/heads/master
Commit: 221c843b8437e1c87a98a9a015b03b050dd08561
Parents: 762eb53
Author: Gary Gregory 
Authored: Tue Sep 20 10:38:11 2016 -0700
Committer: Gary Gregory 
Committed: Tue Sep 20 10:38:11 2016 -0700

--
 .../FieldBracketingNthOrderBrentSolver.java |  7 +++
 .../math4/ode/ContinuousOutputFieldModel.java   |  1 +
 .../math4/ode/ContinuousOutputModel.java|  3 +-
 .../commons/math4/ode/FirstOrderConverter.java  |  6 +-
 .../nonstiff/AdamsFieldStepInterpolator.java|  1 +
 .../nonstiff/AdamsMoultonFieldIntegrator.java   |  1 +
 .../ode/nonstiff/AdamsMoultonIntegrator.java|  1 +
 .../ode/sampling/AbstractStepInterpolator.java  |  6 +-
 .../math4/ode/sampling/DummyStepHandler.java|  1 +
 .../math4/ode/sampling/FieldStepNormalizer.java |  1 +
 .../math4/ode/sampling/StepNormalizer.java  |  1 +
 .../org/apache/commons/math4/PerfTestUtils.java |  1 +
 .../integration/gauss/BaseRuleFactoryTest.java  |  1 +
 .../analysis/integration/gauss/HermiteTest.java |  3 +
 .../BracketingNthOrderBrentSolverTest.java  |  3 +
 .../math4/analysis/solvers/BrentSolverTest.java |  1 +
 .../FieldBracketingNthOrderBrentSolverTest.java |  7 +++
 .../analysis/solvers/RegulaFalsiSolverTest.java |  1 +
 .../solvers/UnivariateSolverUtilsTest.java  |  2 +
 .../AbstractIntegerDistributionTest.java|  7 +++
 .../AbstractRealDistributionTest.java   |  2 +
 .../RealDistributionAbstractTest.java   |  1 +
 ...stractLeastSquaresOptimizerAbstractTest.java |  4 ++
 .../fitting/leastsquares/CircleProblem.java |  2 +
 .../fitting/leastsquares/CircleVectorial.java   |  2 +
 .../leastsquares/EvaluationRmsCheckerTest.java  |  9 +++
 .../fitting/leastsquares/EvaluationTest.java|  9 +++
 .../LevenbergMarquardtOptimizerTest.java|  4 ++
 .../math4/fitting/leastsquares/MinpackTest.java |  2 +
 .../StatisticalReferenceDataset.java|  2 +
 .../leastsquares/StraightLineProblem.java   |  3 +
 .../commons/math4/genetics/ChromosomeTest.java  |  9 +++
 .../math4/genetics/CycleCrossoverTest.java  |  2 +
 .../math4/genetics/DummyBinaryChromosome.java   |  1 +
 .../math4/genetics/DummyListChromosome.java |  1 +
 .../commons/math4/genetics/DummyRandomKey.java  |  1 +
 .../genetics/ElitisticListPopulationTest.java   |  1 +
 .../math4/genetics/FixedElapsedTimeTest.java|  6 ++
 .../genetics/FixedGenerationCountTest.java  |  6 ++
 .../genetics/GeneticAlgorithmTestBinary.java|  1 +
 .../GeneticAlgorithmTestPermutations.java   |  1 +
 .../math4/genetics/ListPopulationTest.java  | 13 
 .../math4/genetics/NPointCrossoverTest.java |  2 +
 .../math4/genetics/OrderedCrossoverTest.java|  2 +
 .../math4/genetics/TournamentSelectionTest.java |  1 +
 .../math4/genetics/UniformCrossoverTest.java|  2 +
 .../euclidean/threed/PolyhedronsSetTest.java|  3 +
 .../euclidean/twod/PolygonsSetTest.java |  3 +
 .../math4/linear/ArrayFieldVectorTest.java  | 64 
 .../math4/linear/ConjugateGradientTest.java | 20 ++
 .../math4/linear/SparseFieldVectorTest.java | 36 +++
 .../apache/commons/math4/linear/SymmLQTest.java | 12 
 .../ml/neuralnet/OffsetFeatureInitializer.java  |  1 +
 .../sofm/TravellingSalesmanSolver.java  |  5 ++
 .../ode/ContinuousOutputFieldModelTest.java |  6 ++
 .../math4/ode/FieldExpandableODETest.java   |  5 ++
 .../math4/ode/FirstOrderConverterTest.java  |  6 +-
 .../commons/math4/ode/JacobianMatricesTest.java | 16 +
 .../commons/math4/ode/TestFieldProblem4.java|  8 +++
 .../math4/ode/TestFieldProblemAbstract.java |  3 +
 .../math4/ode/TestFieldProblemHandler.java  |  2 +
 .../apache/commons/math4/ode/TestProblem4.java  |  8 +++
 .../commons/math4/ode/TestProblemAbstract.java  |  6 +-
 .../commons/math4/ode/TestProblemHandler.java   |  6 +-
 .../math4/ode/events/CloseEventsTest.java   |  6 ++
 .../math4/ode/events/EventFilterTest.java   |  6 ++
 .../math4/ode/events/EventStateTest.java| 22 +++
 .../math4/ode/events/OverlappingEventsTest.java |  6 ++
 .../math4/ode/events/ReappearingEventTest.java  |  6 ++
 ...ctEmbeddedRungeKuttaFieldIntegratorTest.java | 24 ++--
 .../AbstractRungeKuttaFieldIntegratorTest.java  | 20 ++
 .../AdamsBashforthFieldIntegratorTest.java  |  8 +++
 .../nonstiff/AdamsBashforthIntegratorTest.java  | 13 
 .../AdamsFieldIntegratorAbstractTest.java   |  5 ++
 .../AdamsMoultonFieldIntegratorTest.java|  8 +++
 

[20/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_4
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_4 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_4
deleted file mode 100644
index 5ac1aae..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_4
+++ /dev/null
@@ -1,3806 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well1024a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.14
-
-

-CPU time used:  00:02:15.65
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.43
-
-

-CPU time used:  00:01:39.24
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1420
-p-value of test   :0.07
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334540
-  j =  1  :57160
-  j =  2  : 1420
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:13.98
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  

[26/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_10
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_10 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_10
deleted file mode 100644
index bb38491..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_10
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.MersenneTwister64
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.89
-
-

-CPU time used:  00:01:55.65
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.21
-
-

-CPU time used:  00:01:40.84
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1403
-p-value of test   :0.15
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334523
-  j =  1  :57194
-  j =  2  : 1403
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:26.23
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[40/57] [abbrv] [math] Upgrade "parent".

2016-09-20 Thread chtompki
Upgrade "parent".


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/4cfe573b
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/4cfe573b
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/4cfe573b

Branch: refs/heads/master
Commit: 4cfe573b79afa0af28865e9e5c5b47dddedb27dc
Parents: ae8f5f0
Author: Gilles 
Authored: Sun Sep 4 16:40:05 2016 +0200
Committer: Gilles 
Committed: Sun Sep 4 16:40:05 2016 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/4cfe573b/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d0fed34..6c7ae4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.commons
 commons-parent
-39
+41
   
   4.0.0
   org.apache.commons



[52/57] [abbrv] [math] Add missing '@Override' annotations.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
index 1298778..12b2897 100644
--- 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
+++ 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
@@ -221,6 +221,7 @@ public class NonLinearConjugateGradientOptimizerTest {
 
 final Preconditioner preconditioner
 = new Preconditioner() {
+@Override
 public double[] precondition(double[] point, double[] r) {
 double[] d = r.clone();
 d[0] /=  72.0;
@@ -448,6 +449,7 @@ public class NonLinearConjugateGradientOptimizerTest {
 
 public ObjectiveFunction getObjectiveFunction() {
 return new ObjectiveFunction(new MultivariateFunction() {
+@Override
 public double value(double[] point) {
 double[] y = factors.operate(point);
 double sum = 0;
@@ -462,6 +464,7 @@ public class NonLinearConjugateGradientOptimizerTest {
 
 public ObjectiveFunctionGradient getObjectiveFunctionGradient() {
 return new ObjectiveFunctionGradient(new 
MultivariateVectorFunction() {
+@Override
 public double[] value(double[] point) {
 double[] r = factors.operate(point);
 for (int i = 0; i < r.length; ++i) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
index db69efd..55d43a0 100644
--- 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
+++ 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
@@ -365,6 +365,7 @@ public class BOBYQAOptimizerTest {
 
 private static class Sphere implements MultivariateFunction {
 
+@Override
 public double value(double[] x) {
 double f = 0;
 for (int i = 0; i < x.length; ++i)
@@ -384,6 +385,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = x[0] * x[0];
 for (int i = 1; i < x.length; ++i)
@@ -403,6 +405,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = factor * x[0] * x[0];
 for (int i = 1; i < x.length; ++i)
@@ -422,6 +425,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio;
 }
 
+@Override
 public double value(double[] x) {
 int end = x.length - 1;
 double f = x[0] * x[0] / factor + factor * x[end] * x[end];
@@ -443,6 +447,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = 0;
 for (int i = 0; i < x.length; ++i)
@@ -463,6 +468,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = 0;
 x = B.Rotate(x);
@@ -484,6 +490,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = 0;
 for (int i = 0; i < x.length; ++i)
@@ -494,6 +501,7 @@ public class BOBYQAOptimizerTest {
 
 private static class MinusElli implements MultivariateFunction {
 private final Elli elli = new Elli();
+@Override
 public double value(double[] x) {
 return 1.0 - elli.value(x);
 }
@@ -501,6 +509,7 @@ public class BOBYQAOptimizerTest {
 
 private static class DiffPow implements MultivariateFunction {
 //private int fcount = 0;
+@Override
 public double value(double[] x) {
 double f = 

[45/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
index 00dde9d..57c9cb7 100644
--- a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
@@ -167,8 +167,8 @@ public final class BlockFieldMatrixTest {
 /** test dimensions */
 @Test
 public void testDimensions() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 Assert.assertEquals("testData row dimension",3,m.getRowDimension());
 Assert.assertEquals("testData column 
dimension",3,m.getColumnDimension());
 Assert.assertTrue("testData is square",m.isSquare());
@@ -182,18 +182,18 @@ public final class BlockFieldMatrixTest {
 public void testCopyFunctions() {
 Random r = new Random(66636328996002l);
 BlockFieldMatrix m1 = createRandomMatrix(r, 47, 83);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(m1.getData());
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(m1.getData());
 Assert.assertEquals(m1, m2);
-BlockFieldMatrix m3 = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m4 = new 
BlockFieldMatrix(m3.getData());
+BlockFieldMatrix m3 = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m4 = new BlockFieldMatrix<>(m3.getData());
 Assert.assertEquals(m3, m4);
 }
 
 /** test add */
 @Test
 public void testAdd() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
 FieldMatrix mPlusMInv = m.add(mInv);
 Fraction[][] sumEntries = mPlusMInv.getData();
 for (int row = 0; row < m.getRowDimension(); row++) {
@@ -206,8 +206,8 @@ public final class BlockFieldMatrixTest {
 /** test add failure */
 @Test
 public void testAddFail() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 try {
 m.add(m2);
 Assert.fail("MathIllegalArgumentException expected");
@@ -219,11 +219,11 @@ public final class BlockFieldMatrixTest {
  /** test m-n = m + -n */
 @Test
 public void testPlusMinus() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testDataInv);
 TestUtils.assertEquals(m.subtract(m2), m2.scalarMultiply(new 
Fraction(-1)).add(m));
 try {
-m.subtract(new BlockFieldMatrix(testData2));
+m.subtract(new BlockFieldMatrix<>(testData2));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // ignored
@@ -233,17 +233,17 @@ public final class BlockFieldMatrixTest {
 /** test multiply */
 @Test
 public void testMultiply() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
-BlockFieldMatrix identity = new 
BlockFieldMatrix(id);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
+BlockFieldMatrix identity = new BlockFieldMatrix<>(id);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 TestUtils.assertEquals(m.multiply(mInv), identity);
 TestUtils.assertEquals(mInv.multiply(m), identity);
 TestUtils.assertEquals(m.multiply(identity), m);
 TestUtils.assertEquals(identity.multiply(mInv), mInv);
 TestUtils.assertEquals(m2.multiply(identity), m2);
 try {
-m.multiply(new BlockFieldMatrix(bigSingular));
+m.multiply(new BlockFieldMatrix<>(bigSingular));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // expected
@@ -253,7 +253,7 @@ public final class BlockFieldMatrixTest {
 @Test
 public void testSeveralBlocks() {
  

[33/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
MATH-1383

Modifications required following RNG-10.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/af6bbeef
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/af6bbeef
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/af6bbeef

Branch: refs/heads/master
Commit: af6bbeefbf197f50d194c7f20419c2a4590ad630
Parents: d14573f
Author: Gilles 
Authored: Tue Aug 23 02:11:34 2016 +0200
Committer: Gilles 
Committed: Tue Aug 23 02:11:34 2016 +0200

--
 src/main/java/org/apache/commons/math4/random/RngAdaptor.java| 4 ++--
 .../org/apache/commons/math4/util/RandomPivotingStrategy.java| 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/af6bbeef/src/main/java/org/apache/commons/math4/random/RngAdaptor.java
--
diff --git a/src/main/java/org/apache/commons/math4/random/RngAdaptor.java 
b/src/main/java/org/apache/commons/math4/random/RngAdaptor.java
index 5a24fec..4603f4e 100644
--- a/src/main/java/org/apache/commons/math4/random/RngAdaptor.java
+++ b/src/main/java/org/apache/commons/math4/random/RngAdaptor.java
@@ -206,7 +206,7 @@ public final class RngAdaptor
 out.defaultWriteObject();
 
 // Save current state.
-out.writeObject(RandomSource.saveState(delegate));
+out.writeObject(RandomSource.saveState(delegate).getState());
}
 
 /**
@@ -223,7 +223,7 @@ public final class RngAdaptor
 // Recreate the "delegate" from serialized info.
 delegate = RandomSource.create(source);
 // And restore its state.
-final RandomSource.State state = (RandomSource.State) in.readObject();
+final RandomSource.State state = new RandomSource.State((byte[]) 
in.readObject());
 RandomSource.restoreState(delegate, state);
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/af6bbeef/src/main/java/org/apache/commons/math4/util/RandomPivotingStrategy.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/util/RandomPivotingStrategy.java 
b/src/main/java/org/apache/commons/math4/util/RandomPivotingStrategy.java
index 8161ccd..af0f5e1 100644
--- a/src/main/java/org/apache/commons/math4/util/RandomPivotingStrategy.java
+++ b/src/main/java/org/apache/commons/math4/util/RandomPivotingStrategy.java
@@ -77,7 +77,7 @@ public class RandomPivotingStrategy implements 
PivotingStrategyInterface, Serial
 out.defaultWriteObject();
 
 // Save current state.
-out.writeObject(RandomSource.saveState(random));
+out.writeObject(RandomSource.saveState(random).getState());
}
 
 /**
@@ -94,7 +94,7 @@ public class RandomPivotingStrategy implements 
PivotingStrategyInterface, Serial
 // Recreate the "delegate" from serialized info.
 random = RandomSource.create(randomSource);
 // And restore its state.
-final RandomSource.State state = (RandomSource.State) in.readObject();
+final RandomSource.State state = new RandomSource.State((byte[]) 
in.readObject());
 RandomSource.restoreState(random, state);
 }
 }



[30/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_10
--
diff --git a/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_10 
b/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_10
deleted file mode 100644
index 43d9631..000
--- a/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_10
+++ /dev/null
@@ -1,172 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.MersenneTwister64
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: /usr/bin/dieharder -a -g 200 -Y 1 -k 2 
-# 
-#=#
-#dieharder version 3.31.1 Copyright 2003 Robert G. Brown  #
-#=#
-   rng_name|rands/second|   Seed   |
-stdin_input_raw|  8.43e+06  |  65196341|
-#=#
-test_name   |ntup| tsamples |psamples|  p-value |Assessment
-#=#
-   diehard_birthdays|   0|   100| 100|0.77393593|  PASSED  
-  diehard_operm5|   0|   100| 100|0.17506318|  PASSED  
-  diehard_rank_32x32|   0| 4| 100|0.95522455|  PASSED  
-diehard_rank_6x8|   0|10| 100|0.53205969|  PASSED  
-   diehard_bitstream|   0|   2097152| 100|0.23688694|  PASSED  
-diehard_opso|   0|   2097152| 100|0.73918395|  PASSED  
-diehard_oqso|   0|   2097152| 100|0.31135650|  PASSED  
- diehard_dna|   0|   2097152| 100|0.44805445|  PASSED  
-diehard_count_1s_str|   0|256000| 100|0.01849881|  PASSED  
-diehard_count_1s_byt|   0|256000| 100|0.67854943|  PASSED  
- diehard_parking_lot|   0| 12000| 100|0.83699181|  PASSED  
-diehard_2dsphere|   2|  8000| 100|0.82267572|  PASSED  
-diehard_3dsphere|   3|  4000| 100|0.91560437|  PASSED  
- diehard_squeeze|   0|10| 100|0.02920041|  PASSED  
-diehard_sums|   0|   100| 100|0.40395437|  PASSED  
-diehard_runs|   0|10| 100|0.81213684|  PASSED  
-diehard_runs|   0|10| 100|0.71356831|  PASSED  
-   diehard_craps|   0|20| 100|0.14777897|  PASSED  
-   diehard_craps|   0|20| 100|0.23480249|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.28319249|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.46725297|  PASSED  
- sts_monobit|   1|10| 100|0.90843962|  PASSED  
-sts_runs|   2|10| 100|0.99601137|   WEAK   
-sts_runs|   2|10| 200|0.85241048|  PASSED  
-  sts_serial|   1|10| 100|0.57903662|  PASSED  
-  sts_serial|   2|10| 100|0.92277059|  PASSED  
-  sts_serial|   3|10| 100|0.85558613|  PASSED  
-  sts_serial|   3|10| 100|0.82689250|  PASSED  
-  sts_serial|   4|10| 100|0.21146680|  PASSED  
-  sts_serial|   4|10| 100|0.87093728|  PASSED  
-  sts_serial|   5|10| 100|0.54737605|  PASSED  
-  sts_serial|   5|10| 100|0.89422059|  PASSED  
-  sts_serial|   6|10| 100|0.98154808|  PASSED  
-  sts_serial|   6|10| 100|0.65700573|  PASSED  
-  sts_serial|   7|10| 100|0.43081117|  PASSED  
-  sts_serial|   7|10| 100|0.34762085|  PASSED  
-  sts_serial|   8|10| 100|0.46617263|  PASSED  
-  sts_serial|   8|10| 100|0.64056917|  PASSED  
-  sts_serial|   9|10| 100|0.95246172|  PASSED  
-  sts_serial|   9|10| 100|0.45537826|  PASSED  
-  sts_serial|  10|10| 100|0.49564166|  PASSED  
-  sts_serial|  10|10| 100|0.18647826|  PASSED  
-  sts_serial|  11|10| 100|0.88334832|  PASSED  
-  sts_serial|  11|10| 100|0.99729981|   WEAK   
-  sts_serial|  12|10| 100|0.04487347|  PASSED  
-  sts_serial|  12|10| 100|0.07061114|  PASSED  
-  sts_serial|  13|10| 100|0.54891810|  PASSED  
-  sts_serial|  13|10| 100|0.68499137|  PASSED  
-  sts_serial|  14|10| 100|0.16635928|  PASSED  
-  sts_serial|  14|10| 100|0.71003648|  PASSED  
-  sts_serial|  15|10| 100|0.08063234|  PASSED  
-  sts_serial|  15|10| 100|0.97293993|  PASSED  
-  sts_serial|  16|10| 100|0.40370620|  PASSED  
-  sts_serial|  16|

[48/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
index b4b5357..feac005 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
@@ -103,7 +103,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 this.scalingH  = stepSize;
 this.reference = reference;
 this.scaled= scaled.clone();
-this.nordsieck = new Array2DRowFieldMatrix(nordsieck.getData(), 
false);
+this.nordsieck = new Array2DRowFieldMatrix<>(nordsieck.getData(), 
false);
 }
 
 /** Create a new instance.
@@ -121,7 +121,7 @@ class AdamsFieldStepInterpolator> extends Abstract

FieldODEStateAndDerivative newSoftPreviousState,

FieldODEStateAndDerivative newSoftCurrentState,
FieldEquationsMapper 
newMapper) {
-return new AdamsFieldStepInterpolator(scalingH, reference, scaled, 
nordsieck,
+return new AdamsFieldStepInterpolator<>(scalingH, reference, scaled, 
nordsieck,
  newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
@@ -181,7 +181,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 
estimatedDerivatives[j].add(scaled[j].multiply(normalizedAbscissa)).divide(x);
 }
 
-return new FieldODEStateAndDerivative(time, estimatedState, 
estimatedDerivatives);
+return new FieldODEStateAndDerivative<>(time, estimatedState, 
estimatedDerivatives);
 
 }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
index c659cc0..72d4de2 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
@@ -284,8 +284,8 @@ public class AdamsMoultonFieldIntegrator> extends
 updateHighOrderDerivativesPhase2(predictedScaled, correctedScaled, 
predictedNordsieck);
 
 // discrete events handling
-stepEnd = new FieldODEStateAndDerivative(stepEnd.getTime(), 
predictedY, correctedYDot);
-setStepStart(acceptStep(new 
AdamsFieldStepInterpolator(getStepSize(), stepEnd,
+stepEnd = new FieldODEStateAndDerivative<>(stepEnd.getTime(), 
predictedY, correctedYDot);
+setStepStart(acceptStep(new 
AdamsFieldStepInterpolator<>(getStepSize(), stepEnd,
   
correctedScaled, predictedNordsieck, forward,
   
getStepStart(), stepEnd,
   
equations.getMapper()),

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
index c1e5bee..7c2b872 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
@@ -137,8 +137,7 @@ public class AdamsNordsieckFieldTransformer> {
 private static final Map,
AdamsNordsieckFieldTransformer>>> CACHE =
-new HashMap,
- AdamsNordsieckFieldTransformer>>>();
+new HashMap<>();
 
 /** Field to which the time and state vector elements belong. */
 private final Field field;
@@ -162,11 +161,11 @@ public class AdamsNordsieckFieldTransformer> {
 // compute coefficients
 FieldMatrix bigP = buildP(rows);
 

[31/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/dh/run_1/dh_3
--
diff --git a/src/site/resources/txt/userguide/rng/stress/dh/run_1/dh_3 
b/src/site/resources/txt/userguide/rng/stress/dh/run_1/dh_3
deleted file mode 100644
index 3ac5a01..000
--- a/src/site/resources/txt/userguide/rng/stress/dh/run_1/dh_3
+++ /dev/null
@@ -1,173 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well512a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: /usr/bin/dieharder -a -g 200 -Y 1 -k 2 
-# 
-#=#
-#dieharder version 3.31.1 Copyright 2003 Robert G. Brown  #
-#=#
-   rng_name|rands/second|   Seed   |
-stdin_input_raw|  8.51e+06  |4211420527|
-#=#
-test_name   |ntup| tsamples |psamples|  p-value |Assessment
-#=#
-   diehard_birthdays|   0|   100| 100|0.73569699|  PASSED  
-  diehard_operm5|   0|   100| 100|0.08622316|  PASSED  
-  diehard_rank_32x32|   0| 4| 100|0.80836729|  PASSED  
-diehard_rank_6x8|   0|10| 100|0.99111559|  PASSED  
-   diehard_bitstream|   0|   2097152| 100|0.83659726|  PASSED  
-diehard_opso|   0|   2097152| 100|0.70330969|  PASSED  
-diehard_oqso|   0|   2097152| 100|0.65389789|  PASSED  
- diehard_dna|   0|   2097152| 100|0.48126817|  PASSED  
-diehard_count_1s_str|   0|256000| 100|0.90155342|  PASSED  
-diehard_count_1s_byt|   0|256000| 100|0.24169832|  PASSED  
- diehard_parking_lot|   0| 12000| 100|0.95085394|  PASSED  
-diehard_2dsphere|   2|  8000| 100|0.70520965|  PASSED  
-diehard_3dsphere|   3|  4000| 100|0.99881464|   WEAK   
-diehard_3dsphere|   3|  4000| 200|0.65540217|  PASSED  
- diehard_squeeze|   0|10| 100|0.88558219|  PASSED  
-diehard_sums|   0|   100| 100|0.97435568|  PASSED  
-diehard_runs|   0|10| 100|0.46447902|  PASSED  
-diehard_runs|   0|10| 100|0.77608604|  PASSED  
-   diehard_craps|   0|20| 100|0.74670227|  PASSED  
-   diehard_craps|   0|20| 100|0.07572357|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.49225755|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.01154094|  PASSED  
- sts_monobit|   1|10| 100|0.51545966|  PASSED  
-sts_runs|   2|10| 100|0.46898980|  PASSED  
-  sts_serial|   1|10| 100|0.48264154|  PASSED  
-  sts_serial|   2|10| 100|0.87095634|  PASSED  
-  sts_serial|   3|10| 100|0.93502495|  PASSED  
-  sts_serial|   3|10| 100|0.92442039|  PASSED  
-  sts_serial|   4|10| 100|0.20983709|  PASSED  
-  sts_serial|   4|10| 100|0.11248912|  PASSED  
-  sts_serial|   5|10| 100|0.33340568|  PASSED  
-  sts_serial|   5|10| 100|0.83923511|  PASSED  
-  sts_serial|   6|10| 100|0.77159773|  PASSED  
-  sts_serial|   6|10| 100|0.99729842|   WEAK   
-  sts_serial|   7|10| 100|0.69682384|  PASSED  
-  sts_serial|   7|10| 100|0.49451383|  PASSED  
-  sts_serial|   8|10| 100|0.21687301|  PASSED  
-  sts_serial|   8|10| 100|0.20732811|  PASSED  
-  sts_serial|   9|10| 100|0.15358619|  PASSED  
-  sts_serial|   9|10| 100|0.79842773|  PASSED  
-  sts_serial|  10|10| 100|0.28868417|  PASSED  
-  sts_serial|  10|10| 100|0.72864074|  PASSED  
-  sts_serial|  11|10| 100|0.52528201|  PASSED  
-  sts_serial|  11|10| 100|0.56684576|  PASSED  
-  sts_serial|  12|10| 100|0.94363896|  PASSED  
-  sts_serial|  12|10| 100|0.75370192|  PASSED  
-  sts_serial|  13|10| 100|0.64929204|  PASSED  
-  sts_serial|  13|10| 100|0.16172691|  PASSED  
-  sts_serial|  14|10| 100|0.25057488|  PASSED  
-  sts_serial|  14|10| 100|0.48541434|  PASSED  
-  sts_serial|  15|10| 100|0.22064194|  PASSED  
-  sts_serial|  15|10| 100|0.01808135|  PASSED  
-  sts_serial|  16|10| 100|0.80793746|  PASSED  
-  sts_serial|  16|10| 

[14/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_1
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_1 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_1
deleted file mode 100644
index d6c6991..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_1
+++ /dev/null
@@ -1,3879 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.JDKRandom
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.99e+9
-p-value of test   :   eps  *
-
-

-CPU time used:  00:02:13.19
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.9969
-
-

-CPU time used:  00:02:19.32
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions :0
-p-value of test   : 1 - eps1*
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795333120
-  j =  1  :6
-  j =  2  :0
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:40.80
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N 

[21/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_3
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_3 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_3
deleted file mode 100644
index 16fc7ab..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_3
+++ /dev/null
@@ -1,3807 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well512a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.81
-
-

-CPU time used:  00:01:48.26
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.70
-
-

-CPU time used:  00:01:43.38
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1359
-p-value of test   :0.55
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334479
-  j =  1  :57282
-  j =  2  : 1359
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:15.12
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r 

[37/57] [abbrv] [math] Link to API of releases 3.6 and 3.6.1.

2016-09-20 Thread chtompki
Link to API of releases 3.6 and 3.6.1.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/55cc560f
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/55cc560f
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/55cc560f

Branch: refs/heads/master
Commit: 55cc560f8a20c183db108dd2136edd3721bd6935
Parents: 647b2ef
Author: Gilles 
Authored: Sun Aug 28 02:57:51 2016 +0200
Committer: Gilles 
Committed: Sun Aug 28 02:57:51 2016 +0200

--
 src/site/site.xml | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/55cc560f/src/site/site.xml
--
diff --git a/src/site/site.xml b/src/site/site.xml
index b6e0f7a..294c006 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -27,6 +27,10 @@
   
   http://commons.apache.org/math/download_math.cgi"/>
   
+  http://commons.apache.org/math/javadocs/api-3.6.1/index.html"/>
+  http://commons.apache.org/math/javadocs/api-3.6/index.html"/>
   http://commons.apache.org/math/javadocs/api-3.5/index.html"/>
   

[47/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
index 17097f5..e3b1959 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
@@ -170,7 +170,7 @@ public class HarmonicCurveFitterTest {
  0, 1, 2, 3, 2, 1,
  0, -1, -2, -3, -2, -1,
  0, 1, 2, 3, 2, 1, 0 };
-final List points = new 
ArrayList();
+final List points = new ArrayList<>();
 for (int i = 0; i < y.length; i++) {
 points.add(new WeightedObservedPoint(1, i, y[i]));
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
index 377726d..016bf8b 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
@@ -57,7 +57,7 @@ class CircleProblem {
 public CircleProblem(double xError,
  double yError,
  int searchResolution) {
-points = new ArrayList();
+points = new ArrayList<>();
 xSigma = xError;
 ySigma = yError;
 resolution = searchResolution;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
index 3c88431..87a2b6f 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
@@ -29,7 +29,7 @@ class CircleVectorial {
 private ArrayList points;
 
 public CircleVectorial() {
-points  = new ArrayList();
+points  = new ArrayList<>();
 }
 
 public void addPoint(double px, double py) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
index b34dcaf..bffb95b 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
@@ -262,7 +262,7 @@ public class EvaluationTest {
 // "MultivariateJacobianFunction".
 final MultivariateJacobianFunction m1 = new 
MultivariateJacobianFunction() {
 public Pair value(RealVector notUsed) {
-return new Pair(null, null);
+return new Pair<>(null, null);
 }
 };
 
@@ -276,7 +276,7 @@ public class EvaluationTest {
 
 final MultivariateJacobianFunction m2 = new ValueAndJacobianFunction() 
{
 public Pair value(RealVector notUsed) {
-return new Pair(null, null);
+return new Pair<>(null, null);
 }
 public RealVector computeValue(final double[] params) {
 return null;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
index 6642854..3c637ae 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
@@ -232,7 +232,7 @@ public class EvaluationTestValidation {
   

[41/57] [abbrv] [math] Add JMH microbenchmark testing dependencies + profile

2016-09-20 Thread chtompki
Add JMH microbenchmark testing dependencies + profile


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/98e27f58
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/98e27f58
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/98e27f58

Branch: refs/heads/master
Commit: 98e27f58e7aef81c4eaab58c08b09e6897199139
Parents: 4cfe573
Author: Artem Barger 
Authored: Tue Sep 13 01:26:34 2016 +0300
Committer: Artem Barger 
Committed: Tue Sep 13 01:28:16 2016 +0300

--
 pom.xml | 68 
 1 file changed, 68 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/98e27f58/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 6c7ae4a..b3a649b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -367,6 +367,20 @@
 
 
 
+  org.openjdk.jmh
+  jmh-core
+  ${jmh.version}
+  test
+
+
+
+  org.openjdk.jmh
+  jmh-generator-annprocess
+  ${jmh.version}
+  test
+
+
+
   junit
   junit
   4.11
@@ -426,6 +440,10 @@
 
 
 {0,date,-MM-dd 
HH:mm:ssZ}
+
+
+1.13
+benchmarks
   
 
   
@@ -849,5 +867,55 @@
 
   
 
+
+
+  benchmark
+  
+true
+org.apache
+  
+
+  
+
+  
+org.apache.maven.plugins
+maven-compiler-plugin
+3.1
+
+  ${maven.compiler.target}
+  ${maven.compiler.target}
+  ${maven.compiler.target}
+
+  
+  
+org.codehaus.mojo
+exec-maven-plugin
+
+  
+benchmark
+test
+
+  exec
+
+
+  test
+  java
+  
+-classpath
+
+org.openjdk.jmh.Main
+-rf
+json
+-rff
+target/jmh-result.${benchmark}.json
+${benchmark}
+  
+
+  
+
+  
+
+  
+
   
 



[39/57] [abbrv] [math] Usage example (userguide).

2016-09-20 Thread chtompki
Usage example (userguide).

Micro-benchmarking of random number generators ("Commons Rng") using 
"PerfTestUtils".


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/ae8f5f04
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/ae8f5f04
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/ae8f5f04

Branch: refs/heads/master
Commit: ae8f5f04574be75727f5e948e04bc649cbdbbb3b
Parents: a215c3f
Author: Gilles 
Authored: Sun Sep 4 12:44:06 2016 +0200
Committer: Gilles 
Committed: Sun Sep 4 12:44:06 2016 +0200

--
 .../rng/RandomNumberGeneratorBenchmark.java | 160 +++
 1 file changed, 160 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/ae8f5f04/src/userguide/java/org/apache/commons/math4/userguide/rng/RandomNumberGeneratorBenchmark.java
--
diff --git 
a/src/userguide/java/org/apache/commons/math4/userguide/rng/RandomNumberGeneratorBenchmark.java
 
b/src/userguide/java/org/apache/commons/math4/userguide/rng/RandomNumberGeneratorBenchmark.java
new file mode 100644
index 000..836e41a
--- /dev/null
+++ 
b/src/userguide/java/org/apache/commons/math4/userguide/rng/RandomNumberGeneratorBenchmark.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math4.userguide.rng;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Random;
+
+import org.apache.commons.rng.RandomSource;
+import org.apache.commons.rng.UniformRandomProvider;
+
+import org.apache.commons.math4.random.RandomGenerator;
+import org.apache.commons.math4.PerfTestUtils;
+
+/**
+ * Benchmark of the RNGs.
+ */
+public class RandomNumberGeneratorBenchmark {
+/** Number of loops over the operations to be benchmarked. */
+private static final int NUM_CALLS = 1_000_000;
+/** Number of runs for computing the statistics. */
+private static final int NUM_STATS = 500;
+/** Report formatting. */
+private static final int MAX_NAME_WIDTH = 45;
+
+/**
+ * Program's entry point.
+ *
+ * @param args List of {@link RandomSource RNG indentifiers}.
+ */
+public static void main(String[] args) throws Exception {
+final RandomNumberGeneratorBenchmark app = new 
RandomNumberGeneratorBenchmark();
+
+printEnv();
+
+final List rngList = new ArrayList<>();
+for (int i = 0; i < args.length; i++) {
+rngList.add(RandomSource.create(RandomSource.valueOf(args[i])));
+}
+
+app.benchmark(rngList);
+}
+
+/**
+ * Test all generators.
+ * The reference is JDK's "Random".
+ *
+ * @param list List of generators to benchmark.
+ */
+public void benchmark(List rngList) {
+// Reference is JDK's "Random".
+final Random jdk = new Random();
+
+// List of benchmarked codes.
+final PerfTestUtils.RunTest[] candidates = new 
PerfTestUtils.RunTest[rngList.size() + 1];
+
+// "nextInt()" benchmark.
+
+candidates[0] = new PerfTestUtils.RunTest(jdk.toString()) {
+@Override
+public Double call() throws Exception {
+return (double) jdk.nextInt();
+}
+};
+for (int i = 0; i < rngList.size(); i++) {
+final UniformRandomProvider rng = rngList.get(i);
+
+candidates[i + 1] = new PerfTestUtils.RunTest(rng.toString()) {
+@Override
+public Double call() throws Exception {
+return (double) rng.nextInt();
+}
+};
+}
+
+PerfTestUtils.timeAndReport("nextInt()",
+MAX_NAME_WIDTH,
+NUM_CALLS,
+NUM_STATS,
+false,
+candidates);
+
+

[50/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
index 2dc6933..be89ef4 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
@@ -374,9 +374,9 @@ public class FieldRotation> 
implements Serializabl
 public FieldRotation(final RotationOrder order, final RotationConvention 
convention,
  final T alpha1, final T alpha2, final T alpha3) {
 final T one = alpha1.getField().getOne();
-final FieldRotation r1 = new FieldRotation(new 
FieldVector3D(one, order.getA1()), alpha1, convention);
-final FieldRotation r2 = new FieldRotation(new 
FieldVector3D(one, order.getA2()), alpha2, convention);
-final FieldRotation r3 = new FieldRotation(new 
FieldVector3D(one, order.getA3()), alpha3, convention);
+final FieldRotation r1 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA1()), alpha1, convention);
+final FieldRotation r2 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA2()), alpha2, convention);
+final FieldRotation r3 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA3()), alpha3, convention);
 final FieldRotation composed = r1.compose(r2.compose(r3, 
convention), convention);
 q0 = composed.q0;
 q1 = composed.q1;
@@ -453,7 +453,7 @@ public class FieldRotation> 
implements Serializabl
  * of the instance
  */
 public FieldRotation revert() {
-return new FieldRotation(q0.negate(), q1, q2, q3, false);
+return new FieldRotation<>(q0.negate(), q1, q2, q3, false);
 }
 
 /** Get the scalar coordinate of the quaternion.
@@ -509,17 +509,17 @@ public class FieldRotation> 
implements Serializabl
 final T squaredSine = 
q1.multiply(q1).add(q2.multiply(q2)).add(q3.multiply(q3));
 if (squaredSine.getReal() == 0) {
 final Field field = squaredSine.getField();
-return new FieldVector3D(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
+return new FieldVector3D<>(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
 field.getZero(),
 field.getZero());
 } else {
 final double sgn = convention == 
RotationConvention.VECTOR_OPERATOR ? +1 : -1;
 if (q0.getReal() < 0) {
 T inverse = squaredSine.sqrt().reciprocal().multiply(sgn);
-return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 final T inverse = 
squaredSine.sqrt().reciprocal().negate().multiply(sgn);
-return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 }
 
@@ -1032,7 +1032,7 @@ public class FieldRotation> 
implements Serializabl
  */
 private FieldVector3D vector(final double x, final double y, final 
double z) {
 final T zero = q0.getField().getZero();
-return new FieldVector3D(zero.add(x), zero.add(y), zero.add(z));
+return new FieldVector3D<>(zero.add(x), zero.add(y), zero.add(z));
 }
 
 /** Get the 3X3 matrix corresponding to the instance
@@ -1090,7 +1090,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 
FieldVector3D(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
+return new 
FieldVector3D<>(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
 
q0.multiply(y.multiply(q0).subtract(q3.multiply(x).subtract(q1.multiply(z.add(s.multiply(q2)).multiply(2).subtract(y),
 
q0.multiply(z.multiply(q0).subtract(q1.multiply(y).subtract(q2.multiply(x.add(s.multiply(q3)).multiply(2).subtract(z));
 
@@ -1108,7 +1108,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 

[22/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_2
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_2 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_2
deleted file mode 100644
index a5a08d0..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_2
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.MersenneTwister
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.78
-
-

-CPU time used:  00:02:11.53
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.36
-
-

-CPU time used:  00:01:44.50
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1411
-p-value of test   :0.11
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334531
-  j =  1  :57178
-  j =  2  : 1411
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:15.49
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[35/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
MATH-1383

Update userguide: removing reference to deleted package "o.a.c.math4.rng".


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d52a020e
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d52a020e
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d52a020e

Branch: refs/heads/master
Commit: d52a020ef7bdc98ba2ba88a8e2bdd412d30a930c
Parents: e2423a4
Author: Gilles 
Authored: Sun Aug 28 00:06:51 2016 +0200
Committer: Gilles 
Committed: Sun Aug 28 00:06:51 2016 +0200

--
 src/site/site.xml  |  1 -
 src/site/xdoc/userguide/random.xml | 45 +
 2 files changed, 18 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/d52a020e/src/site/site.xml
--
diff --git a/src/site/site.xml b/src/site/site.xml
index 22fefe6..b6e0f7a 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -76,7 +76,6 @@
   
   
   
-  
 
 
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/d52a020e/src/site/xdoc/userguide/random.xml
--
diff --git a/src/site/xdoc/userguide/random.xml 
b/src/site/xdoc/userguide/random.xml
index 8ef9f84..868c96a 100644
--- a/src/site/xdoc/userguide/random.xml
+++ b/src/site/xdoc/userguide/random.xml
@@ -49,14 +49,8 @@
   These utilities rely on an underlying "source of randomness", which in 
most
   cases is a pseudo-random number generator (PRNG) that produces sequences
   of numbers that are uniformly distributed within their range.
-  Commons Math provides many PRNG implementations that share a common
-  interface:
-  
-   UniformRandomProvider (for more details about this interface and the
-  available RNG algorithms, please refer to the Javadoc of package
-  
-   org.apache.commons.math4.rng and this section
-  of the userguide.
+  Commons Math depends on http://commons.apache.org/rng;>Commons 
Rng
+  for the PRNG implementations.
 
 
   A PRNG algorithm is often deterministic, i.e. it produces the same 
sequence
@@ -96,23 +90,20 @@
 
 It is possible for a sequence of numbers to appear random, but
 nonetheless to be predictable based on the algorithm used to generate the
-sequence. If in addition to randomness, strong unpredictability is
-required, it is best to use a  
+sequence.
+When in addition to randomness, strong unpredictability is
+required, a
 http://www.wikipedia.org/wiki/Cryptographically_secure_pseudo-random_number_generator;>
-  secure random number generator to generate values (or strings).
-
-Most PRNG implemented in this library are not secure in that sense, except
-perhaps the 
-  ISAAC generator.
-An alternative is to use an instance of the JDK-provided 
SecureRandom
-generator.
+secure random number generator
+should be used to generate values (or strings), for example an instance of
+the JDK-provided SecureRandom generator.
 In general, such secure generator produce sequence based on a source of
 true randomness, and sequences started with the same seed will diverge.
 
 The RandomUtils
-class provides a "factory" method to wrap java.util.Random or
-java.security.SecureRandom instances in an object that 
implements
-the 
+class provides a method for wrapping a java.util.Random or
+java.security.SecureRandom instance in an object that 
implements
+the http://commons.apache.org/proper/commons-rng/apidocs/org/apache/commons/rng/UniformRandomProvider.html;>
 UniformRandomProvider interface:
 
 UniformRandomProvider rg = RandomUtils.asUniformRandomProvider(new 
java.security.SecureRandom());
@@ -151,21 +142,21 @@ UniformRandomProvider rg = 
RandomUtils.asUniformRandomProvider(new java.security
 Generating random vectors from a bivariate normal distribution
 
 // Import common PRNG interface and factory class that instantiates the PRNG.
-import org.apache.commons.math4.rng.UniformRandomProvider;
-import org.apache.commons.math4.rng.RandomSource;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.RandomSource;
 
-// Create (and possibly seed) a PRNG (could use any of the CM-provided 
generators)
+// Create (and possibly seed) a PRNG (could use any of the CM-provided 
generators).
 long seed = 17399225432L; // Fixed seed means same results every time 
 UniformRandomProvider rg = RandomSource.create(RandomSource.MT, seed);
 
-// Create a GassianRandomGenerator using rg as its source of randomness
+// Create a 

[32/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
MATH-1383

Documentation cleanup after move of PRNG functionality to Commons Rng.
The following were deleted:
 * Stress test reports
 * Section in the userguide
 * Usage example ("RandomStressTester.java" and "stdin2testu01.c")


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d14573fe
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d14573fe
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d14573fe

Branch: refs/heads/master
Commit: d14573fe372a0937f7ee6ebbde13693e5c1ce4a8
Parents: 6804238
Author: Gilles 
Authored: Fri Aug 19 01:29:09 2016 +0200
Committer: Gilles 
Committed: Fri Aug 19 01:29:09 2016 +0200

--
 src/site/apt/userguide/rng.apt  |  228 -
 .../txt/userguide/rng/stress/dh/run_1/dh_1  |  146 -
 .../txt/userguide/rng/stress/dh/run_1/dh_10 |  139 -
 .../txt/userguide/rng/stress/dh/run_1/dh_11 |  148 -
 .../txt/userguide/rng/stress/dh/run_1/dh_12 |  172 -
 .../txt/userguide/rng/stress/dh/run_1/dh_13 |  168 -
 .../txt/userguide/rng/stress/dh/run_1/dh_2  |  139 -
 .../txt/userguide/rng/stress/dh/run_1/dh_3  |  173 -
 .../txt/userguide/rng/stress/dh/run_1/dh_4  |  140 -
 .../txt/userguide/rng/stress/dh/run_1/dh_5  |  140 -
 .../txt/userguide/rng/stress/dh/run_1/dh_6  |  146 -
 .../txt/userguide/rng/stress/dh/run_1/dh_7  |  204 -
 .../txt/userguide/rng/stress/dh/run_1/dh_8  |  201 -
 .../txt/userguide/rng/stress/dh/run_1/dh_9  |  143 -
 .../txt/userguide/rng/stress/dh/run_2/dh_1  |  146 -
 .../txt/userguide/rng/stress/dh/run_2/dh_10 |  172 -
 .../txt/userguide/rng/stress/dh/run_2/dh_11 |  259 --
 .../txt/userguide/rng/stress/dh/run_2/dh_12 |  168 -
 .../txt/userguide/rng/stress/dh/run_2/dh_13 |  261 --
 .../txt/userguide/rng/stress/dh/run_2/dh_2  |  140 -
 .../txt/userguide/rng/stress/dh/run_2/dh_3  |  139 -
 .../txt/userguide/rng/stress/dh/run_2/dh_4  |  171 -
 .../txt/userguide/rng/stress/dh/run_2/dh_5  |  143 -
 .../txt/userguide/rng/stress/dh/run_2/dh_6  |  260 --
 .../txt/userguide/rng/stress/dh/run_2/dh_7  |  143 -
 .../txt/userguide/rng/stress/dh/run_2/dh_8  |  800 
 .../txt/userguide/rng/stress/dh/run_2/dh_9  |  175 -
 .../txt/userguide/rng/stress/tu/run_1/tu_1  | 3882 --
 .../txt/userguide/rng/stress/tu/run_1/tu_10 | 3803 -
 .../txt/userguide/rng/stress/tu/run_1/tu_11 | 3795 -
 .../txt/userguide/rng/stress/tu/run_1/tu_12 | 3803 -
 .../txt/userguide/rng/stress/tu/run_1/tu_13 | 3802 -
 .../txt/userguide/rng/stress/tu/run_1/tu_2  | 3803 -
 .../txt/userguide/rng/stress/tu/run_1/tu_3  | 3807 -
 .../txt/userguide/rng/stress/tu/run_1/tu_4  | 3806 -
 .../txt/userguide/rng/stress/tu/run_1/tu_5  | 3804 -
 .../txt/userguide/rng/stress/tu/run_1/tu_6  | 3804 -
 .../txt/userguide/rng/stress/tu/run_1/tu_7  | 3803 -
 .../txt/userguide/rng/stress/tu/run_1/tu_8  | 3804 -
 .../txt/userguide/rng/stress/tu/run_1/tu_9  | 3802 -
 .../txt/userguide/rng/stress/tu/run_2/tu_1  | 3879 -
 .../txt/userguide/rng/stress/tu/run_2/tu_10 | 3803 -
 .../txt/userguide/rng/stress/tu/run_2/tu_11 | 3795 -
 .../txt/userguide/rng/stress/tu/run_2/tu_12 | 3795 -
 .../txt/userguide/rng/stress/tu/run_2/tu_13 | 3795 -
 .../txt/userguide/rng/stress/tu/run_2/tu_2  | 3803 -
 .../txt/userguide/rng/stress/tu/run_2/tu_3  | 3808 -
 .../txt/userguide/rng/stress/tu/run_2/tu_4  | 3805 -
 .../txt/userguide/rng/stress/tu/run_2/tu_5  | 3804 -
 .../txt/userguide/rng/stress/tu/run_2/tu_6  | 3803 -
 .../txt/userguide/rng/stress/tu/run_2/tu_7  | 3803 -
 .../txt/userguide/rng/stress/tu/run_2/tu_8  | 3803 -
 .../txt/userguide/rng/stress/tu/run_2/tu_9  | 3795 -
 src/site/xdoc/userguide/index.xml   |7 -
 src/userguide/README|6 +-
 src/userguide/c/rng/stdin2testu01.c |  127 -
 .../math4/userguide/rng/GeneratorsList.java |   57 -
 .../math4/userguide/rng/RandomStressTester.java |  280 --
 58 files changed, 3 insertions(+), 104747 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/apt/userguide/rng.apt
--
diff --git a/src/site/apt/userguide/rng.apt 

[24/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_12
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_12 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_12
deleted file mode 100644
index 4d9d01a..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_12
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.XorShift1024Star
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.12
-
-

-CPU time used:  00:02:12.69
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.76
-
-

-CPU time used:  00:01:35.97
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1351
-p-value of test   :0.63
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334471
-  j =  1  :57298
-  j =  2  : 1351
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:06:20.64
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[17/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_7
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_7 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_7
deleted file mode 100644
index 81573d0..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_7
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well44497a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.84
-
-

-CPU time used:  00:02:20.71
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.16
-
-

-CPU time used:  00:02:00.30
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1360
-p-value of test   :0.54
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334480
-  j =  1  :57280
-  j =  2  : 1360
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:17.19
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  

[44/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java 
b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
index b547cdc..c8bd3f9 100644
--- a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
@@ -104,9 +104,9 @@ public final class MatrixUtilsTest {
 
 @Test
 public void testcreateFieldMatrix() {
-Assert.assertEquals(new 
Array2DRowFieldMatrix(asFraction(testData)),
+Assert.assertEquals(new Array2DRowFieldMatrix<>(asFraction(testData)),
  MatrixUtils.createFieldMatrix(asFraction(testData)));
-Assert.assertEquals(new 
Array2DRowFieldMatrix(FractionField.getInstance(), fractionColMatrix),
+Assert.assertEquals(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), fractionColMatrix),
  MatrixUtils.createFieldMatrix(fractionColMatrix));
 try {
 MatrixUtils.createFieldMatrix(asFraction(new double[][] {{1}, 
{1,2}}));  // ragged
@@ -149,9 +149,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateRowFieldMatrix() {
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(asFraction(row)),
- new 
Array2DRowFieldMatrix(asFraction(rowMatrix)));
+ new Array2DRowFieldMatrix<>(asFraction(rowMatrix)));
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(fractionRow),
- new Array2DRowFieldMatrix(fractionRowMatrix));
+ new Array2DRowFieldMatrix<>(fractionRowMatrix));
 try {
 MatrixUtils.createRowFieldMatrix(new Fraction[] {});  // empty
 Assert.fail("Expecting MathIllegalArgumentException");
@@ -187,9 +187,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateColumnFieldMatrix() {
 
Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(asFraction(col)),
- new 
Array2DRowFieldMatrix(asFraction(colMatrix)));
+ new Array2DRowFieldMatrix<>(asFraction(colMatrix)));
 Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(fractionCol),
- new Array2DRowFieldMatrix(fractionColMatrix));
+ new Array2DRowFieldMatrix<>(fractionColMatrix));
 
 try {
 MatrixUtils.createColumnFieldMatrix(new Fraction[] {});  // empty
@@ -268,7 +268,7 @@ public final class MatrixUtilsTest {
 { new BigFraction(2), new BigFraction(5), new BigFraction(3) },
 { new BigFraction(1), new BigFraction(0), new BigFraction(8) }
 };
-FieldMatrix m = new 
Array2DRowFieldMatrix(bfData, false);
+FieldMatrix m = new Array2DRowFieldMatrix<>(bfData, 
false);
 RealMatrix converted = MatrixUtils.bigFractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);
@@ -281,7 +281,7 @@ public final class MatrixUtilsTest {
 { new Fraction(2), new Fraction(5), new Fraction(3) },
 { new Fraction(1), new Fraction(0), new Fraction(8) }
 };
-FieldMatrix m = new Array2DRowFieldMatrix(fData, 
false);
+FieldMatrix m = new Array2DRowFieldMatrix<>(fData, false);
 RealMatrix converted = MatrixUtils.fractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
index 176b227..0266b30 100644
--- a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
@@ -209,7 +209,7 @@ public class SparseFieldMatrixTest {
 SparseFieldMatrix m2 = createSparseMatrix(testData2);
 assertClose("inverse multiply", m.multiply(mInv), identity,
 entryTolerance);
-assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix(FractionField.getInstance(), testDataInv)), 
identity,
+assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), testDataInv)), identity,
 entryTolerance);
 assertClose("inverse multiply", mInv.multiply(m), identity,

[23/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_13
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_13 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_13
deleted file mode 100644
index 9496500..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_13
+++ /dev/null
@@ -1,3802 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.TwoCmres (Cmres: 
[0xedce446814d3b3d9L, 33, 330658535] + Cmres: [0xc5b3cf786c806df7L, 33, 
331932042])
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.97
-
-

-CPU time used:  00:01:48.06
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.18
-
-

-CPU time used:  00:01:45.25
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1324
-p-value of test   :0.86
-
--
-Total number of cells containing j balls
-
-  j =  0  :  13194079533
-  j =  1  :57352
-  j =  2  : 1324
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:10.60
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-

[43/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
index d79a19f..80b6828 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
@@ -151,8 +151,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 y0[i] = field.getOne().add(i);
 }
 
-FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE(ode),
-new 
FieldODEState(t0, y0),
+FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE<>(ode),
+new 
FieldODEState<>(t0, y0),
 tEvent);
 Assert.assertEquals(tEvent.getReal(), result.getTime().getReal(), 
epsilonT);
 T[] y = result.getState();
@@ -180,8 +180,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 return Action.CONTINUE;
 }
 }, Double.POSITIVE_INFINITY, 1.0e-20, 100);
-result = integrator.integrate(new FieldExpandableODE(ode),
-  new FieldODEState(t0, y0),
+result = integrator.integrate(new FieldExpandableODE<>(ode),
+  new FieldODEState<>(t0, y0),
   tEvent.add(120));
 Assert.assertEquals(tEvent.add(120).getReal(), 
result.getTime().getReal(), epsilonT);
 y = result.getState();
@@ -201,17 +201,17 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
MaxCountExceededException, NoBracketingException {
 RungeKuttaFieldIntegrator integrator = createIntegrator(field, 
field.getZero().add(0.01));
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1(field);
-integrator.integrate(new FieldExpandableODE(pb),
- new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
+TestFieldProblem1 pb = new TestFieldProblem1<>(field);
+integrator.integrate(new FieldExpandableODE<>(pb),
+ new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
  field.getOne());
 Assert.fail("an exception should have been thrown");
 } catch(DimensionMismatchException ie) {
 }
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1(field);
-integrator.integrate(new FieldExpandableODE(pb),
- new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
+TestFieldProblem1 pb = new TestFieldProblem1<>(field);
+integrator.integrate(new FieldExpandableODE<>(pb),
+ new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
  field.getZero());
 Assert.fail("an exception should have been thrown");
 } catch(NumberIsTooSmallException ie) {
@@ -231,12 +231,12 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
 @SuppressWarnings("unchecked")
 TestFieldProblemAbstract[] allProblems =
 (TestFieldProblemAbstract[]) 
Array.newInstance(TestFieldProblemAbstract.class, 6);
-allProblems[0] = new TestFieldProblem1(field);
-allProblems[1] = new TestFieldProblem2(field);
-allProblems[2] = new TestFieldProblem3(field);
-allProblems[3] = new TestFieldProblem4(field);
-allProblems[4] = new TestFieldProblem5(field);
-allProblems[5] = new TestFieldProblem6(field);
+allProblems[0] = new TestFieldProblem1<>(field);
+allProblems[1] = new TestFieldProblem2<>(field);
+allProblems[2] = new TestFieldProblem3<>(field);
+allProblems[3] = new TestFieldProblem4<>(field);
+allProblems[4] = new TestFieldProblem5<>(field);
+allProblems[5] = new TestFieldProblem6<>(field);
 for (TestFieldProblemAbstract pb :  allProblems) {
 
 T previousValueError = null;
@@ -246,7 +246,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 T step = 
pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(FastMath.pow(2.0,
 -i));
 
 

[49/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
index e84bf58..6d4d980 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
@@ -59,7 +59,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
  * @param tolerance below which points are consider to be identical
  */
 public SphericalPolygonsSet(final Vector3D pole, final double tolerance) {
-super(new BSPTree(new Circle(pole, 
tolerance).wholeHyperplane(),
+super(new BSPTree<>(new Circle(pole, tolerance).wholeHyperplane(),
 new BSPTree(Boolean.FALSE),
 new BSPTree(Boolean.TRUE),
 null),
@@ -198,7 +198,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 final int n = vertices.length;
 if (n == 0) {
 // the tree represents the whole space
-return new BSPTree(Boolean.TRUE);
+return new BSPTree<>(Boolean.TRUE);
 }
 
 // build the vertices
@@ -208,7 +208,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the edges
-List edges = new ArrayList(n);
+List edges = new ArrayList<>(n);
 Vertex end = vArray[n - 1];
 for (int i = 0; i < n; ++i) {
 
@@ -241,7 +241,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the tree top-down
-final BSPTree tree = new BSPTree();
+final BSPTree tree = new BSPTree<>();
 insertEdges(hyperplaneThickness, tree, edges);
 
 return tree;
@@ -284,8 +284,8 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // we have split the node by inserting an edge as a cut sub-hyperplane
 // distribute the remaining edges in the two sub-trees
-final List outsideList = new ArrayList();
-final List insideList  = new ArrayList();
+final List outsideList = new ArrayList<>();
+final List insideList  = new ArrayList<>();
 for (final Edge edge : edges) {
 if (edge != inserted) {
 edge.split(inserted.getCircle(), outsideList, insideList);
@@ -384,7 +384,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 
 // convert the list of all edges into a list of start vertices
-loops = new ArrayList();
+loops = new ArrayList<>();
 while (!edges.isEmpty()) {
 
 // this is an edge belonging to a new loop, store it
@@ -468,10 +468,10 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // handle special cases first
 if (isEmpty()) {
-return new EnclosingBall(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
+return new EnclosingBall<>(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
 }
 if (isFull()) {
-return new EnclosingBall(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
+return new EnclosingBall<>(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
 }
 
 // as the polygons is neither empty nor full, it has some boundaries 
and cut hyperplanes
@@ -479,13 +479,13 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 if (isEmpty(root.getMinus()) && isFull(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall(new 
S2Point(circle.getPole()).negate(),
+return new EnclosingBall<>(new S2Point(circle.getPole()).negate(),
 0.5 * FastMath.PI);
 }
 if (isFull(root.getMinus()) && isEmpty(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall(new 
S2Point(circle.getPole()),
+return new EnclosingBall<>(new S2Point(circle.getPole()),
 0.5 * FastMath.PI);
 }
 
@@ -505,7 +505,7 @@ public 

[34/57] [abbrv] [math] Merge branch 'develop__dependent_on_commons_rng' into develop

2016-09-20 Thread chtompki
Merge branch 'develop__dependent_on_commons_rng' into develop

Completes issue MATH-1383 (see JIRA).


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/e2423a46
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/e2423a46
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/e2423a46

Branch: refs/heads/master
Commit: e2423a46848297980e264723cb9be994a13cf549
Parents: 827d964 af6bbee
Author: Gilles 
Authored: Sat Aug 27 22:02:24 2016 +0200
Committer: Gilles 
Committed: Sat Aug 27 22:02:24 2016 +0200

--
 pom.xml |6 +
 src/changes/changes.xml |3 +
 .../AbstractIntegerDistribution.java|2 +-
 .../AbstractMultivariateRealDistribution.java   |2 +-
 .../distribution/AbstractRealDistribution.java  |2 +-
 .../math4/distribution/BetaDistribution.java|2 +-
 .../distribution/ConstantRealDistribution.java  |2 +-
 .../distribution/EmpiricalDistribution.java |2 +-
 .../distribution/EnumeratedDistribution.java|2 +-
 .../EnumeratedIntegerDistribution.java  |2 +-
 .../EnumeratedRealDistribution.java |2 +-
 .../distribution/ExponentialDistribution.java   |2 +-
 .../math4/distribution/GammaDistribution.java   |2 +-
 .../math4/distribution/IntegerDistribution.java |2 +-
 .../distribution/LogNormalDistribution.java |2 +-
 .../MixtureMultivariateRealDistribution.java|2 +-
 .../MultivariateNormalDistribution.java |2 +-
 .../MultivariateRealDistribution.java   |2 +-
 .../math4/distribution/NormalDistribution.java  |2 +-
 .../math4/distribution/ParetoDistribution.java  |2 +-
 .../math4/distribution/PoissonDistribution.java |2 +-
 .../math4/distribution/RealDistribution.java|2 +-
 .../UniformIntegerDistribution.java |2 +-
 .../distribution/UniformRealDistribution.java   |2 +-
 .../math4/distribution/ZipfDistribution.java|2 +-
 .../math4/genetics/GeneticAlgorithm.java|4 +-
 .../commons/math4/genetics/NPointCrossover.java |2 +-
 .../math4/genetics/OrderedCrossover.java|2 +-
 .../math4/genetics/UniformCrossover.java|2 +-
 .../ml/clustering/FuzzyKMeansClusterer.java |4 +-
 .../ml/clustering/KMeansPlusPlusClusterer.java  |4 +-
 .../ml/neuralnet/FeatureInitializerFactory.java |4 +-
 .../scalar/noderiv/CMAESOptimizer.java  |2 +-
 .../MultiStartUnivariateOptimizer.java  |2 +-
 .../math4/random/GaussianRandomGenerator.java   |2 +-
 .../commons/math4/random/JDKRandomAdaptor.java  |2 +-
 .../commons/math4/random/RandomGenerator.java   |2 +-
 .../commons/math4/random/RandomUtils.java   |2 +-
 .../apache/commons/math4/random/RngAdaptor.java |8 +-
 .../math4/random/StableRandomGenerator.java |2 +-
 .../math4/random/UniformRandomGenerator.java|2 +-
 .../random/UnitSphereRandomVectorGenerator.java |4 +-
 .../apache/commons/math4/rng/RandomSource.java  |  418 --
 .../math4/rng/UniformRandomProvider.java|  118 -
 .../math4/rng/internal/BaseProvider.java|  141 -
 .../math4/rng/internal/ProviderBuilder.java |  346 --
 .../math4/rng/internal/StateSettable.java   |   49 -
 .../math4/rng/internal/package-info.java|   51 -
 .../rng/internal/source32/AbstractWell.java |  208 -
 .../rng/internal/source32/ISAACRandom.java  |  270 --
 .../rng/internal/source32/IntProvider.java  |  137 -
 .../math4/rng/internal/source32/JDKRandom.java  |   95 -
 .../rng/internal/source32/MersenneTwister.java  |  230 --
 .../rng/internal/source32/RandomIntSource.java  |   30 -
 .../math4/rng/internal/source32/Well1024a.java  |   78 -
 .../math4/rng/internal/source32/Well19937a.java |   80 -
 .../math4/rng/internal/source32/Well19937c.java |   85 -
 .../math4/rng/internal/source32/Well44497a.java |   83 -
 .../math4/rng/internal/source32/Well44497b.java |   90 -
 .../math4/rng/internal/source32/Well512a.java   |   78 -
 .../rng/internal/source32/package-info.java |   52 -
 .../rng/internal/source64/LongProvider.java |  141 -
 .../internal/source64/MersenneTwister64.java|  201 -
 .../rng/internal/source64/RandomLongSource.java |   30 -
 .../math4/rng/internal/source64/SplitMix64.java |   78 -
 .../math4/rng/internal/source64/TwoCmres.java   |  310 --
 .../rng/internal/source64/XorShift1024Star.java |  108 -
 .../rng/internal/source64/package-info.java |   52 -
 .../math4/rng/internal/util/Int2Long.java   |   37 -
 .../math4/rng/internal/util/IntArray2Int.java   |   41 -
 .../rng/internal/util/IntArray2LongArray.java   |   44 -
 .../math4/rng/internal/util/Long2Int.java   |   36 -
 

[16/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_8
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_8 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_8
deleted file mode 100644
index 042d209..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_8
+++ /dev/null
@@ -1,3804 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well44497b
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.54
-
-

-CPU time used:  00:01:55.29
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.92
-
-

-CPU time used:  00:01:42.19
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1367
-p-value of test   :0.47
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334487
-  j =  1  :57266
-  j =  2  : 1367
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:17.61
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  

[28/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_8
--
diff --git a/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_8 
b/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_8
deleted file mode 100644
index 6e6eebb..000
--- a/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_8
+++ /dev/null
@@ -1,800 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well44497b
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: /usr/bin/dieharder -a -g 200 -Y 1 -k 2 
-# 
-#=#
-#dieharder version 3.31.1 Copyright 2003 Robert G. Brown  #
-#=#
-   rng_name|rands/second|   Seed   |
-stdin_input_raw|  8.14e+06  |3240771676|
-#=#
-test_name   |ntup| tsamples |psamples|  p-value |Assessment
-#=#
-   diehard_birthdays|   0|   100| 100|0.81680343|  PASSED  
-  diehard_operm5|   0|   100| 100|0.83093104|  PASSED  
-  diehard_rank_32x32|   0| 4| 100|0.69890950|  PASSED  
-diehard_rank_6x8|   0|10| 100|0.73757194|  PASSED  
-   diehard_bitstream|   0|   2097152| 100|0.79560953|  PASSED  
-diehard_opso|   0|   2097152| 100|0.91743161|  PASSED  
-diehard_oqso|   0|   2097152| 100|0.30375937|  PASSED  
- diehard_dna|   0|   2097152| 100|0.48183957|  PASSED  
-diehard_count_1s_str|   0|256000| 100|0.58403744|  PASSED  
-diehard_count_1s_byt|   0|256000| 100|0.13206026|  PASSED  
- diehard_parking_lot|   0| 12000| 100|0.39368629|  PASSED  
-diehard_2dsphere|   2|  8000| 100|0.9474|  PASSED  
-diehard_3dsphere|   3|  4000| 100|0.43358713|  PASSED  
- diehard_squeeze|   0|10| 100|0.41102170|  PASSED  
-diehard_sums|   0|   100| 100|0.11298386|  PASSED  
-diehard_runs|   0|10| 100|0.88159233|  PASSED  
-diehard_runs|   0|10| 100|0.90214433|  PASSED  
-   diehard_craps|   0|20| 100|0.03843281|  PASSED  
-   diehard_craps|   0|20| 100|0.77456635|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.39987405|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.05747832|  PASSED  
- sts_monobit|   1|10| 100|0.99464121|  PASSED  
-sts_runs|   2|10| 100|0.94267702|  PASSED  
-  sts_serial|   1|10| 100|0.20950020|  PASSED  
-  sts_serial|   2|10| 100|0.50407611|  PASSED  
-  sts_serial|   3|10| 100|0.85057752|  PASSED  
-  sts_serial|   3|10| 100|0.65487831|  PASSED  
-  sts_serial|   4|10| 100|0.60209893|  PASSED  
-  sts_serial|   4|10| 100|0.32116768|  PASSED  
-  sts_serial|   5|10| 100|0.17223680|  PASSED  
-  sts_serial|   5|10| 100|0.37939987|  PASSED  
-  sts_serial|   6|10| 100|0.66671747|  PASSED  
-  sts_serial|   6|10| 100|0.04386058|  PASSED  
-  sts_serial|   7|10| 100|0.34604983|  PASSED  
-  sts_serial|   7|10| 100|0.47838019|  PASSED  
-  sts_serial|   8|10| 100|0.83460317|  PASSED  
-  sts_serial|   8|10| 100|0.62981425|  PASSED  
-  sts_serial|   9|10| 100|0.77962063|  PASSED  
-  sts_serial|   9|10| 100|0.99955982|   WEAK   
-  sts_serial|  10|10| 100|0.27605490|  PASSED  
-  sts_serial|  10|10| 100|0.15126031|  PASSED  
-  sts_serial|  11|10| 100|0.47920323|  PASSED  
-  sts_serial|  11|10| 100|0.84941018|  PASSED  
-  sts_serial|  12|10| 100|0.19624503|  PASSED  
-  sts_serial|  12|10| 100|0.41833940|  PASSED  
-  sts_serial|  13|10| 100|0.99389349|  PASSED  
-  sts_serial|  13|10| 100|0.77268057|  PASSED  
-  sts_serial|  14|10| 100|0.12123384|  PASSED  
-  sts_serial|  14|10| 100|0.08863515|  PASSED  
-  sts_serial|  15|10| 100|0.92644666|  PASSED  
-  sts_serial|  15|10| 100|0.27845301|  PASSED  
-  sts_serial|  16|10| 100|0.68209282|  PASSED  
-  sts_serial|  16|10| 100|0.37365079|  PASSED  
-  sts_serial|   1|10| 

[27/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_1
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_1 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_1
deleted file mode 100644
index 6284523..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_1
+++ /dev/null
@@ -1,3882 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.JDKRandom
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.99e+9
-p-value of test   :   eps  *
-
-

-CPU time used:  00:01:59.81
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :  4.2e-3
-
-

-CPU time used:  00:01:39.36
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions :0
-p-value of test   : 1 - eps1*
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795333120
-  j =  1  :6
-  j =  2  :0
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:56.37
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 

[53/57] [abbrv] [math] Add missing '@Override' annotations.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
index f484baa..2292028 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
 
 public class ClassicalRungKuttaFieldStepInterpolatorTest extends 
RungeKuttaFieldStepInterpolatorAbstractTest {
 
+@Override
 protected > 
RungeKuttaFieldStepInterpolator
 createInterpolator(Field field, boolean forward, T[][] yDotK,
FieldODEStateAndDerivative globalPreviousState,
@@ -40,21 +41,25 @@ public class ClassicalRungKuttaFieldStepInterpolatorTest 
extends RungeKuttaField
mapper);
 }
 
+@Override
 protected > FieldButcherArrayProvider
 createButcherArrayProvider(final Field field) {
 return new ClassicalRungeKuttaFieldIntegrator<>(field, field.getOne());
 }
 
+@Override
 @Test
 public void interpolationAtBounds() {
 doInterpolationAtBounds(Decimal64Field.getInstance(), 1.0e-15);
 }
 
+@Override
 @Test
 public void interpolationInside() {
 doInterpolationInside(Decimal64Field.getInstance(), 2.6e-7, 3.6e-6);
 }
 
+@Override
 @Test
 public void nonFieldInterpolatorConsistency() {
 doNonFieldInterpolatorConsistency(Decimal64Field.getInstance(), 
2.8e-17, 1.2e-16, 3.4e-16, 2.1e-17);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
index ebc9962..45e4e4e 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
@@ -24,6 +24,7 @@ import org.apache.commons.math4.util.Decimal64Field;
 
 public class ClassicalRungeKuttaFieldIntegratorTest extends 
RungeKuttaFieldIntegratorAbstractTest {
 
+@Override
 protected > RungeKuttaFieldIntegrator
 createIntegrator(Field field, T step) {
 return new ClassicalRungeKuttaFieldIntegrator<>(field, step);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
index 016576b..8fc5df3 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
@@ -52,11 +52,13 @@ public class ClassicalRungeKuttaIntegratorTest {
   final double[] k  = { 1.0e-4, 1.0e-5, 1.0e-6 };
   FirstOrderDifferentialEquations ode = new 
FirstOrderDifferentialEquations() {
 
-  public int getDimension() {
+  @Override
+public int getDimension() {
   return k.length;
   }
 
-  public void computeDerivatives(double t, double[] y, double[] yDot) {
+  @Override
+public void computeDerivatives(double t, double[] y, double[] yDot) {
   for (int i = 0; i < y.length; ++i) {
   yDot[i] = k[i] * y[i];
   }
@@ -79,17 +81,21 @@ public class ClassicalRungeKuttaIntegratorTest {
 
   integrator.addEventHandler(new EventHandler() {
 
-  public void init(double t0, double[] y0, double t) {
+  @Override
+public void init(double t0, double[] y0, double t) {
   }
 
-  public void resetState(double t, double[] y) {
+  @Override
+public void resetState(double t, double[] y) {
   }
 
-  public double g(double t, double[] y) {
+  @Override
+public double g(double t, double[] y) {
   return t - tEvent;
   }
 
-  public Action eventOccurred(double t, double[] y, boolean 
increasing) {
+  @Override

[38/57] [abbrv] [math] Usage examples.

2016-09-20 Thread chtompki
Usage examples.

Code updated as a consequence of MATH-1383.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/a215c3f9
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/a215c3f9
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/a215c3f9

Branch: refs/heads/master
Commit: a215c3f91a5b4baf56e767a4e91b6511cf1544ac
Parents: 55cc560
Author: Gilles 
Authored: Sun Sep 4 12:39:00 2016 +0200
Committer: Gilles 
Committed: Sun Sep 4 12:39:00 2016 +0200

--
 .../math4/userguide/ClusterAlgorithmComparison.java   |  5 +++--
 .../userguide/LowDiscrepancyGeneratorComparison.java  | 13 +++--
 .../math4/userguide/filter/CannonballExample.java | 14 --
 .../userguide/filter/ConstantVoltageExample.java  | 14 --
 .../commons/math4/userguide/genetics/Polygon.java |  6 --
 .../math4/userguide/geometry/GeometryExample.java |  7 ---
 .../commons/math4/userguide/sofm/ChineseRings.java|  5 +++--
 .../math4/userguide/sofm/ChineseRingsClassifier.java  |  8 +---
 src/userguide/pom.xml |  5 +
 9 files changed, 47 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/a215c3f9/src/userguide/java/org/apache/commons/math4/userguide/ClusterAlgorithmComparison.java
--
diff --git 
a/src/userguide/java/org/apache/commons/math4/userguide/ClusterAlgorithmComparison.java
 
b/src/userguide/java/org/apache/commons/math4/userguide/ClusterAlgorithmComparison.java
index 9dbd1c2..05d86da 100644
--- 
a/src/userguide/java/org/apache/commons/math4/userguide/ClusterAlgorithmComparison.java
+++ 
b/src/userguide/java/org/apache/commons/math4/userguide/ClusterAlgorithmComparison.java
@@ -34,6 +34,9 @@ import java.util.List;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
 
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.RandomSource;
+
 import org.apache.commons.math4.distribution.RealDistribution;
 import org.apache.commons.math4.distribution.UniformRealDistribution;
 import org.apache.commons.math4.distribution.NormalDistribution;
@@ -48,8 +51,6 @@ import 
org.apache.commons.math4.ml.clustering.FuzzyKMeansClusterer;
 import org.apache.commons.math4.ml.clustering.KMeansPlusPlusClusterer;
 import org.apache.commons.math4.random.JDKRandomAdaptor;
 import org.apache.commons.math4.random.SobolSequenceGenerator;
-import org.apache.commons.math4.rng.UniformRandomProvider;
-import org.apache.commons.math4.rng.RandomSource;
 import org.apache.commons.math4.util.FastMath;
 import org.apache.commons.math4.util.Pair;
 import org.apache.commons.math4.userguide.ExampleUtils.ExampleFrame;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/a215c3f9/src/userguide/java/org/apache/commons/math4/userguide/LowDiscrepancyGeneratorComparison.java
--
diff --git 
a/src/userguide/java/org/apache/commons/math4/userguide/LowDiscrepancyGeneratorComparison.java
 
b/src/userguide/java/org/apache/commons/math4/userguide/LowDiscrepancyGeneratorComparison.java
index 39b0b32..f1b81d5 100644
--- 
a/src/userguide/java/org/apache/commons/math4/userguide/LowDiscrepancyGeneratorComparison.java
+++ 
b/src/userguide/java/org/apache/commons/math4/userguide/LowDiscrepancyGeneratorComparison.java
@@ -32,10 +32,11 @@ import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JTextArea;
 
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.RandomSource;
+
 import org.apache.commons.math4.geometry.euclidean.twod.Vector2D;
 import org.apache.commons.math4.random.HaltonSequenceGenerator;
-import org.apache.commons.math4.random.JDKRandomGenerator;
-import org.apache.commons.math4.random.MersenneTwister;
 import org.apache.commons.math4.random.RandomGenerator;
 import org.apache.commons.math4.random.RandomVectorGenerator;
 import org.apache.commons.math4.random.SobolSequenceGenerator;
@@ -130,12 +131,12 @@ public class LowDiscrepancyGeneratorComparison {
 List> generators = new 
ArrayList>();
 
 generators.add(new Pair("Uncorrelated\nUniform(JDK)",
-new UncorrelatedRandomVectorGenerator(2, new 
UniformRandomGenerator(new JDKRandomGenerator();
+   new 
UncorrelatedRandomVectorGenerator(2, new 
UniformRandomGenerator(RandomSource.create(RandomSource.JDK);
 generators.add(new Pair

[25/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_11
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_11 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_11
deleted file mode 100644
index e33d722..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_11
+++ /dev/null
@@ -1,3795 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.SplitMix64
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.42
-
-

-CPU time used:  00:02:33.87
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.65
-
-

-CPU time used:  00:01:54.12
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1402
-p-value of test   :0.16
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334522
-  j =  1  :57196
-  j =  2  : 1402
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:15.50
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[42/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
index 86ed2f9..601a32f 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
FieldODEStateAndDerivative softPreviousState,
FieldODEStateAndDerivative softCurrentState,
FieldEquationsMapper mapper) {
-return new ThreeEighthesFieldStepInterpolator(field, forward, yDotK,
+return new ThreeEighthesFieldStepInterpolator<>(field, forward, yDotK,
  globalPreviousState, 
globalCurrentState,
  softPreviousState, 
softCurrentState,
  mapper);
@@ -42,7 +42,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
 
 protected > FieldButcherArrayProvider
 createButcherArrayProvider(final Field field) {
-return new ThreeEighthesFieldIntegrator(field, field.getOne());
+return new ThreeEighthesFieldIntegrator<>(field, field.getOne());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
index f546745..cda8f2c 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
@@ -40,7 +40,7 @@ public class DummyFieldStepInterpolator>
   final 
FieldODEStateAndDerivative newSoftPreviousState,
   final 
FieldODEStateAndDerivative newSoftCurrentState,
   final 
FieldEquationsMapper newMapper) {
-return new DummyFieldStepInterpolator(newForward,
+return new DummyFieldStepInterpolator<>(newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
  newMapper);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
index 5c592d3..d3d5fca 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
@@ -137,7 +137,7 @@ public class StepInterpolatorTestUtils {
 
 });
 
-integrator.integrate(new FieldExpandableODE(problem), 
problem.getInitialState(), problem.getFinalTime());
+integrator.integrate(new FieldExpandableODE<>(problem), 
problem.getInitialState(), problem.getFinalTime());
 
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
index 1955321..6f6bfbe 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
@@ -255,7 +255,7 @@ public abstract class StepNormalizerOutputTestBase
 double[] y   = {0.0};
 double start = reverse ? getEnd()   : getStart();
 double end   = reverse ? getStart() : getEnd();
-output   = new ArrayList();
+output   = new 

[46/57] [abbrv] [math] Remove redundant type arguments.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
index 29564e6..fc2bc68 100644
--- 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
+++ 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
@@ -42,8 +42,8 @@ public class FieldVector3DTest {
 double sinAlpha = FastMath.sqrt(3) / 2.0;
 double cosDelta = FastMath.sqrt(2) / 2.0;
 double sinDelta = -FastMath.sqrt(2) / 2.0;
-FieldVector3D u = new 
FieldVector3D(2,
-new FieldVector3D(new 
DerivativeStructure(2, 1, 0,  FastMath.PI / 3),
+FieldVector3D u = new FieldVector3D<>(2,
+new FieldVector3D<>(new DerivativeStructure(2, 1, 0,  
FastMath.PI / 3),
 new DerivativeStructure(2, 1, 1, -FastMath.PI / 4)));
 checkVector(u, 2 * cosAlpha * cosDelta, 2 * sinAlpha * cosDelta, 2 * 
sinDelta);
 Assert.assertEquals(-2 * sinAlpha * cosDelta, 
u.getX().getPartialDerivative(1, 0), 1.0e-12);
@@ -53,41 +53,41 @@ public class FieldVector3DTest {
 Assert.assertEquals(-2 * sinAlpha * sinDelta, 
u.getY().getPartialDerivative(0, 1), 1.0e-12);
 Assert.assertEquals(2 * cosDelta, 
u.getZ().getPartialDerivative(0, 1), 1.0e-12);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3)),
+checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3)),
2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4)),
2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 
0);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0)),
2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
0);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3),
+checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3),
-3, createVector(0, 0, -1, 3)),
2, 0, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 0, 3, -1, 0, 0, 1, 0, -1, 0, 0, 0, 0, 
-1, -1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3, -3.0),
new Vector3D(0, 0, -1)),
2, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
-1);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0, 0, 3),
+checkVector(new FieldVector3D<>(2, createVector(1, 0, 0, 3),
5, createVector(0, 1, 0, 3),
-3, createVector(0, 0, -1, 3)),
2, 5, 3, 4, 0, 0, 0, 4, 0, 0, 0, 4);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3,  5.0),
createVector(0, 1,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 5, 3, 4, 0, 0, 1, 0, 4, 0, 1, 0, 0, 4, 
-1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3,  5.0),
new Vector3D(0, 1,  0),
@@ -95,12 +95,12 @@ public class 

[54/57] [abbrv] [math] Add missing '@Override' annotations.

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java 
b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
index 1268b26..2369824 100644
--- a/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
@@ -90,6 +90,7 @@ public class ArrayFieldVectorTest {
 data = d.clone();
 }
 
+@Override
 public Field getField() {
 return field;
 }
@@ -98,10 +99,12 @@ public class ArrayFieldVectorTest {
 return new UnsupportedOperationException("Not supported, unneeded 
for test purposes");
 }
 
+@Override
 public FieldVector copy() {
 throw unsupported();
 }
 
+@Override
 public FieldVector add(FieldVector v) {
 throw unsupported();
 }
@@ -110,6 +113,7 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector subtract(FieldVector v) {
 throw unsupported();
 }
@@ -118,22 +122,27 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapAdd(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapAddToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapSubtract(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapSubtractToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapMultiply(T d) {
 T[] out = buildArray(data.length);
 for (int i = 0; i < data.length; i++) {
@@ -142,26 +151,32 @@ public class ArrayFieldVectorTest {
 return new FieldVectorTestImpl<>(out);
 }
 
+@Override
 public FieldVector mapMultiplyToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapDivide(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapDivideToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapInv() {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapInvToSelf() {
 throw unsupported();
 }
 
+@Override
 public FieldVector ebeMultiply(FieldVector v) {
 throw unsupported();
 }
@@ -170,6 +185,7 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector ebeDivide(FieldVector v) {
 throw unsupported();
 }
@@ -182,6 +198,7 @@ public class ArrayFieldVectorTest {
 return data.clone();
 }
 
+@Override
 public T dotProduct(FieldVector v) {
 T dot = field.getZero();
 for (int i = 0; i < data.length; i++) {
@@ -198,6 +215,7 @@ public class ArrayFieldVectorTest {
 return dot;
 }
 
+@Override
 public FieldVector projection(FieldVector v) {
 throw unsupported();
 }
@@ -206,6 +224,7 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldMatrix outerProduct(FieldVector v) {
 throw unsupported();
 }
@@ -214,18 +233,22 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public T getEntry(int index) {
 return data[index];
 }
 
+@Override
 public int getDimension() {
 return data.length;
 }
 
+@Override
 public FieldVector append(FieldVector v) {
 throw unsupported();
 }
 
+@Override
 public FieldVector append(T d) {
 throw unsupported();
 }
@@ -234,14 +257,17 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector getSubVector(int index, int n) {
 throw unsupported();
 }
 
+@Override
 public void setEntry(int index, T value) {
 throw unsupported();
 }
 
+@Override
 public void setSubVector(int index, FieldVector v) {
 throw unsupported();
 }
@@ -250,10 +276,12 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public void set(T value) {
 throw 

[56/57] [abbrv] [math] Use {} for blocks.

2016-09-20 Thread chtompki
Use {} for blocks.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6348d47c
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6348d47c
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6348d47c

Branch: refs/heads/master
Commit: 6348d47ca3f9a64421d092673b35bc834a071e11
Parents: 221c843
Author: Gary Gregory 
Authored: Tue Sep 20 10:50:24 2016 -0700
Committer: Gary Gregory 
Committed: Tue Sep 20 10:50:24 2016 -0700

--
 .../solvers/BaseSecantSolverAbstractTest.java   |  4 +-
 .../apache/commons/math4/dfp/DfpDecTest.java|  3 +-
 .../apache/commons/math4/dfp/DfpMathTest.java   |  3 +-
 .../org/apache/commons/math4/dfp/DfpTest.java   | 69 +---
 .../IntegerDistributionAbstractTest.java|  3 +-
 .../math4/genetics/BinaryMutationTest.java  |  3 +-
 .../genetics/GeneticAlgorithmTestBinary.java|  3 +-
 .../apache/commons/math4/ode/TestProblem1.java  |  5 +-
 .../apache/commons/math4/ode/TestProblem2.java  |  5 +-
 .../scalar/noderiv/BOBYQAOptimizerTest.java | 57 ++--
 .../scalar/noderiv/CMAESOptimizerTest.java  | 57 ++--
 ...torelessUnivariateStatisticAbstractTest.java |  3 +-
 .../inference/KolmogorovSmirnovTestTest.java|  3 +-
 .../apache/commons/math4/util/FastMathTest.java |  5 +-
 .../math4/util/OpenIntToDoubleHashMapTest.java  | 18 +++--
 .../commons/math4/util/OpenIntToFieldTest.java  | 18 +++--
 16 files changed, 172 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
 
b/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
index 1b6f278..9d16686 100644
--- 
a/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
+++ 
b/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
@@ -105,7 +105,9 @@ public abstract class BaseSecantSolverAbstractTest {
 
 for(int i = 0; i < testsData.length; i++) {
 // Skip test, if needed.
-if (counts[i] == -1) continue;
+if (counts[i] == -1) {
+continue;
+}
 
 // Compute solution.
 double[] testData = testsData[i];

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java 
b/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
index 0d4a963..a454490 100644
--- a/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
+++ b/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
@@ -61,8 +61,9 @@ public class DfpDecTest {
 
 b = (b && x.getField().getIEEEFlags() == flags);
 
-if (!b)
+if (!b) {
 Assert.assertTrue("assersion failed "+desc+" x = "+x.toString()+" 
flags = "+x.getField().getIEEEFlags(), b);
+}
 
 x.getField().clearIEEEFlags();
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java 
b/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
index a2a14ee..b089acd 100644
--- a/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
+++ b/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
@@ -71,8 +71,9 @@ public class DfpMathTest {
 
 b = (b && x.getField().getIEEEFlags() == flags);
 
-if (!b)
+if (!b) {
 Assert.assertTrue("assersion failed "+desc+" x = "+x.toString()+" 
flags = "+x.getField().getIEEEFlags(), b);
+}
 
 x.getField().clearIEEEFlags();
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/dfp/DfpTest.java 
b/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
index c9b375a..eeeae4b 100644
--- a/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
+++ b/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
@@ -375,21 +375,29 @@ public class DfpTest extends 
ExtendedFieldElementAbstractTest {
 // utility function to help test 

[19/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_5
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_5 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_5
deleted file mode 100644
index bfcda63..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_5
+++ /dev/null
@@ -1,3804 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well19937a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :  6.2e-3
-
-

-CPU time used:  00:02:12.09
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.28
-
-

-CPU time used:  00:01:44.62
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1380
-p-value of test   :0.34
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334500
-  j =  1  :57240
-  j =  2  : 1380
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:13.69
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  

[18/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_6
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_6 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_6
deleted file mode 100644
index f8e08a3..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_6
+++ /dev/null
@@ -1,3804 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well19937c
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.16
-
-

-CPU time used:  00:02:17.49
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :  1.9e-3
-
-

-CPU time used:  00:01:42.55
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1351
-p-value of test   :0.63
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334471
-  j =  1  :57298
-  j =  2  : 1351
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:04:22.88
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  

[36/57] [abbrv] [math] Travis CI for "develop" branch.

2016-09-20 Thread chtompki
Travis CI for "develop" branch.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/647b2ef3
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/647b2ef3
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/647b2ef3

Branch: refs/heads/master
Commit: 647b2ef3f0a535051feeb611887e916986919d47
Parents: d52a020
Author: Gilles 
Authored: Sun Aug 28 00:12:37 2016 +0200
Committer: Gilles 
Committed: Sun Aug 28 00:12:37 2016 +0200

--
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/647b2ef3/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 3177040..fbfdd15 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ jdk:
 # only build master and the MATH_3_X branch
 branches:
   only:
+- develop
 - master
 - MATH_3_X
 



[29/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_5
--
diff --git a/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_5 
b/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_5
deleted file mode 100644
index 1d8f0fa..000
--- a/src/site/resources/txt/userguide/rng/stress/dh/run_2/dh_5
+++ /dev/null
@@ -1,143 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well19937a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: /usr/bin/dieharder -a -g 200 -Y 1 -k 2 
-# 
-#=#
-#dieharder version 3.31.1 Copyright 2003 Robert G. Brown  #
-#=#
-   rng_name|rands/second|   Seed   |
-stdin_input_raw|  8.11e+06  |1324685015|
-#=#
-test_name   |ntup| tsamples |psamples|  p-value |Assessment
-#=#
-   diehard_birthdays|   0|   100| 100|0.97873706|  PASSED  
-  diehard_operm5|   0|   100| 100|0.31625234|  PASSED  
-  diehard_rank_32x32|   0| 4| 100|0.81874010|  PASSED  
-diehard_rank_6x8|   0|10| 100|0.38511330|  PASSED  
-   diehard_bitstream|   0|   2097152| 100|0.72448209|  PASSED  
-diehard_opso|   0|   2097152| 100|0.21526395|  PASSED  
-diehard_oqso|   0|   2097152| 100|0.14809241|  PASSED  
- diehard_dna|   0|   2097152| 100|0.13975350|  PASSED  
-diehard_count_1s_str|   0|256000| 100|0.27264345|  PASSED  
-diehard_count_1s_byt|   0|256000| 100|0.23899278|  PASSED  
- diehard_parking_lot|   0| 12000| 100|0.59288414|  PASSED  
-diehard_2dsphere|   2|  8000| 100|0.44640415|  PASSED  
-diehard_3dsphere|   3|  4000| 100|0.89918701|  PASSED  
- diehard_squeeze|   0|10| 100|0.85012417|  PASSED  
-diehard_sums|   0|   100| 100|0.07862421|  PASSED  
-diehard_runs|   0|10| 100|0.22539800|  PASSED  
-diehard_runs|   0|10| 100|0.25024342|  PASSED  
-   diehard_craps|   0|20| 100|0.66918238|  PASSED  
-   diehard_craps|   0|20| 100|0.74263938|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.76388825|  PASSED  
- marsaglia_tsang_gcd|   0|  1000| 100|0.12763949|  PASSED  
- sts_monobit|   1|10| 100|0.90379684|  PASSED  
-sts_runs|   2|10| 100|0.96725937|  PASSED  
-  sts_serial|   1|10| 100|0.89179612|  PASSED  
-  sts_serial|   2|10| 100|0.72323704|  PASSED  
-  sts_serial|   3|10| 100|0.52010951|  PASSED  
-  sts_serial|   3|10| 100|0.22447689|  PASSED  
-  sts_serial|   4|10| 100|0.31207188|  PASSED  
-  sts_serial|   4|10| 100|0.00723587|  PASSED  
-  sts_serial|   5|10| 100|0.97048978|  PASSED  
-  sts_serial|   5|10| 100|0.81338656|  PASSED  
-  sts_serial|   6|10| 100|0.13820363|  PASSED  
-  sts_serial|   6|10| 100|0.01043639|  PASSED  
-  sts_serial|   7|10| 100|0.03953577|  PASSED  
-  sts_serial|   7|10| 100|0.02379927|  PASSED  
-  sts_serial|   8|10| 100|0.47458458|  PASSED  
-  sts_serial|   8|10| 100|0.46015889|  PASSED  
-  sts_serial|   9|10| 100|0.81464024|  PASSED  
-  sts_serial|   9|10| 100|0.66406361|  PASSED  
-  sts_serial|  10|10| 100|0.53261452|  PASSED  
-  sts_serial|  10|10| 100|0.88051566|  PASSED  
-  sts_serial|  11|10| 100|0.56643984|  PASSED  
-  sts_serial|  11|10| 100|0.11383998|  PASSED  
-  sts_serial|  12|10| 100|0.29462130|  PASSED  
-  sts_serial|  12|10| 100|0.02722840|  PASSED  
-  sts_serial|  13|10| 100|0.55119783|  PASSED  
-  sts_serial|  13|10| 100|0.72716120|  PASSED  
-  sts_serial|  14|10| 100|0.53381465|  PASSED  
-  sts_serial|  14|10| 100|0.31932292|  PASSED  
-  sts_serial|  15|10| 100|0.68645828|  PASSED  
-  sts_serial|  15|10| 100|0.94979473|  PASSED  
-  sts_serial|  16|10| 100|0.13657316|  PASSED  
-  sts_serial|  16|10| 100|0.26675130|  PASSED  
- rgb_bitdist|   1|10| 

[02/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_9
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_9 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_9
deleted file mode 100644
index 3321902..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_9
+++ /dev/null
@@ -1,3795 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.ISAACRandom
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.34
-
-

-CPU time used:  00:02:14.28
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.93
-
-

-CPU time used:  00:02:14.31
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1352
-p-value of test   :0.62
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334472
-  j =  1  :57296
-  j =  2  : 1352
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:41.87
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[12/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_11
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_11 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_11
deleted file mode 100644
index 737267e..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_11
+++ /dev/null
@@ -1,3795 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.SplitMix64
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.72
-
-

-CPU time used:  00:02:30.11
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.66
-
-

-CPU time used:  00:02:33.92
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1348
-p-value of test   :0.66
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334468
-  j =  1  :57304
-  j =  2  : 1348
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:24.83
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[11/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_12
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_12 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_12
deleted file mode 100644
index 21fd51a..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_12
+++ /dev/null
@@ -1,3795 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.XorShift1024Star
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.86
-
-

-CPU time used:  00:02:23.40
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.44
-
-

-CPU time used:  00:02:19.68
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1412
-p-value of test   :0.10
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334532
-  j =  1  :57176
-  j =  2  : 1412
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:06:11.65
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[08/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_3
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_3 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_3
deleted file mode 100644
index 8ca22c4..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_3
+++ /dev/null
@@ -1,3808 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well512a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.34
-
-

-CPU time used:  00:02:10.91
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.59
-
-

-CPU time used:  00:02:17.60
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1277
-p-value of test   :0.9911
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334397
-  j =  1  :57446
-  j =  2  : 1277
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:16.17
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000, 

[07/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_4
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_4 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_4
deleted file mode 100644
index 7db11e7..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_4
+++ /dev/null
@@ -1,3805 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well1024a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.08
-
-

-CPU time used:  00:02:53.13
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.71
-
-

-CPU time used:  00:02:37.81
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1332
-p-value of test   :0.80
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334452
-  j =  1  :57336
-  j =  2  : 1332
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:29.16
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  

[09/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_2
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_2 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_2
deleted file mode 100644
index 11cdb90..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_2
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.MersenneTwister
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.67
-
-

-CPU time used:  00:03:01.40
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.16
-
-

-CPU time used:  00:02:51.94
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1369
-p-value of test   :0.45
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334489
-  j =  1  :57262
-  j =  2  : 1369
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:01.53
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 

[15/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_9
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_9 
b/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_9
deleted file mode 100644
index c937529..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_1/tu_9
+++ /dev/null
@@ -1,3802 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.ISAACRandom
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ./stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.73
-
-

-CPU time used:  00:01:47.81
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.68
-
-

-CPU time used:  00:01:55.15
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1372
-p-value of test   :0.42
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334492
-  j =  1  :57256
-  j =  2  : 1372
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:03:53.12
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000, 

[10/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_13
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_13 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_13
deleted file mode 100644
index 5f00b96..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_13
+++ /dev/null
@@ -1,3795 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.TwoCmres (Cmres: 
[0xedce446814d3b3d9L, 33, 330658535] + Cmres: [0xc5b3cf786c806df7L, 33, 
331932042])
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.84
-
-

-CPU time used:  00:03:06.34
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.89
-
-

-CPU time used:  00:02:55.87
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1370
-p-value of test   :0.44
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334490
-  j =  1  :57260
-  j =  2  : 1370
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:36.64
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-

[06/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_5
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_5 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_5
deleted file mode 100644
index c20bdfb..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_5
+++ /dev/null
@@ -1,3804 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well19937a
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.70
-
-

-CPU time used:  00:02:32.37
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.59
-
-

-CPU time used:  00:02:21.55
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1353
-p-value of test   :0.61
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334473
-  j =  1  :57294
-  j =  2  : 1353
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:17.01
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000, 

[05/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_6
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_6 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_6
deleted file mode 100644
index 878eb4a..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_6
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well19937c
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.21
-
-

-CPU time used:  00:02:13.78
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.84
-
-

-CPU time used:  00:03:11.81
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1378
-p-value of test   :0.36
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334498
-  j =  1  :57244
-  j =  2  : 1378
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:24.11
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000, 

[13/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_10
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_10 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_10
deleted file mode 100644
index 19d9917..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_10
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source64.MersenneTwister64
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.38
-
-

-CPU time used:  00:02:14.16
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.71
-
-

-CPU time used:  00:02:19.00
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1386
-p-value of test   :0.28
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334506
-  j =  1  :57228
-  j =  2  : 1386
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:00.67
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n 

[01/57] [abbrv] [math] MATH-1383 [Forced Update!]

2016-09-20 Thread chtompki
Repository: commons-math
Updated Branches:
  refs/heads/master 6df150da2 -> 6ddd71b06 (forced update)


http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/xdoc/userguide/index.xml
--
diff --git a/src/site/xdoc/userguide/index.xml 
b/src/site/xdoc/userguide/index.xml
index d874581..81bdd22 100644
--- a/src/site/xdoc/userguide/index.xml
+++ b/src/site/xdoc/userguide/index.xml
@@ -183,13 +183,6 @@
 19.4 Features
   
 
-20. Random Number Generators
-  
-   20.1 Overview
-   20.2 Performance
-   20.3 Quality
-  
-
 
   
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/userguide/README
--
diff --git a/src/userguide/README b/src/userguide/README
index 7ee72a0..f81bc0f 100644
--- a/src/userguide/README
+++ b/src/userguide/README
@@ -10,12 +10,12 @@ to the following:
 
 Alternatively, a "standalone" JAR can be created with the following
 command:
- $ mvn -Dmainclass=org.apache.commons.math4.userguide.rng.RandomStressTester \
-   -Djarbasename=RandomStressTester \
+ $ mvn 
-Dmainclass=org.apache.commons.math4.userguide.rng.ChineseRingsClassifier \
+   -Djarbasename=ChineseRingsClassifier \
clean compile assembly:single
 where the value of the "mainclass" argument is the fully-qualified name
 of the class whose "main" method will be the program's entry point, and
 the "jarbasename" argument is the basename of the JAR file to be created.
 Then, the application can be run with the following command:
- $ java -jar RandomStressTester [args]
+ $ java -jar ChineseRingsClassifier [args]
 where "[args]" is the list of arguments passed to the "main" method.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/userguide/c/rng/stdin2testu01.c
--
diff --git a/src/userguide/c/rng/stdin2testu01.c 
b/src/userguide/c/rng/stdin2testu01.c
deleted file mode 100644
index d1a4a6a..000
--- a/src/userguide/c/rng/stdin2testu01.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Utility for simple interfacing with the "TestU01" library:
- *  http://simul.iro.umontreal.ca/testu01/tu01.html
- *
- * It reads from its standard input an infinite sequence of 32-bits
- * integers and runs one of the test suites "SmallCrush", "Crush" or
- * "BigCrush".
- * "TestU01" writes its report to standard output.
- */
-
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-
-#define TU_S "SmallCrush"
-#define TU_C "Crush"
-#define TU_B "BigCrush"
-#define BUFFER_LENGTH 256
-
-typedef struct {
-  unsigned long buffer[BUFFER_LENGTH];
-  uint32_t index;
-} StdinReader_state;
-
-unsigned long nextInt(void *par,
-  void *sta) {
-  StdinReader_state *state = (StdinReader_state *) sta;
-  if (state->index >= BUFFER_LENGTH) {
-/* Refill. */
-fread(state->buffer, sizeof(unsigned long), BUFFER_LENGTH, stdin);
-state->index = 0;
-  }
-
-  uint32_t random = state->buffer[state->index];
-  ++state->index; /* Next request. */
-
-  return random;
-}
-
-double nextDouble(void *par,
-  void *sta) {
-  return nextInt(par, sta) / 4294967296.0;
-}
-
-
-static void dummy(void *sta) {
-  printf("N/A");
-
-  return;
-}
-
-unif01_Gen *createStdinReader(void) {
-   unif01_Gen *gen;
-   StdinReader_state *state;
-   size_t len;
-   char name[60];
-
-   state = util_Malloc(sizeof(StdinReader_state));
-
-   gen = util_Malloc(sizeof(unif01_Gen));
-   gen->state = state;
-   gen->param = NULL;
-   gen->Write = dummy;
-   gen->GetU01 = nextDouble;
-   gen->GetBits = nextInt;
-
-   strcpy(name, "stdin");
-   len = strlen(name);
-   gen->name = util_Calloc(len + 1, sizeof (char));
-   strncpy(gen->name, name, len);
-
-   // Read binary input.
-   freopen(NULL, "rb", stdin);
-   state->index = BUFFER_LENGTH;
-
-   return gen;
-}
-
-void deleteStdinReader(unif01_Gen *gen) {
-   gen->state = util_Free(gen->state);
-   gen->name = util_Free(gen->name);
-  

[03/57] [abbrv] [math] MATH-1383

2016-09-20 Thread chtompki
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d14573fe/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_8
--
diff --git a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_8 
b/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_8
deleted file mode 100644
index 6b3e084..000
--- a/src/site/resources/txt/userguide/rng/stress/tu/run_2/tu_8
+++ /dev/null
@@ -1,3803 +0,0 @@
-# 
-# RNG: org.apache.commons.math4.rng.internal.source32.Well44497b
-# 
-# Java: 1.8.0_66
-# Runtime: 1.8.0_66-b17
-# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17
-# OS: Linux 3.16.0-4-amd64 amd64
-# 
-# Analyzer: ../stdin2testu01 BigCrush 
-# 
-xxx
- Starting BigCrush
- Version: TestU01 1.2.3
-xxx
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r =  0,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.92
-
-

-CPU time used:  00:02:14.61
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_SerialOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N =  1,  n = 10,  r = 22,   d =  256,   t =  3,
-   Sparse =  FALSE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =   16777216
-   Expected number per cell =   59.604645
-   Hashing =  FALSE
-
-   For Delta > -1, we use the ChiSquare approximation
-   Correction factor of the ChiSquare: 
-   Delta = 1,Mu =   0.0083558402,Sigma =  1
-

-Test Results for Delta =   1.
-
-Number of degrees of freedom  : 16711680
-Value of the statistic: 1.67e+7
-p-value of test   :0.80
-
-

-CPU time used:  00:02:23.50
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000,  r =  0,   d = 2097152,   t =  2,
-   Sparse =   TRUE
-
-   GenerCell = smultin_GenerCellSerial
-   Number of cells = d^t =  4398046511104
-   Expected number per cell =  1 /  219902.33
-   EColl = n^2 / (2k) =  45.47473509
-   Hashing =   TRUE
-
-   Collision test
-
-   CollisionOver:   density = n / k =  1 /  219902.33
-   Expected number of collisions = Mu =  45.47
-
-

-Results of CollisionOver test:
-
-POISSON approximation :
-Expected number of collisions = N*Mu  : 1364.24
-Observed number of collisions : 1372
-p-value of test   :0.42
-
--
-Total number of cells containing j balls
-
-  j =  0  :  131940795334492
-  j =  1  :57256
-  j =  2  : 1372
-  j =  3  :0
-  j =  4  :0
-  j =  5  :0
-

-CPU time used:  00:05:34.52
-
-Generator state:
-N/A
-
-
-
-***
-Test smarsa_CollisionOver calling smultin_MultinomialOver
-
-***
-HOST = gaianss, Linux
-
-stdin
-
-
-smultin_MultinomialOver test:

-   N = 30,  n = 2000, 

[commons-math] Git Push Summary

2016-09-20 Thread chtompki
Repository: commons-math
Updated Branches:
  refs/heads/master-old [created] 6df150da2


[math] Use {} for blocks.

2016-09-20 Thread ggregory
Repository: commons-math
Updated Branches:
  refs/heads/develop 221c843b8 -> 6348d47ca


Use {} for blocks.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6348d47c
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6348d47c
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6348d47c

Branch: refs/heads/develop
Commit: 6348d47ca3f9a64421d092673b35bc834a071e11
Parents: 221c843
Author: Gary Gregory 
Authored: Tue Sep 20 10:50:24 2016 -0700
Committer: Gary Gregory 
Committed: Tue Sep 20 10:50:24 2016 -0700

--
 .../solvers/BaseSecantSolverAbstractTest.java   |  4 +-
 .../apache/commons/math4/dfp/DfpDecTest.java|  3 +-
 .../apache/commons/math4/dfp/DfpMathTest.java   |  3 +-
 .../org/apache/commons/math4/dfp/DfpTest.java   | 69 +---
 .../IntegerDistributionAbstractTest.java|  3 +-
 .../math4/genetics/BinaryMutationTest.java  |  3 +-
 .../genetics/GeneticAlgorithmTestBinary.java|  3 +-
 .../apache/commons/math4/ode/TestProblem1.java  |  5 +-
 .../apache/commons/math4/ode/TestProblem2.java  |  5 +-
 .../scalar/noderiv/BOBYQAOptimizerTest.java | 57 ++--
 .../scalar/noderiv/CMAESOptimizerTest.java  | 57 ++--
 ...torelessUnivariateStatisticAbstractTest.java |  3 +-
 .../inference/KolmogorovSmirnovTestTest.java|  3 +-
 .../apache/commons/math4/util/FastMathTest.java |  5 +-
 .../math4/util/OpenIntToDoubleHashMapTest.java  | 18 +++--
 .../commons/math4/util/OpenIntToFieldTest.java  | 18 +++--
 16 files changed, 172 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
 
b/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
index 1b6f278..9d16686 100644
--- 
a/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
+++ 
b/src/test/java/org/apache/commons/math4/analysis/solvers/BaseSecantSolverAbstractTest.java
@@ -105,7 +105,9 @@ public abstract class BaseSecantSolverAbstractTest {
 
 for(int i = 0; i < testsData.length; i++) {
 // Skip test, if needed.
-if (counts[i] == -1) continue;
+if (counts[i] == -1) {
+continue;
+}
 
 // Compute solution.
 double[] testData = testsData[i];

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java 
b/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
index 0d4a963..a454490 100644
--- a/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
+++ b/src/test/java/org/apache/commons/math4/dfp/DfpDecTest.java
@@ -61,8 +61,9 @@ public class DfpDecTest {
 
 b = (b && x.getField().getIEEEFlags() == flags);
 
-if (!b)
+if (!b) {
 Assert.assertTrue("assersion failed "+desc+" x = "+x.toString()+" 
flags = "+x.getField().getIEEEFlags(), b);
+}
 
 x.getField().clearIEEEFlags();
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java 
b/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
index a2a14ee..b089acd 100644
--- a/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
+++ b/src/test/java/org/apache/commons/math4/dfp/DfpMathTest.java
@@ -71,8 +71,9 @@ public class DfpMathTest {
 
 b = (b && x.getField().getIEEEFlags() == flags);
 
-if (!b)
+if (!b) {
 Assert.assertTrue("assersion failed "+desc+" x = "+x.toString()+" 
flags = "+x.getField().getIEEEFlags(), b);
+}
 
 x.getField().clearIEEEFlags();
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6348d47c/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/dfp/DfpTest.java 
b/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
index c9b375a..eeeae4b 100644
--- a/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
+++ b/src/test/java/org/apache/commons/math4/dfp/DfpTest.java
@@ -375,21 +375,29 @@ public class 

[05/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
index 29564e6..fc2bc68 100644
--- 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
+++ 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
@@ -42,8 +42,8 @@ public class FieldVector3DTest {
 double sinAlpha = FastMath.sqrt(3) / 2.0;
 double cosDelta = FastMath.sqrt(2) / 2.0;
 double sinDelta = -FastMath.sqrt(2) / 2.0;
-FieldVector3D u = new 
FieldVector3D(2,
-new FieldVector3D(new 
DerivativeStructure(2, 1, 0,  FastMath.PI / 3),
+FieldVector3D u = new FieldVector3D<>(2,
+new FieldVector3D<>(new DerivativeStructure(2, 1, 0,  
FastMath.PI / 3),
 new DerivativeStructure(2, 1, 1, -FastMath.PI / 4)));
 checkVector(u, 2 * cosAlpha * cosDelta, 2 * sinAlpha * cosDelta, 2 * 
sinDelta);
 Assert.assertEquals(-2 * sinAlpha * cosDelta, 
u.getX().getPartialDerivative(1, 0), 1.0e-12);
@@ -53,41 +53,41 @@ public class FieldVector3DTest {
 Assert.assertEquals(-2 * sinAlpha * sinDelta, 
u.getY().getPartialDerivative(0, 1), 1.0e-12);
 Assert.assertEquals(2 * cosDelta, 
u.getZ().getPartialDerivative(0, 1), 1.0e-12);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3)),
+checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3)),
2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4)),
2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 
0);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0)),
2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
0);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3),
+checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3),
-3, createVector(0, 0, -1, 3)),
2, 0, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 0, 3, -1, 0, 0, 1, 0, -1, 0, 0, 0, 0, 
-1, -1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3, -3.0),
new Vector3D(0, 0, -1)),
2, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
-1);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0, 0, 3),
+checkVector(new FieldVector3D<>(2, createVector(1, 0, 0, 3),
5, createVector(0, 1, 0, 3),
-3, createVector(0, 0, -1, 3)),
2, 5, 3, 4, 0, 0, 0, 4, 0, 0, 0, 4);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3,  5.0),
createVector(0, 1,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 5, 3, 4, 0, 0, 1, 0, 4, 0, 1, 0, 0, 4, 
-1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3,  5.0),
new Vector3D(0, 1,  0),
@@ -95,12 +95,12 @@ public class 

[Math] Change on branch "master": Commons Math MasterBranch - Build # 11 - Successful

2016-09-20 Thread Apache Jenkins Server
The Apache Jenkins build system has built Commons Math MasterBranch (build #11)

Status: Successful

Check console output at 
https://builds.apache.org/job/Commons%20Math%20MasterBranch/11/ to view the 
results.

[4/4] [math] Add missing '@Override' annotations.

2016-09-20 Thread ggregory
Add missing '@Override' annotations.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/221c843b
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/221c843b
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/221c843b

Branch: refs/heads/develop
Commit: 221c843b8437e1c87a98a9a015b03b050dd08561
Parents: 762eb53
Author: Gary Gregory 
Authored: Tue Sep 20 10:38:11 2016 -0700
Committer: Gary Gregory 
Committed: Tue Sep 20 10:38:11 2016 -0700

--
 .../FieldBracketingNthOrderBrentSolver.java |  7 +++
 .../math4/ode/ContinuousOutputFieldModel.java   |  1 +
 .../math4/ode/ContinuousOutputModel.java|  3 +-
 .../commons/math4/ode/FirstOrderConverter.java  |  6 +-
 .../nonstiff/AdamsFieldStepInterpolator.java|  1 +
 .../nonstiff/AdamsMoultonFieldIntegrator.java   |  1 +
 .../ode/nonstiff/AdamsMoultonIntegrator.java|  1 +
 .../ode/sampling/AbstractStepInterpolator.java  |  6 +-
 .../math4/ode/sampling/DummyStepHandler.java|  1 +
 .../math4/ode/sampling/FieldStepNormalizer.java |  1 +
 .../math4/ode/sampling/StepNormalizer.java  |  1 +
 .../org/apache/commons/math4/PerfTestUtils.java |  1 +
 .../integration/gauss/BaseRuleFactoryTest.java  |  1 +
 .../analysis/integration/gauss/HermiteTest.java |  3 +
 .../BracketingNthOrderBrentSolverTest.java  |  3 +
 .../math4/analysis/solvers/BrentSolverTest.java |  1 +
 .../FieldBracketingNthOrderBrentSolverTest.java |  7 +++
 .../analysis/solvers/RegulaFalsiSolverTest.java |  1 +
 .../solvers/UnivariateSolverUtilsTest.java  |  2 +
 .../AbstractIntegerDistributionTest.java|  7 +++
 .../AbstractRealDistributionTest.java   |  2 +
 .../RealDistributionAbstractTest.java   |  1 +
 ...stractLeastSquaresOptimizerAbstractTest.java |  4 ++
 .../fitting/leastsquares/CircleProblem.java |  2 +
 .../fitting/leastsquares/CircleVectorial.java   |  2 +
 .../leastsquares/EvaluationRmsCheckerTest.java  |  9 +++
 .../fitting/leastsquares/EvaluationTest.java|  9 +++
 .../LevenbergMarquardtOptimizerTest.java|  4 ++
 .../math4/fitting/leastsquares/MinpackTest.java |  2 +
 .../StatisticalReferenceDataset.java|  2 +
 .../leastsquares/StraightLineProblem.java   |  3 +
 .../commons/math4/genetics/ChromosomeTest.java  |  9 +++
 .../math4/genetics/CycleCrossoverTest.java  |  2 +
 .../math4/genetics/DummyBinaryChromosome.java   |  1 +
 .../math4/genetics/DummyListChromosome.java |  1 +
 .../commons/math4/genetics/DummyRandomKey.java  |  1 +
 .../genetics/ElitisticListPopulationTest.java   |  1 +
 .../math4/genetics/FixedElapsedTimeTest.java|  6 ++
 .../genetics/FixedGenerationCountTest.java  |  6 ++
 .../genetics/GeneticAlgorithmTestBinary.java|  1 +
 .../GeneticAlgorithmTestPermutations.java   |  1 +
 .../math4/genetics/ListPopulationTest.java  | 13 
 .../math4/genetics/NPointCrossoverTest.java |  2 +
 .../math4/genetics/OrderedCrossoverTest.java|  2 +
 .../math4/genetics/TournamentSelectionTest.java |  1 +
 .../math4/genetics/UniformCrossoverTest.java|  2 +
 .../euclidean/threed/PolyhedronsSetTest.java|  3 +
 .../euclidean/twod/PolygonsSetTest.java |  3 +
 .../math4/linear/ArrayFieldVectorTest.java  | 64 
 .../math4/linear/ConjugateGradientTest.java | 20 ++
 .../math4/linear/SparseFieldVectorTest.java | 36 +++
 .../apache/commons/math4/linear/SymmLQTest.java | 12 
 .../ml/neuralnet/OffsetFeatureInitializer.java  |  1 +
 .../sofm/TravellingSalesmanSolver.java  |  5 ++
 .../ode/ContinuousOutputFieldModelTest.java |  6 ++
 .../math4/ode/FieldExpandableODETest.java   |  5 ++
 .../math4/ode/FirstOrderConverterTest.java  |  6 +-
 .../commons/math4/ode/JacobianMatricesTest.java | 16 +
 .../commons/math4/ode/TestFieldProblem4.java|  8 +++
 .../math4/ode/TestFieldProblemAbstract.java |  3 +
 .../math4/ode/TestFieldProblemHandler.java  |  2 +
 .../apache/commons/math4/ode/TestProblem4.java  |  8 +++
 .../commons/math4/ode/TestProblemAbstract.java  |  6 +-
 .../commons/math4/ode/TestProblemHandler.java   |  6 +-
 .../math4/ode/events/CloseEventsTest.java   |  6 ++
 .../math4/ode/events/EventFilterTest.java   |  6 ++
 .../math4/ode/events/EventStateTest.java| 22 +++
 .../math4/ode/events/OverlappingEventsTest.java |  6 ++
 .../math4/ode/events/ReappearingEventTest.java  |  6 ++
 ...ctEmbeddedRungeKuttaFieldIntegratorTest.java | 24 ++--
 .../AbstractRungeKuttaFieldIntegratorTest.java  | 20 ++
 .../AdamsBashforthFieldIntegratorTest.java  |  8 +++
 .../nonstiff/AdamsBashforthIntegratorTest.java  | 13 
 .../AdamsFieldIntegratorAbstractTest.java   |  5 ++
 .../AdamsMoultonFieldIntegratorTest.java|  8 +++
 

[3/4] [math] Add missing '@Override' annotations.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java 
b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
index 1268b26..2369824 100644
--- a/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
@@ -90,6 +90,7 @@ public class ArrayFieldVectorTest {
 data = d.clone();
 }
 
+@Override
 public Field getField() {
 return field;
 }
@@ -98,10 +99,12 @@ public class ArrayFieldVectorTest {
 return new UnsupportedOperationException("Not supported, unneeded 
for test purposes");
 }
 
+@Override
 public FieldVector copy() {
 throw unsupported();
 }
 
+@Override
 public FieldVector add(FieldVector v) {
 throw unsupported();
 }
@@ -110,6 +113,7 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector subtract(FieldVector v) {
 throw unsupported();
 }
@@ -118,22 +122,27 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapAdd(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapAddToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapSubtract(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapSubtractToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapMultiply(T d) {
 T[] out = buildArray(data.length);
 for (int i = 0; i < data.length; i++) {
@@ -142,26 +151,32 @@ public class ArrayFieldVectorTest {
 return new FieldVectorTestImpl<>(out);
 }
 
+@Override
 public FieldVector mapMultiplyToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapDivide(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapDivideToSelf(T d) {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapInv() {
 throw unsupported();
 }
 
+@Override
 public FieldVector mapInvToSelf() {
 throw unsupported();
 }
 
+@Override
 public FieldVector ebeMultiply(FieldVector v) {
 throw unsupported();
 }
@@ -170,6 +185,7 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector ebeDivide(FieldVector v) {
 throw unsupported();
 }
@@ -182,6 +198,7 @@ public class ArrayFieldVectorTest {
 return data.clone();
 }
 
+@Override
 public T dotProduct(FieldVector v) {
 T dot = field.getZero();
 for (int i = 0; i < data.length; i++) {
@@ -198,6 +215,7 @@ public class ArrayFieldVectorTest {
 return dot;
 }
 
+@Override
 public FieldVector projection(FieldVector v) {
 throw unsupported();
 }
@@ -206,6 +224,7 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldMatrix outerProduct(FieldVector v) {
 throw unsupported();
 }
@@ -214,18 +233,22 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public T getEntry(int index) {
 return data[index];
 }
 
+@Override
 public int getDimension() {
 return data.length;
 }
 
+@Override
 public FieldVector append(FieldVector v) {
 throw unsupported();
 }
 
+@Override
 public FieldVector append(T d) {
 throw unsupported();
 }
@@ -234,14 +257,17 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public FieldVector getSubVector(int index, int n) {
 throw unsupported();
 }
 
+@Override
 public void setEntry(int index, T value) {
 throw unsupported();
 }
 
+@Override
 public void setSubVector(int index, FieldVector v) {
 throw unsupported();
 }
@@ -250,10 +276,12 @@ public class ArrayFieldVectorTest {
 throw unsupported();
 }
 
+@Override
 public void set(T value) {
 throw 

[2/4] [math] Add missing '@Override' annotations.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
index f484baa..2292028 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungKuttaFieldStepInterpolatorTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
 
 public class ClassicalRungKuttaFieldStepInterpolatorTest extends 
RungeKuttaFieldStepInterpolatorAbstractTest {
 
+@Override
 protected > 
RungeKuttaFieldStepInterpolator
 createInterpolator(Field field, boolean forward, T[][] yDotK,
FieldODEStateAndDerivative globalPreviousState,
@@ -40,21 +41,25 @@ public class ClassicalRungKuttaFieldStepInterpolatorTest 
extends RungeKuttaField
mapper);
 }
 
+@Override
 protected > FieldButcherArrayProvider
 createButcherArrayProvider(final Field field) {
 return new ClassicalRungeKuttaFieldIntegrator<>(field, field.getOne());
 }
 
+@Override
 @Test
 public void interpolationAtBounds() {
 doInterpolationAtBounds(Decimal64Field.getInstance(), 1.0e-15);
 }
 
+@Override
 @Test
 public void interpolationInside() {
 doInterpolationInside(Decimal64Field.getInstance(), 2.6e-7, 3.6e-6);
 }
 
+@Override
 @Test
 public void nonFieldInterpolatorConsistency() {
 doNonFieldInterpolatorConsistency(Decimal64Field.getInstance(), 
2.8e-17, 1.2e-16, 3.4e-16, 2.1e-17);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
index ebc9962..45e4e4e 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaFieldIntegratorTest.java
@@ -24,6 +24,7 @@ import org.apache.commons.math4.util.Decimal64Field;
 
 public class ClassicalRungeKuttaFieldIntegratorTest extends 
RungeKuttaFieldIntegratorAbstractTest {
 
+@Override
 protected > RungeKuttaFieldIntegrator
 createIntegrator(Field field, T step) {
 return new ClassicalRungeKuttaFieldIntegrator<>(field, step);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
index 016576b..8fc5df3 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
@@ -52,11 +52,13 @@ public class ClassicalRungeKuttaIntegratorTest {
   final double[] k  = { 1.0e-4, 1.0e-5, 1.0e-6 };
   FirstOrderDifferentialEquations ode = new 
FirstOrderDifferentialEquations() {
 
-  public int getDimension() {
+  @Override
+public int getDimension() {
   return k.length;
   }
 
-  public void computeDerivatives(double t, double[] y, double[] yDot) {
+  @Override
+public void computeDerivatives(double t, double[] y, double[] yDot) {
   for (int i = 0; i < y.length; ++i) {
   yDot[i] = k[i] * y[i];
   }
@@ -79,17 +81,21 @@ public class ClassicalRungeKuttaIntegratorTest {
 
   integrator.addEventHandler(new EventHandler() {
 
-  public void init(double t0, double[] y0, double t) {
+  @Override
+public void init(double t0, double[] y0, double t) {
   }
 
-  public void resetState(double t, double[] y) {
+  @Override
+public void resetState(double t, double[] y) {
   }
 
-  public double g(double t, double[] y) {
+  @Override
+public double g(double t, double[] y) {
   return t - tEvent;
   }
 
-  public Action eventOccurred(double t, double[] y, boolean 
increasing) {
+  @Override

[1/4] [math] Add missing '@Override' annotations.

2016-09-20 Thread ggregory
Repository: commons-math
Updated Branches:
  refs/heads/develop 762eb53f5 -> 221c843b8


http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
index 1298778..12b2897 100644
--- 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
+++ 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/gradient/NonLinearConjugateGradientOptimizerTest.java
@@ -221,6 +221,7 @@ public class NonLinearConjugateGradientOptimizerTest {
 
 final Preconditioner preconditioner
 = new Preconditioner() {
+@Override
 public double[] precondition(double[] point, double[] r) {
 double[] d = r.clone();
 d[0] /=  72.0;
@@ -448,6 +449,7 @@ public class NonLinearConjugateGradientOptimizerTest {
 
 public ObjectiveFunction getObjectiveFunction() {
 return new ObjectiveFunction(new MultivariateFunction() {
+@Override
 public double value(double[] point) {
 double[] y = factors.operate(point);
 double sum = 0;
@@ -462,6 +464,7 @@ public class NonLinearConjugateGradientOptimizerTest {
 
 public ObjectiveFunctionGradient getObjectiveFunctionGradient() {
 return new ObjectiveFunctionGradient(new 
MultivariateVectorFunction() {
+@Override
 public double[] value(double[] point) {
 double[] r = factors.operate(point);
 for (int i = 0; i < r.length; ++i) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/221c843b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
index db69efd..55d43a0 100644
--- 
a/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
+++ 
b/src/test/java/org/apache/commons/math4/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.java
@@ -365,6 +365,7 @@ public class BOBYQAOptimizerTest {
 
 private static class Sphere implements MultivariateFunction {
 
+@Override
 public double value(double[] x) {
 double f = 0;
 for (int i = 0; i < x.length; ++i)
@@ -384,6 +385,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = x[0] * x[0];
 for (int i = 1; i < x.length; ++i)
@@ -403,6 +405,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = factor * x[0] * x[0];
 for (int i = 1; i < x.length; ++i)
@@ -422,6 +425,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio;
 }
 
+@Override
 public double value(double[] x) {
 int end = x.length - 1;
 double f = x[0] * x[0] / factor + factor * x[end] * x[end];
@@ -443,6 +447,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = 0;
 for (int i = 0; i < x.length; ++i)
@@ -463,6 +468,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = 0;
 x = B.Rotate(x);
@@ -484,6 +490,7 @@ public class BOBYQAOptimizerTest {
 factor = axisratio * axisratio;
 }
 
+@Override
 public double value(double[] x) {
 double f = 0;
 for (int i = 0; i < x.length; ++i)
@@ -494,6 +501,7 @@ public class BOBYQAOptimizerTest {
 
 private static class MinusElli implements MultivariateFunction {
 private final Elli elli = new Elli();
+@Override
 public double value(double[] x) {
 return 1.0 - elli.value(x);
 }
@@ -501,6 +509,7 @@ public class BOBYQAOptimizerTest {
 
 private static class DiffPow implements MultivariateFunction {
 //private int fcount = 

[06/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
index 17097f5..e3b1959 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
@@ -170,7 +170,7 @@ public class HarmonicCurveFitterTest {
  0, 1, 2, 3, 2, 1,
  0, -1, -2, -3, -2, -1,
  0, 1, 2, 3, 2, 1, 0 };
-final List points = new 
ArrayList();
+final List points = new ArrayList<>();
 for (int i = 0; i < y.length; i++) {
 points.add(new WeightedObservedPoint(1, i, y[i]));
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
index 377726d..016bf8b 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
@@ -57,7 +57,7 @@ class CircleProblem {
 public CircleProblem(double xError,
  double yError,
  int searchResolution) {
-points = new ArrayList();
+points = new ArrayList<>();
 xSigma = xError;
 ySigma = yError;
 resolution = searchResolution;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
index 3c88431..87a2b6f 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
@@ -29,7 +29,7 @@ class CircleVectorial {
 private ArrayList points;
 
 public CircleVectorial() {
-points  = new ArrayList();
+points  = new ArrayList<>();
 }
 
 public void addPoint(double px, double py) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
index b34dcaf..bffb95b 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
@@ -262,7 +262,7 @@ public class EvaluationTest {
 // "MultivariateJacobianFunction".
 final MultivariateJacobianFunction m1 = new 
MultivariateJacobianFunction() {
 public Pair value(RealVector notUsed) {
-return new Pair(null, null);
+return new Pair<>(null, null);
 }
 };
 
@@ -276,7 +276,7 @@ public class EvaluationTest {
 
 final MultivariateJacobianFunction m2 = new ValueAndJacobianFunction() 
{
 public Pair value(RealVector notUsed) {
-return new Pair(null, null);
+return new Pair<>(null, null);
 }
 public RealVector computeValue(final double[] params) {
 return null;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
index 6642854..3c637ae 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
@@ -232,7 +232,7 @@ public class EvaluationTestValidation {
   

[09/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
index 2dc6933..be89ef4 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
@@ -374,9 +374,9 @@ public class FieldRotation> 
implements Serializabl
 public FieldRotation(final RotationOrder order, final RotationConvention 
convention,
  final T alpha1, final T alpha2, final T alpha3) {
 final T one = alpha1.getField().getOne();
-final FieldRotation r1 = new FieldRotation(new 
FieldVector3D(one, order.getA1()), alpha1, convention);
-final FieldRotation r2 = new FieldRotation(new 
FieldVector3D(one, order.getA2()), alpha2, convention);
-final FieldRotation r3 = new FieldRotation(new 
FieldVector3D(one, order.getA3()), alpha3, convention);
+final FieldRotation r1 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA1()), alpha1, convention);
+final FieldRotation r2 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA2()), alpha2, convention);
+final FieldRotation r3 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA3()), alpha3, convention);
 final FieldRotation composed = r1.compose(r2.compose(r3, 
convention), convention);
 q0 = composed.q0;
 q1 = composed.q1;
@@ -453,7 +453,7 @@ public class FieldRotation> 
implements Serializabl
  * of the instance
  */
 public FieldRotation revert() {
-return new FieldRotation(q0.negate(), q1, q2, q3, false);
+return new FieldRotation<>(q0.negate(), q1, q2, q3, false);
 }
 
 /** Get the scalar coordinate of the quaternion.
@@ -509,17 +509,17 @@ public class FieldRotation> 
implements Serializabl
 final T squaredSine = 
q1.multiply(q1).add(q2.multiply(q2)).add(q3.multiply(q3));
 if (squaredSine.getReal() == 0) {
 final Field field = squaredSine.getField();
-return new FieldVector3D(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
+return new FieldVector3D<>(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
 field.getZero(),
 field.getZero());
 } else {
 final double sgn = convention == 
RotationConvention.VECTOR_OPERATOR ? +1 : -1;
 if (q0.getReal() < 0) {
 T inverse = squaredSine.sqrt().reciprocal().multiply(sgn);
-return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 final T inverse = 
squaredSine.sqrt().reciprocal().negate().multiply(sgn);
-return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 }
 
@@ -1032,7 +1032,7 @@ public class FieldRotation> 
implements Serializabl
  */
 private FieldVector3D vector(final double x, final double y, final 
double z) {
 final T zero = q0.getField().getZero();
-return new FieldVector3D(zero.add(x), zero.add(y), zero.add(z));
+return new FieldVector3D<>(zero.add(x), zero.add(y), zero.add(z));
 }
 
 /** Get the 3X3 matrix corresponding to the instance
@@ -1090,7 +1090,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 
FieldVector3D(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
+return new 
FieldVector3D<>(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
 
q0.multiply(y.multiply(q0).subtract(q3.multiply(x).subtract(q1.multiply(z.add(s.multiply(q2)).multiply(2).subtract(y),
 
q0.multiply(z.multiply(q0).subtract(q1.multiply(y).subtract(q2.multiply(x.add(s.multiply(q3)).multiply(2).subtract(z));
 
@@ -1108,7 +1108,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 

[08/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
index e84bf58..6d4d980 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
@@ -59,7 +59,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
  * @param tolerance below which points are consider to be identical
  */
 public SphericalPolygonsSet(final Vector3D pole, final double tolerance) {
-super(new BSPTree(new Circle(pole, 
tolerance).wholeHyperplane(),
+super(new BSPTree<>(new Circle(pole, tolerance).wholeHyperplane(),
 new BSPTree(Boolean.FALSE),
 new BSPTree(Boolean.TRUE),
 null),
@@ -198,7 +198,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 final int n = vertices.length;
 if (n == 0) {
 // the tree represents the whole space
-return new BSPTree(Boolean.TRUE);
+return new BSPTree<>(Boolean.TRUE);
 }
 
 // build the vertices
@@ -208,7 +208,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the edges
-List edges = new ArrayList(n);
+List edges = new ArrayList<>(n);
 Vertex end = vArray[n - 1];
 for (int i = 0; i < n; ++i) {
 
@@ -241,7 +241,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the tree top-down
-final BSPTree tree = new BSPTree();
+final BSPTree tree = new BSPTree<>();
 insertEdges(hyperplaneThickness, tree, edges);
 
 return tree;
@@ -284,8 +284,8 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // we have split the node by inserting an edge as a cut sub-hyperplane
 // distribute the remaining edges in the two sub-trees
-final List outsideList = new ArrayList();
-final List insideList  = new ArrayList();
+final List outsideList = new ArrayList<>();
+final List insideList  = new ArrayList<>();
 for (final Edge edge : edges) {
 if (edge != inserted) {
 edge.split(inserted.getCircle(), outsideList, insideList);
@@ -384,7 +384,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 
 // convert the list of all edges into a list of start vertices
-loops = new ArrayList();
+loops = new ArrayList<>();
 while (!edges.isEmpty()) {
 
 // this is an edge belonging to a new loop, store it
@@ -468,10 +468,10 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // handle special cases first
 if (isEmpty()) {
-return new EnclosingBall(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
+return new EnclosingBall<>(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
 }
 if (isFull()) {
-return new EnclosingBall(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
+return new EnclosingBall<>(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
 }
 
 // as the polygons is neither empty nor full, it has some boundaries 
and cut hyperplanes
@@ -479,13 +479,13 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 if (isEmpty(root.getMinus()) && isFull(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall(new 
S2Point(circle.getPole()).negate(),
+return new EnclosingBall<>(new S2Point(circle.getPole()).negate(),
 0.5 * FastMath.PI);
 }
 if (isFull(root.getMinus()) && isEmpty(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall(new 
S2Point(circle.getPole()),
+return new EnclosingBall<>(new S2Point(circle.getPole()),
 0.5 * FastMath.PI);
 }
 
@@ -505,7 +505,7 @@ public 

[04/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
index 00dde9d..57c9cb7 100644
--- a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
@@ -167,8 +167,8 @@ public final class BlockFieldMatrixTest {
 /** test dimensions */
 @Test
 public void testDimensions() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 Assert.assertEquals("testData row dimension",3,m.getRowDimension());
 Assert.assertEquals("testData column 
dimension",3,m.getColumnDimension());
 Assert.assertTrue("testData is square",m.isSquare());
@@ -182,18 +182,18 @@ public final class BlockFieldMatrixTest {
 public void testCopyFunctions() {
 Random r = new Random(66636328996002l);
 BlockFieldMatrix m1 = createRandomMatrix(r, 47, 83);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(m1.getData());
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(m1.getData());
 Assert.assertEquals(m1, m2);
-BlockFieldMatrix m3 = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m4 = new 
BlockFieldMatrix(m3.getData());
+BlockFieldMatrix m3 = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m4 = new BlockFieldMatrix<>(m3.getData());
 Assert.assertEquals(m3, m4);
 }
 
 /** test add */
 @Test
 public void testAdd() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
 FieldMatrix mPlusMInv = m.add(mInv);
 Fraction[][] sumEntries = mPlusMInv.getData();
 for (int row = 0; row < m.getRowDimension(); row++) {
@@ -206,8 +206,8 @@ public final class BlockFieldMatrixTest {
 /** test add failure */
 @Test
 public void testAddFail() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 try {
 m.add(m2);
 Assert.fail("MathIllegalArgumentException expected");
@@ -219,11 +219,11 @@ public final class BlockFieldMatrixTest {
  /** test m-n = m + -n */
 @Test
 public void testPlusMinus() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testDataInv);
 TestUtils.assertEquals(m.subtract(m2), m2.scalarMultiply(new 
Fraction(-1)).add(m));
 try {
-m.subtract(new BlockFieldMatrix(testData2));
+m.subtract(new BlockFieldMatrix<>(testData2));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // ignored
@@ -233,17 +233,17 @@ public final class BlockFieldMatrixTest {
 /** test multiply */
 @Test
 public void testMultiply() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
-BlockFieldMatrix identity = new 
BlockFieldMatrix(id);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
+BlockFieldMatrix identity = new BlockFieldMatrix<>(id);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 TestUtils.assertEquals(m.multiply(mInv), identity);
 TestUtils.assertEquals(mInv.multiply(m), identity);
 TestUtils.assertEquals(m.multiply(identity), m);
 TestUtils.assertEquals(identity.multiply(mInv), mInv);
 TestUtils.assertEquals(m2.multiply(identity), m2);
 try {
-m.multiply(new BlockFieldMatrix(bigSingular));
+m.multiply(new BlockFieldMatrix<>(bigSingular));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // expected
@@ -253,7 +253,7 @@ public final class BlockFieldMatrixTest {
 @Test
 public void testSeveralBlocks() {
  

[02/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
index d79a19f..80b6828 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
@@ -151,8 +151,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 y0[i] = field.getOne().add(i);
 }
 
-FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE(ode),
-new 
FieldODEState(t0, y0),
+FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE<>(ode),
+new 
FieldODEState<>(t0, y0),
 tEvent);
 Assert.assertEquals(tEvent.getReal(), result.getTime().getReal(), 
epsilonT);
 T[] y = result.getState();
@@ -180,8 +180,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 return Action.CONTINUE;
 }
 }, Double.POSITIVE_INFINITY, 1.0e-20, 100);
-result = integrator.integrate(new FieldExpandableODE(ode),
-  new FieldODEState(t0, y0),
+result = integrator.integrate(new FieldExpandableODE<>(ode),
+  new FieldODEState<>(t0, y0),
   tEvent.add(120));
 Assert.assertEquals(tEvent.add(120).getReal(), 
result.getTime().getReal(), epsilonT);
 y = result.getState();
@@ -201,17 +201,17 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
MaxCountExceededException, NoBracketingException {
 RungeKuttaFieldIntegrator integrator = createIntegrator(field, 
field.getZero().add(0.01));
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1(field);
-integrator.integrate(new FieldExpandableODE(pb),
- new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
+TestFieldProblem1 pb = new TestFieldProblem1<>(field);
+integrator.integrate(new FieldExpandableODE<>(pb),
+ new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
  field.getOne());
 Assert.fail("an exception should have been thrown");
 } catch(DimensionMismatchException ie) {
 }
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1(field);
-integrator.integrate(new FieldExpandableODE(pb),
- new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
+TestFieldProblem1 pb = new TestFieldProblem1<>(field);
+integrator.integrate(new FieldExpandableODE<>(pb),
+ new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
  field.getZero());
 Assert.fail("an exception should have been thrown");
 } catch(NumberIsTooSmallException ie) {
@@ -231,12 +231,12 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
 @SuppressWarnings("unchecked")
 TestFieldProblemAbstract[] allProblems =
 (TestFieldProblemAbstract[]) 
Array.newInstance(TestFieldProblemAbstract.class, 6);
-allProblems[0] = new TestFieldProblem1(field);
-allProblems[1] = new TestFieldProblem2(field);
-allProblems[2] = new TestFieldProblem3(field);
-allProblems[3] = new TestFieldProblem4(field);
-allProblems[4] = new TestFieldProblem5(field);
-allProblems[5] = new TestFieldProblem6(field);
+allProblems[0] = new TestFieldProblem1<>(field);
+allProblems[1] = new TestFieldProblem2<>(field);
+allProblems[2] = new TestFieldProblem3<>(field);
+allProblems[3] = new TestFieldProblem4<>(field);
+allProblems[4] = new TestFieldProblem5<>(field);
+allProblems[5] = new TestFieldProblem6<>(field);
 for (TestFieldProblemAbstract pb :  allProblems) {
 
 T previousValueError = null;
@@ -246,7 +246,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 T step = 
pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(FastMath.pow(2.0,
 -i));
 
 

[03/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java 
b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
index b547cdc..c8bd3f9 100644
--- a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
@@ -104,9 +104,9 @@ public final class MatrixUtilsTest {
 
 @Test
 public void testcreateFieldMatrix() {
-Assert.assertEquals(new 
Array2DRowFieldMatrix(asFraction(testData)),
+Assert.assertEquals(new Array2DRowFieldMatrix<>(asFraction(testData)),
  MatrixUtils.createFieldMatrix(asFraction(testData)));
-Assert.assertEquals(new 
Array2DRowFieldMatrix(FractionField.getInstance(), fractionColMatrix),
+Assert.assertEquals(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), fractionColMatrix),
  MatrixUtils.createFieldMatrix(fractionColMatrix));
 try {
 MatrixUtils.createFieldMatrix(asFraction(new double[][] {{1}, 
{1,2}}));  // ragged
@@ -149,9 +149,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateRowFieldMatrix() {
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(asFraction(row)),
- new 
Array2DRowFieldMatrix(asFraction(rowMatrix)));
+ new Array2DRowFieldMatrix<>(asFraction(rowMatrix)));
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(fractionRow),
- new Array2DRowFieldMatrix(fractionRowMatrix));
+ new Array2DRowFieldMatrix<>(fractionRowMatrix));
 try {
 MatrixUtils.createRowFieldMatrix(new Fraction[] {});  // empty
 Assert.fail("Expecting MathIllegalArgumentException");
@@ -187,9 +187,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateColumnFieldMatrix() {
 
Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(asFraction(col)),
- new 
Array2DRowFieldMatrix(asFraction(colMatrix)));
+ new Array2DRowFieldMatrix<>(asFraction(colMatrix)));
 Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(fractionCol),
- new Array2DRowFieldMatrix(fractionColMatrix));
+ new Array2DRowFieldMatrix<>(fractionColMatrix));
 
 try {
 MatrixUtils.createColumnFieldMatrix(new Fraction[] {});  // empty
@@ -268,7 +268,7 @@ public final class MatrixUtilsTest {
 { new BigFraction(2), new BigFraction(5), new BigFraction(3) },
 { new BigFraction(1), new BigFraction(0), new BigFraction(8) }
 };
-FieldMatrix m = new 
Array2DRowFieldMatrix(bfData, false);
+FieldMatrix m = new Array2DRowFieldMatrix<>(bfData, 
false);
 RealMatrix converted = MatrixUtils.bigFractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);
@@ -281,7 +281,7 @@ public final class MatrixUtilsTest {
 { new Fraction(2), new Fraction(5), new Fraction(3) },
 { new Fraction(1), new Fraction(0), new Fraction(8) }
 };
-FieldMatrix m = new Array2DRowFieldMatrix(fData, 
false);
+FieldMatrix m = new Array2DRowFieldMatrix<>(fData, false);
 RealMatrix converted = MatrixUtils.fractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
index 176b227..0266b30 100644
--- a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
@@ -209,7 +209,7 @@ public class SparseFieldMatrixTest {
 SparseFieldMatrix m2 = createSparseMatrix(testData2);
 assertClose("inverse multiply", m.multiply(mInv), identity,
 entryTolerance);
-assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix(FractionField.getInstance(), testDataInv)), 
identity,
+assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), testDataInv)), identity,
 entryTolerance);
 assertClose("inverse multiply", mInv.multiply(m), identity,

[07/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
index b4b5357..feac005 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
@@ -103,7 +103,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 this.scalingH  = stepSize;
 this.reference = reference;
 this.scaled= scaled.clone();
-this.nordsieck = new Array2DRowFieldMatrix(nordsieck.getData(), 
false);
+this.nordsieck = new Array2DRowFieldMatrix<>(nordsieck.getData(), 
false);
 }
 
 /** Create a new instance.
@@ -121,7 +121,7 @@ class AdamsFieldStepInterpolator> extends Abstract

FieldODEStateAndDerivative newSoftPreviousState,

FieldODEStateAndDerivative newSoftCurrentState,
FieldEquationsMapper 
newMapper) {
-return new AdamsFieldStepInterpolator(scalingH, reference, scaled, 
nordsieck,
+return new AdamsFieldStepInterpolator<>(scalingH, reference, scaled, 
nordsieck,
  newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
@@ -181,7 +181,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 
estimatedDerivatives[j].add(scaled[j].multiply(normalizedAbscissa)).divide(x);
 }
 
-return new FieldODEStateAndDerivative(time, estimatedState, 
estimatedDerivatives);
+return new FieldODEStateAndDerivative<>(time, estimatedState, 
estimatedDerivatives);
 
 }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
index c659cc0..72d4de2 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
@@ -284,8 +284,8 @@ public class AdamsMoultonFieldIntegrator> extends
 updateHighOrderDerivativesPhase2(predictedScaled, correctedScaled, 
predictedNordsieck);
 
 // discrete events handling
-stepEnd = new FieldODEStateAndDerivative(stepEnd.getTime(), 
predictedY, correctedYDot);
-setStepStart(acceptStep(new 
AdamsFieldStepInterpolator(getStepSize(), stepEnd,
+stepEnd = new FieldODEStateAndDerivative<>(stepEnd.getTime(), 
predictedY, correctedYDot);
+setStepStart(acceptStep(new 
AdamsFieldStepInterpolator<>(getStepSize(), stepEnd,
   
correctedScaled, predictedNordsieck, forward,
   
getStepStart(), stepEnd,
   
equations.getMapper()),

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
index c1e5bee..7c2b872 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
@@ -137,8 +137,7 @@ public class AdamsNordsieckFieldTransformer> {
 private static final Map,
AdamsNordsieckFieldTransformer>>> CACHE =
-new HashMap,
- AdamsNordsieckFieldTransformer>>>();
+new HashMap<>();
 
 /** Field to which the time and state vector elements belong. */
 private final Field field;
@@ -162,11 +161,11 @@ public class AdamsNordsieckFieldTransformer> {
 // compute coefficients
 FieldMatrix bigP = buildP(rows);
 

[01/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
Repository: commons-math
Updated Branches:
  refs/heads/develop 98e27f58e -> 762eb53f5


http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
index 86ed2f9..601a32f 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
FieldODEStateAndDerivative softPreviousState,
FieldODEStateAndDerivative softCurrentState,
FieldEquationsMapper mapper) {
-return new ThreeEighthesFieldStepInterpolator(field, forward, yDotK,
+return new ThreeEighthesFieldStepInterpolator<>(field, forward, yDotK,
  globalPreviousState, 
globalCurrentState,
  softPreviousState, 
softCurrentState,
  mapper);
@@ -42,7 +42,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
 
 protected > FieldButcherArrayProvider
 createButcherArrayProvider(final Field field) {
-return new ThreeEighthesFieldIntegrator(field, field.getOne());
+return new ThreeEighthesFieldIntegrator<>(field, field.getOne());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
index f546745..cda8f2c 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
@@ -40,7 +40,7 @@ public class DummyFieldStepInterpolator>
   final 
FieldODEStateAndDerivative newSoftPreviousState,
   final 
FieldODEStateAndDerivative newSoftCurrentState,
   final 
FieldEquationsMapper newMapper) {
-return new DummyFieldStepInterpolator(newForward,
+return new DummyFieldStepInterpolator<>(newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
  newMapper);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
index 5c592d3..d3d5fca 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
@@ -137,7 +137,7 @@ public class StepInterpolatorTestUtils {
 
 });
 
-integrator.integrate(new FieldExpandableODE(problem), 
problem.getInitialState(), problem.getFinalTime());
+integrator.integrate(new FieldExpandableODE<>(problem), 
problem.getInitialState(), problem.getFinalTime());
 
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/762eb53f/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
index 1955321..6f6bfbe 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
@@ -255,7 +255,7 @@ public abstract class StepNormalizerOutputTestBase
 double[] y   = {0.0};
 double start = reverse ? getEnd()   : getStart();
 double end   = reverse ? getStart() : 

[10/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
Remove redundant type arguments.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/762eb53f
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/762eb53f
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/762eb53f

Branch: refs/heads/develop
Commit: 762eb53f5cee901be190cd324dfde01977aeea60
Parents: 98e27f5
Author: Gary Gregory 
Authored: Tue Sep 20 10:37:01 2016 -0700
Committer: Gary Gregory 
Committed: Tue Sep 20 10:37:01 2016 -0700

--
 .../analysis/differentiation/DSCompiler.java|  10 +-
 .../differentiation/SparseGradient.java |   4 +-
 .../integration/gauss/BaseRuleFactory.java  |   8 +-
 .../gauss/GaussIntegratorFactory.java   |   2 +-
 .../integration/gauss/HermiteRuleFactory.java   |   4 +-
 .../integration/gauss/LaguerreRuleFactory.java  |   2 +-
 .../gauss/LegendreHighPrecisionRuleFactory.java |   4 +-
 .../integration/gauss/LegendreRuleFactory.java  |   4 +-
 .../interpolation/FieldHermiteInterpolator.java |   6 +-
 .../interpolation/HermiteInterpolator.java  |   6 +-
 .../interpolation/InterpolatingMicrosphere.java |   6 +-
 .../analysis/polynomials/PolynomialsUtils.java  |  12 +-
 .../apache/commons/math4/complex/Complex.java   |   2 +-
 .../distribution/EmpiricalDistribution.java |   2 +-
 .../distribution/EnumeratedDistribution.java|   6 +-
 .../EnumeratedIntegerDistribution.java  |  10 +-
 .../EnumeratedRealDistribution.java |  10 +-
 .../MixtureMultivariateNormalDistribution.java  |   4 +-
 .../MixtureMultivariateRealDistribution.java|   6 +-
 ...ateNormalMixtureExpectationMaximization.java |   4 +-
 .../commons/math4/exception/util/ArgUtils.java  |   2 +-
 .../math4/exception/util/ExceptionContext.java  |  12 +-
 .../math4/fitting/GaussianCurveFitter.java  |   2 +-
 .../math4/fitting/HarmonicCurveFitter.java  |   2 +-
 .../math4/fitting/WeightedObservedPoints.java   |   4 +-
 .../leastsquares/GaussNewtonOptimizer.java  |   2 +-
 .../leastsquares/LeastSquaresFactory.java   |   2 +-
 .../math4/genetics/AbstractListChromosome.java  |   2 +-
 .../math4/genetics/BinaryChromosome.java|   2 +-
 .../commons/math4/genetics/BinaryMutation.java  |   2 +-
 .../commons/math4/genetics/CycleCrossover.java  |   8 +-
 .../commons/math4/genetics/ListPopulation.java  |   2 +-
 .../commons/math4/genetics/NPointCrossover.java |   4 +-
 .../math4/genetics/OnePointCrossover.java   |   4 +-
 .../math4/genetics/OrderedCrossover.java|   8 +-
 .../commons/math4/genetics/RandomKey.java   |  16 +-
 .../math4/genetics/RandomKeyMutation.java   |   2 +-
 .../math4/genetics/TournamentSelection.java |   2 +-
 .../math4/genetics/UniformCrossover.java|   4 +-
 .../math4/geometry/enclosing/WelzlEncloser.java |   4 +-
 .../geometry/euclidean/oned/IntervalsSet.java   |  22 +-
 .../euclidean/oned/SubOrientedPoint.java|   6 +-
 .../euclidean/threed/FieldRotation.java |  40 ++--
 .../euclidean/threed/FieldVector3D.java |  42 ++--
 .../euclidean/threed/OutlineExtractor.java  |   2 +-
 .../euclidean/threed/PolyhedronsSet.java|   4 +-
 .../euclidean/threed/SphereGenerator.java   |  10 +-
 .../geometry/euclidean/threed/SubLine.java  |   2 +-
 .../geometry/euclidean/threed/SubPlane.java |  12 +-
 .../geometry/euclidean/twod/DiskGenerator.java  |   8 +-
 .../geometry/euclidean/twod/NestedLoops.java|   8 +-
 .../geometry/euclidean/twod/PolygonsSet.java|  18 +-
 .../math4/geometry/euclidean/twod/SubLine.java  |  14 +-
 .../twod/hull/AklToussaintHeuristic.java|   4 +-
 .../euclidean/twod/hull/ConvexHull2D.java   |   2 +-
 .../euclidean/twod/hull/MonotoneChain.java  |   8 +-
 .../geometry/partitioning/AbstractRegion.java   |  26 +--
 .../partitioning/AbstractSubHyperplane.java |   8 +-
 .../math4/geometry/partitioning/BSPTree.java|  34 +--
 .../geometry/partitioning/BoundaryBuilder.java  |  12 +-
 .../partitioning/BoundaryProjector.java |   4 +-
 .../geometry/partitioning/Characterization.java |   4 +-
 .../math4/geometry/partitioning/NodesSet.java   |   2 +-
 .../geometry/partitioning/RegionFactory.java|  14 +-
 .../math4/geometry/spherical/oned/ArcsSet.java  |  36 +--
 .../geometry/spherical/oned/SubLimitAngle.java  |   4 +-
 .../geometry/spherical/twod/EdgesBuilder.java   |   6 +-
 .../spherical/twod/PropertiesComputer.java  |   2 +-
 .../spherical/twod/SphericalPolygonsSet.java|  30 +--
 .../geometry/spherical/twod/SubCircle.java  |   4 +-
 .../math4/geometry/spherical/twod/Vertex.java   |   2 +-
 .../math4/linear/AbstractFieldMatrix.java   |  16 +-
 .../math4/linear/AbstractRealMatrix.java|   2 +-
 .../math4/linear/Array2DRowFieldMatrix.java |  10 +-
 

[05/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
index 758e870..24e5515 100644
--- 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
+++ 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
@@ -41,8 +41,8 @@ public class FieldVector3DTest {
 double sinAlpha = FastMath.sqrt(3) / 2.0;
 double cosDelta = FastMath.sqrt(2) / 2.0;
 double sinDelta = -FastMath.sqrt(2) / 2.0;
-FieldVector3D u = new FieldVector3D<>(2,
-new FieldVector3D<>(new DerivativeStructure(2, 1, 0,  
FastMath.PI / 3),
+FieldVector3D u = new 
FieldVector3D(2,
+new FieldVector3D(new 
DerivativeStructure(2, 1, 0,  FastMath.PI / 3),
 new DerivativeStructure(2, 1, 1, -FastMath.PI / 4)));
 checkVector(u, 2 * cosAlpha * cosDelta, 2 * sinAlpha * cosDelta, 2 * 
sinDelta);
 Assert.assertEquals(-2 * sinAlpha * cosDelta, 
u.getX().getPartialDerivative(1, 0), 1.0e-12);
@@ -52,41 +52,41 @@ public class FieldVector3DTest {
 Assert.assertEquals(-2 * sinAlpha * sinDelta, 
u.getY().getPartialDerivative(0, 1), 1.0e-12);
 Assert.assertEquals(2 * cosDelta, 
u.getZ().getPartialDerivative(0, 1), 1.0e-12);
 
-checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3)),
+checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3)),
2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2);
-checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4)),
2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 
0);
-checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0)),
2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
0);
 
-checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3),
+checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3),
-3, createVector(0, 0, -1, 3)),
2, 0, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1);
-checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 0, 3, -1, 0, 0, 1, 0, -1, 0, 0, 0, 0, 
-1, -1);
-checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3, -3.0),
new Vector3D(0, 0, -1)),
2, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
-1);
 
-checkVector(new FieldVector3D<>(2, createVector(1, 0, 0, 3),
+checkVector(new FieldVector3D(2, createVector(1, 
0, 0, 3),
5, createVector(0, 1, 0, 3),
-3, createVector(0, 0, -1, 3)),
2, 5, 3, 4, 0, 0, 0, 4, 0, 0, 0, 4);
-checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3,  5.0),
createVector(0, 1,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 5, 3, 4, 0, 0, 1, 0, 4, 0, 1, 0, 0, 4, 
-1);
-checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3,  5.0),
new Vector3D(0, 1,  0),
@@ -94,12 +94,12 @@ public class 

[02/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
index 80b6828..d79a19f 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
@@ -151,8 +151,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 y0[i] = field.getOne().add(i);
 }
 
-FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE<>(ode),
-new 
FieldODEState<>(t0, y0),
+FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE(ode),
+new 
FieldODEState(t0, y0),
 tEvent);
 Assert.assertEquals(tEvent.getReal(), result.getTime().getReal(), 
epsilonT);
 T[] y = result.getState();
@@ -180,8 +180,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 return Action.CONTINUE;
 }
 }, Double.POSITIVE_INFINITY, 1.0e-20, 100);
-result = integrator.integrate(new FieldExpandableODE<>(ode),
-  new FieldODEState<>(t0, y0),
+result = integrator.integrate(new FieldExpandableODE(ode),
+  new FieldODEState(t0, y0),
   tEvent.add(120));
 Assert.assertEquals(tEvent.add(120).getReal(), 
result.getTime().getReal(), epsilonT);
 y = result.getState();
@@ -201,17 +201,17 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
MaxCountExceededException, NoBracketingException {
 RungeKuttaFieldIntegrator integrator = createIntegrator(field, 
field.getZero().add(0.01));
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1<>(field);
-integrator.integrate(new FieldExpandableODE<>(pb),
- new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
+TestFieldProblem1 pb = new TestFieldProblem1(field);
+integrator.integrate(new FieldExpandableODE(pb),
+ new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
  field.getOne());
 Assert.fail("an exception should have been thrown");
 } catch(DimensionMismatchException ie) {
 }
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1<>(field);
-integrator.integrate(new FieldExpandableODE<>(pb),
- new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
+TestFieldProblem1 pb = new TestFieldProblem1(field);
+integrator.integrate(new FieldExpandableODE(pb),
+ new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
  field.getZero());
 Assert.fail("an exception should have been thrown");
 } catch(NumberIsTooSmallException ie) {
@@ -231,12 +231,12 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
 @SuppressWarnings("unchecked")
 TestFieldProblemAbstract[] allProblems =
 (TestFieldProblemAbstract[]) 
Array.newInstance(TestFieldProblemAbstract.class, 6);
-allProblems[0] = new TestFieldProblem1<>(field);
-allProblems[1] = new TestFieldProblem2<>(field);
-allProblems[2] = new TestFieldProblem3<>(field);
-allProblems[3] = new TestFieldProblem4<>(field);
-allProblems[4] = new TestFieldProblem5<>(field);
-allProblems[5] = new TestFieldProblem6<>(field);
+allProblems[0] = new TestFieldProblem1(field);
+allProblems[1] = new TestFieldProblem2(field);
+allProblems[2] = new TestFieldProblem3(field);
+allProblems[3] = new TestFieldProblem4(field);
+allProblems[4] = new TestFieldProblem5(field);
+allProblems[5] = new TestFieldProblem6(field);
 for (TestFieldProblemAbstract pb :  allProblems) {
 
 T previousValueError = null;
@@ -246,7 +246,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 T step = 
pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(FastMath.pow(2.0,
 -i));
 
 

[10/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
Revert "Remove redundant type arguments."

This reverts commit 8b5f4535ec5a3983e655e5fc66a90fce657d4344.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6df150da
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6df150da
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6df150da

Branch: refs/heads/master
Commit: 6df150da22b4690ae521c6bd1abf10a1ed60c41b
Parents: 8b5f453
Author: Gary Gregory 
Authored: Tue Sep 20 10:30:57 2016 -0700
Committer: Gary Gregory 
Committed: Tue Sep 20 10:30:57 2016 -0700

--
 .../analysis/differentiation/DSCompiler.java|  10 +-
 .../differentiation/SparseGradient.java |   4 +-
 .../integration/gauss/BaseRuleFactory.java  |   8 +-
 .../gauss/GaussIntegratorFactory.java   |   2 +-
 .../integration/gauss/HermiteRuleFactory.java   |   4 +-
 .../gauss/LegendreHighPrecisionRuleFactory.java |   4 +-
 .../integration/gauss/LegendreRuleFactory.java  |   4 +-
 .../interpolation/FieldHermiteInterpolator.java |   6 +-
 .../interpolation/HermiteInterpolator.java  |   6 +-
 .../interpolation/InterpolatingMicrosphere.java |   6 +-
 .../analysis/polynomials/PolynomialsUtils.java  |  12 +-
 .../apache/commons/math4/complex/Complex.java   |   2 +-
 .../distribution/EnumeratedDistribution.java|   6 +-
 .../EnumeratedIntegerDistribution.java  |  10 +-
 .../EnumeratedRealDistribution.java |  10 +-
 .../MixtureMultivariateNormalDistribution.java  |   4 +-
 .../MixtureMultivariateRealDistribution.java|   6 +-
 ...ateNormalMixtureExpectationMaximization.java |   4 +-
 .../commons/math4/exception/util/ArgUtils.java  |   2 +-
 .../math4/exception/util/ExceptionContext.java  |  12 +-
 .../math4/fitting/GaussianCurveFitter.java  |   2 +-
 .../math4/fitting/HarmonicCurveFitter.java  |   2 +-
 .../math4/fitting/WeightedObservedPoints.java   |   4 +-
 .../leastsquares/GaussNewtonOptimizer.java  |   2 +-
 .../leastsquares/LeastSquaresFactory.java   |   2 +-
 .../math4/genetics/AbstractListChromosome.java  |   2 +-
 .../math4/genetics/BinaryChromosome.java|   2 +-
 .../commons/math4/genetics/BinaryMutation.java  |   2 +-
 .../commons/math4/genetics/CycleCrossover.java  |   8 +-
 .../commons/math4/genetics/ListPopulation.java  |   2 +-
 .../commons/math4/genetics/NPointCrossover.java |   4 +-
 .../math4/genetics/OnePointCrossover.java   |   4 +-
 .../math4/genetics/OrderedCrossover.java|   8 +-
 .../commons/math4/genetics/RandomKey.java   |  16 +-
 .../math4/genetics/RandomKeyMutation.java   |   2 +-
 .../math4/genetics/TournamentSelection.java |   2 +-
 .../math4/genetics/UniformCrossover.java|   4 +-
 .../math4/geometry/enclosing/WelzlEncloser.java |   4 +-
 .../geometry/euclidean/oned/IntervalsSet.java   |  22 +-
 .../euclidean/oned/SubOrientedPoint.java|   6 +-
 .../euclidean/threed/FieldRotation.java |  40 ++--
 .../euclidean/threed/FieldVector3D.java |  42 ++--
 .../euclidean/threed/OutlineExtractor.java  |   2 +-
 .../euclidean/threed/PolyhedronsSet.java|   4 +-
 .../euclidean/threed/SphereGenerator.java   |  10 +-
 .../geometry/euclidean/threed/SubLine.java  |   2 +-
 .../geometry/euclidean/threed/SubPlane.java |  12 +-
 .../geometry/euclidean/twod/DiskGenerator.java  |   8 +-
 .../geometry/euclidean/twod/NestedLoops.java|   8 +-
 .../geometry/euclidean/twod/PolygonsSet.java|  18 +-
 .../math4/geometry/euclidean/twod/SubLine.java  |  14 +-
 .../twod/hull/AklToussaintHeuristic.java|   4 +-
 .../euclidean/twod/hull/ConvexHull2D.java   |   2 +-
 .../euclidean/twod/hull/MonotoneChain.java  |   8 +-
 .../geometry/partitioning/AbstractRegion.java   |  26 +--
 .../partitioning/AbstractSubHyperplane.java |   8 +-
 .../math4/geometry/partitioning/BSPTree.java|  34 +--
 .../geometry/partitioning/BoundaryBuilder.java  |  12 +-
 .../partitioning/BoundaryProjector.java |   4 +-
 .../geometry/partitioning/Characterization.java |   4 +-
 .../math4/geometry/partitioning/NodesSet.java   |   2 +-
 .../geometry/partitioning/RegionFactory.java|  14 +-
 .../math4/geometry/spherical/oned/ArcsSet.java  |  36 +--
 .../geometry/spherical/oned/SubLimitAngle.java  |   4 +-
 .../geometry/spherical/twod/EdgesBuilder.java   |   6 +-
 .../spherical/twod/PropertiesComputer.java  |   2 +-
 .../spherical/twod/SphericalPolygonsSet.java|  30 +--
 .../geometry/spherical/twod/SubCircle.java  |   4 +-
 .../math4/geometry/spherical/twod/Vertex.java   |   2 +-
 .../math4/linear/AbstractFieldMatrix.java   |  16 +-
 .../math4/linear/AbstractRealMatrix.java|   2 +-
 .../math4/linear/Array2DRowFieldMatrix.java |  10 +-
 .../commons/math4/linear/ArrayFieldVector.java  |  40 ++--
 

[01/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
Repository: commons-math
Updated Branches:
  refs/heads/master 8b5f4535e -> 6df150da2


http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
index 601a32f..86ed2f9 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
FieldODEStateAndDerivative softPreviousState,
FieldODEStateAndDerivative softCurrentState,
FieldEquationsMapper mapper) {
-return new ThreeEighthesFieldStepInterpolator<>(field, forward, yDotK,
+return new ThreeEighthesFieldStepInterpolator(field, forward, yDotK,
  globalPreviousState, 
globalCurrentState,
  softPreviousState, 
softCurrentState,
  mapper);
@@ -42,7 +42,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
 
 protected > FieldButcherArrayProvider
 createButcherArrayProvider(final Field field) {
-return new ThreeEighthesFieldIntegrator<>(field, field.getOne());
+return new ThreeEighthesFieldIntegrator(field, field.getOne());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
index cda8f2c..f546745 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
@@ -40,7 +40,7 @@ public class DummyFieldStepInterpolator>
   final 
FieldODEStateAndDerivative newSoftPreviousState,
   final 
FieldODEStateAndDerivative newSoftCurrentState,
   final 
FieldEquationsMapper newMapper) {
-return new DummyFieldStepInterpolator<>(newForward,
+return new DummyFieldStepInterpolator(newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
  newMapper);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
index d3d5fca..5c592d3 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
@@ -137,7 +137,7 @@ public class StepInterpolatorTestUtils {
 
 });
 
-integrator.integrate(new FieldExpandableODE<>(problem), 
problem.getInitialState(), problem.getFinalTime());
+integrator.integrate(new FieldExpandableODE(problem), 
problem.getInitialState(), problem.getFinalTime());
 
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
index 6f6bfbe..1955321 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
@@ -255,7 +255,7 @@ public abstract class StepNormalizerOutputTestBase
 double[] y   = {0.0};
 double start = reverse ? getEnd()   : getStart();
 double end   = reverse ? getStart() : 

[08/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
index 6d4d980..e84bf58 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
@@ -59,7 +59,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
  * @param tolerance below which points are consider to be identical
  */
 public SphericalPolygonsSet(final Vector3D pole, final double tolerance) {
-super(new BSPTree<>(new Circle(pole, tolerance).wholeHyperplane(),
+super(new BSPTree(new Circle(pole, 
tolerance).wholeHyperplane(),
 new BSPTree(Boolean.FALSE),
 new BSPTree(Boolean.TRUE),
 null),
@@ -198,7 +198,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 final int n = vertices.length;
 if (n == 0) {
 // the tree represents the whole space
-return new BSPTree<>(Boolean.TRUE);
+return new BSPTree(Boolean.TRUE);
 }
 
 // build the vertices
@@ -208,7 +208,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the edges
-List edges = new ArrayList<>(n);
+List edges = new ArrayList(n);
 Vertex end = vArray[n - 1];
 for (int i = 0; i < n; ++i) {
 
@@ -241,7 +241,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the tree top-down
-final BSPTree tree = new BSPTree<>();
+final BSPTree tree = new BSPTree();
 insertEdges(hyperplaneThickness, tree, edges);
 
 return tree;
@@ -284,8 +284,8 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // we have split the node by inserting an edge as a cut sub-hyperplane
 // distribute the remaining edges in the two sub-trees
-final List outsideList = new ArrayList<>();
-final List insideList  = new ArrayList<>();
+final List outsideList = new ArrayList();
+final List insideList  = new ArrayList();
 for (final Edge edge : edges) {
 if (edge != inserted) {
 edge.split(inserted.getCircle(), outsideList, insideList);
@@ -384,7 +384,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 
 // convert the list of all edges into a list of start vertices
-loops = new ArrayList<>();
+loops = new ArrayList();
 while (!edges.isEmpty()) {
 
 // this is an edge belonging to a new loop, store it
@@ -468,10 +468,10 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // handle special cases first
 if (isEmpty()) {
-return new EnclosingBall<>(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
+return new EnclosingBall(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
 }
 if (isFull()) {
-return new EnclosingBall<>(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
+return new EnclosingBall(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
 }
 
 // as the polygons is neither empty nor full, it has some boundaries 
and cut hyperplanes
@@ -479,13 +479,13 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 if (isEmpty(root.getMinus()) && isFull(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall<>(new S2Point(circle.getPole()).negate(),
+return new EnclosingBall(new 
S2Point(circle.getPole()).negate(),
 0.5 * FastMath.PI);
 }
 if (isFull(root.getMinus()) && isEmpty(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall<>(new S2Point(circle.getPole()),
+return new EnclosingBall(new 
S2Point(circle.getPole()),
 0.5 * FastMath.PI);
 }
 
@@ -505,7 +505,7 @@ public 

[06/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
index e3b1959..17097f5 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
@@ -170,7 +170,7 @@ public class HarmonicCurveFitterTest {
  0, 1, 2, 3, 2, 1,
  0, -1, -2, -3, -2, -1,
  0, 1, 2, 3, 2, 1, 0 };
-final List points = new ArrayList<>();
+final List points = new 
ArrayList();
 for (int i = 0; i < y.length; i++) {
 points.add(new WeightedObservedPoint(1, i, y[i]));
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
index 016bf8b..377726d 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
@@ -57,7 +57,7 @@ class CircleProblem {
 public CircleProblem(double xError,
  double yError,
  int searchResolution) {
-points = new ArrayList<>();
+points = new ArrayList();
 xSigma = xError;
 ySigma = yError;
 resolution = searchResolution;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
index 87a2b6f..3c88431 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
@@ -29,7 +29,7 @@ class CircleVectorial {
 private ArrayList points;
 
 public CircleVectorial() {
-points  = new ArrayList<>();
+points  = new ArrayList();
 }
 
 public void addPoint(double px, double py) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
index bffb95b..b34dcaf 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
@@ -262,7 +262,7 @@ public class EvaluationTest {
 // "MultivariateJacobianFunction".
 final MultivariateJacobianFunction m1 = new 
MultivariateJacobianFunction() {
 public Pair value(RealVector notUsed) {
-return new Pair<>(null, null);
+return new Pair(null, null);
 }
 };
 
@@ -276,7 +276,7 @@ public class EvaluationTest {
 
 final MultivariateJacobianFunction m2 = new ValueAndJacobianFunction() 
{
 public Pair value(RealVector notUsed) {
-return new Pair<>(null, null);
+return new Pair(null, null);
 }
 public RealVector computeValue(final double[] params) {
 return null;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
index 3c637ae..6642854 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
@@ -232,7 +232,7 @@ public class EvaluationTestValidation {
   

[03/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java 
b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
index c8bd3f9..b547cdc 100644
--- a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
@@ -104,9 +104,9 @@ public final class MatrixUtilsTest {
 
 @Test
 public void testcreateFieldMatrix() {
-Assert.assertEquals(new Array2DRowFieldMatrix<>(asFraction(testData)),
+Assert.assertEquals(new 
Array2DRowFieldMatrix(asFraction(testData)),
  MatrixUtils.createFieldMatrix(asFraction(testData)));
-Assert.assertEquals(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), fractionColMatrix),
+Assert.assertEquals(new 
Array2DRowFieldMatrix(FractionField.getInstance(), fractionColMatrix),
  MatrixUtils.createFieldMatrix(fractionColMatrix));
 try {
 MatrixUtils.createFieldMatrix(asFraction(new double[][] {{1}, 
{1,2}}));  // ragged
@@ -149,9 +149,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateRowFieldMatrix() {
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(asFraction(row)),
- new Array2DRowFieldMatrix<>(asFraction(rowMatrix)));
+ new 
Array2DRowFieldMatrix(asFraction(rowMatrix)));
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(fractionRow),
- new Array2DRowFieldMatrix<>(fractionRowMatrix));
+ new Array2DRowFieldMatrix(fractionRowMatrix));
 try {
 MatrixUtils.createRowFieldMatrix(new Fraction[] {});  // empty
 Assert.fail("Expecting MathIllegalArgumentException");
@@ -187,9 +187,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateColumnFieldMatrix() {
 
Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(asFraction(col)),
- new Array2DRowFieldMatrix<>(asFraction(colMatrix)));
+ new 
Array2DRowFieldMatrix(asFraction(colMatrix)));
 Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(fractionCol),
- new Array2DRowFieldMatrix<>(fractionColMatrix));
+ new Array2DRowFieldMatrix(fractionColMatrix));
 
 try {
 MatrixUtils.createColumnFieldMatrix(new Fraction[] {});  // empty
@@ -268,7 +268,7 @@ public final class MatrixUtilsTest {
 { new BigFraction(2), new BigFraction(5), new BigFraction(3) },
 { new BigFraction(1), new BigFraction(0), new BigFraction(8) }
 };
-FieldMatrix m = new Array2DRowFieldMatrix<>(bfData, 
false);
+FieldMatrix m = new 
Array2DRowFieldMatrix(bfData, false);
 RealMatrix converted = MatrixUtils.bigFractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);
@@ -281,7 +281,7 @@ public final class MatrixUtilsTest {
 { new Fraction(2), new Fraction(5), new Fraction(3) },
 { new Fraction(1), new Fraction(0), new Fraction(8) }
 };
-FieldMatrix m = new Array2DRowFieldMatrix<>(fData, false);
+FieldMatrix m = new Array2DRowFieldMatrix(fData, 
false);
 RealMatrix converted = MatrixUtils.fractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
index 0266b30..176b227 100644
--- a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
@@ -209,7 +209,7 @@ public class SparseFieldMatrixTest {
 SparseFieldMatrix m2 = createSparseMatrix(testData2);
 assertClose("inverse multiply", m.multiply(mInv), identity,
 entryTolerance);
-assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), testDataInv)), identity,
+assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix(FractionField.getInstance(), testDataInv)), 
identity,
 entryTolerance);
 assertClose("inverse multiply", mInv.multiply(m), identity,

[04/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
index 57c9cb7..00dde9d 100644
--- a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
@@ -167,8 +167,8 @@ public final class BlockFieldMatrixTest {
 /** test dimensions */
 @Test
 public void testDimensions() {
-BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
-BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
+BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
+BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
 Assert.assertEquals("testData row dimension",3,m.getRowDimension());
 Assert.assertEquals("testData column 
dimension",3,m.getColumnDimension());
 Assert.assertTrue("testData is square",m.isSquare());
@@ -182,18 +182,18 @@ public final class BlockFieldMatrixTest {
 public void testCopyFunctions() {
 Random r = new Random(66636328996002l);
 BlockFieldMatrix m1 = createRandomMatrix(r, 47, 83);
-BlockFieldMatrix m2 = new BlockFieldMatrix<>(m1.getData());
+BlockFieldMatrix m2 = new 
BlockFieldMatrix(m1.getData());
 Assert.assertEquals(m1, m2);
-BlockFieldMatrix m3 = new BlockFieldMatrix<>(testData);
-BlockFieldMatrix m4 = new BlockFieldMatrix<>(m3.getData());
+BlockFieldMatrix m3 = new 
BlockFieldMatrix(testData);
+BlockFieldMatrix m4 = new 
BlockFieldMatrix(m3.getData());
 Assert.assertEquals(m3, m4);
 }
 
 /** test add */
 @Test
 public void testAdd() {
-BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
-BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
+BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
+BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
 FieldMatrix mPlusMInv = m.add(mInv);
 Fraction[][] sumEntries = mPlusMInv.getData();
 for (int row = 0; row < m.getRowDimension(); row++) {
@@ -206,8 +206,8 @@ public final class BlockFieldMatrixTest {
 /** test add failure */
 @Test
 public void testAddFail() {
-BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
-BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
+BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
+BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
 try {
 m.add(m2);
 Assert.fail("MathIllegalArgumentException expected");
@@ -219,11 +219,11 @@ public final class BlockFieldMatrixTest {
  /** test m-n = m + -n */
 @Test
 public void testPlusMinus() {
-BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
-BlockFieldMatrix m2 = new BlockFieldMatrix<>(testDataInv);
+BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
+BlockFieldMatrix m2 = new 
BlockFieldMatrix(testDataInv);
 TestUtils.assertEquals(m.subtract(m2), m2.scalarMultiply(new 
Fraction(-1)).add(m));
 try {
-m.subtract(new BlockFieldMatrix<>(testData2));
+m.subtract(new BlockFieldMatrix(testData2));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // ignored
@@ -233,17 +233,17 @@ public final class BlockFieldMatrixTest {
 /** test multiply */
 @Test
 public void testMultiply() {
-BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
-BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
-BlockFieldMatrix identity = new BlockFieldMatrix<>(id);
-BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
+BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
+BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix identity = new 
BlockFieldMatrix(id);
+BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
 TestUtils.assertEquals(m.multiply(mInv), identity);
 TestUtils.assertEquals(mInv.multiply(m), identity);
 TestUtils.assertEquals(m.multiply(identity), m);
 TestUtils.assertEquals(identity.multiply(mInv), mInv);
 TestUtils.assertEquals(m2.multiply(identity), m2);
 try {
-m.multiply(new BlockFieldMatrix<>(bigSingular));
+m.multiply(new BlockFieldMatrix(bigSingular));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // expected
@@ -253,7 +253,7 @@ public final class BlockFieldMatrixTest {
 @Test
 public void testSeveralBlocks() {
  

[07/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
index feac005..b4b5357 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
@@ -103,7 +103,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 this.scalingH  = stepSize;
 this.reference = reference;
 this.scaled= scaled.clone();
-this.nordsieck = new Array2DRowFieldMatrix<>(nordsieck.getData(), 
false);
+this.nordsieck = new Array2DRowFieldMatrix(nordsieck.getData(), 
false);
 }
 
 /** Create a new instance.
@@ -121,7 +121,7 @@ class AdamsFieldStepInterpolator> extends Abstract

FieldODEStateAndDerivative newSoftPreviousState,

FieldODEStateAndDerivative newSoftCurrentState,
FieldEquationsMapper 
newMapper) {
-return new AdamsFieldStepInterpolator<>(scalingH, reference, scaled, 
nordsieck,
+return new AdamsFieldStepInterpolator(scalingH, reference, scaled, 
nordsieck,
  newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
@@ -181,7 +181,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 
estimatedDerivatives[j].add(scaled[j].multiply(normalizedAbscissa)).divide(x);
 }
 
-return new FieldODEStateAndDerivative<>(time, estimatedState, 
estimatedDerivatives);
+return new FieldODEStateAndDerivative(time, estimatedState, 
estimatedDerivatives);
 
 }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
index 72d4de2..c659cc0 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
@@ -284,8 +284,8 @@ public class AdamsMoultonFieldIntegrator> extends
 updateHighOrderDerivativesPhase2(predictedScaled, correctedScaled, 
predictedNordsieck);
 
 // discrete events handling
-stepEnd = new FieldODEStateAndDerivative<>(stepEnd.getTime(), 
predictedY, correctedYDot);
-setStepStart(acceptStep(new 
AdamsFieldStepInterpolator<>(getStepSize(), stepEnd,
+stepEnd = new FieldODEStateAndDerivative(stepEnd.getTime(), 
predictedY, correctedYDot);
+setStepStart(acceptStep(new 
AdamsFieldStepInterpolator(getStepSize(), stepEnd,
   
correctedScaled, predictedNordsieck, forward,
   
getStepStart(), stepEnd,
   
equations.getMapper()),

http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
index 7c2b872..c1e5bee 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
@@ -137,7 +137,8 @@ public class AdamsNordsieckFieldTransformer> {
 private static final Map,
AdamsNordsieckFieldTransformer>>> CACHE =
-new HashMap<>();
+new HashMap,
+ AdamsNordsieckFieldTransformer>>>();
 
 /** Field to which the time and state vector elements belong. */
 private final Field field;
@@ -161,11 +162,11 @@ public class AdamsNordsieckFieldTransformer> {
 // compute coefficients
 FieldMatrix bigP = buildP(rows);
 

[09/10] [math] Revert "Remove redundant type arguments."

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/6df150da/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
index be89ef4..2dc6933 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
@@ -374,9 +374,9 @@ public class FieldRotation> 
implements Serializabl
 public FieldRotation(final RotationOrder order, final RotationConvention 
convention,
  final T alpha1, final T alpha2, final T alpha3) {
 final T one = alpha1.getField().getOne();
-final FieldRotation r1 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA1()), alpha1, convention);
-final FieldRotation r2 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA2()), alpha2, convention);
-final FieldRotation r3 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA3()), alpha3, convention);
+final FieldRotation r1 = new FieldRotation(new 
FieldVector3D(one, order.getA1()), alpha1, convention);
+final FieldRotation r2 = new FieldRotation(new 
FieldVector3D(one, order.getA2()), alpha2, convention);
+final FieldRotation r3 = new FieldRotation(new 
FieldVector3D(one, order.getA3()), alpha3, convention);
 final FieldRotation composed = r1.compose(r2.compose(r3, 
convention), convention);
 q0 = composed.q0;
 q1 = composed.q1;
@@ -453,7 +453,7 @@ public class FieldRotation> 
implements Serializabl
  * of the instance
  */
 public FieldRotation revert() {
-return new FieldRotation<>(q0.negate(), q1, q2, q3, false);
+return new FieldRotation(q0.negate(), q1, q2, q3, false);
 }
 
 /** Get the scalar coordinate of the quaternion.
@@ -509,17 +509,17 @@ public class FieldRotation> 
implements Serializabl
 final T squaredSine = 
q1.multiply(q1).add(q2.multiply(q2)).add(q3.multiply(q3));
 if (squaredSine.getReal() == 0) {
 final Field field = squaredSine.getField();
-return new FieldVector3D<>(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
+return new FieldVector3D(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
 field.getZero(),
 field.getZero());
 } else {
 final double sgn = convention == 
RotationConvention.VECTOR_OPERATOR ? +1 : -1;
 if (q0.getReal() < 0) {
 T inverse = squaredSine.sqrt().reciprocal().multiply(sgn);
-return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 final T inverse = 
squaredSine.sqrt().reciprocal().negate().multiply(sgn);
-return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 }
 
@@ -1032,7 +1032,7 @@ public class FieldRotation> 
implements Serializabl
  */
 private FieldVector3D vector(final double x, final double y, final 
double z) {
 final T zero = q0.getField().getZero();
-return new FieldVector3D<>(zero.add(x), zero.add(y), zero.add(z));
+return new FieldVector3D(zero.add(x), zero.add(y), zero.add(z));
 }
 
 /** Get the 3X3 matrix corresponding to the instance
@@ -1090,7 +1090,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 
FieldVector3D<>(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
+return new 
FieldVector3D(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
 
q0.multiply(y.multiply(q0).subtract(q3.multiply(x).subtract(q1.multiply(z.add(s.multiply(q2)).multiply(2).subtract(y),
 
q0.multiply(z.multiply(q0).subtract(q1.multiply(y).subtract(q2.multiply(x.add(s.multiply(q3)).multiply(2).subtract(z));
 
@@ -1108,7 +1108,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 

[lang] PMD: These nested if statements could be combined

2016-09-20 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master 31d02f680 -> db6f7c1d7


PMD: These nested if statements could be combined


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/db6f7c1d
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/db6f7c1d
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/db6f7c1d

Branch: refs/heads/master
Commit: db6f7c1d74ba64211221a69cfa9fe7171a9199e8
Parents: 31d02f6
Author: Benedikt Ritter 
Authored: Tue Sep 20 18:01:10 2016 +0200
Committer: Benedikt Ritter 
Committed: Tue Sep 20 18:01:10 2016 +0200

--
 .../java/org/apache/commons/lang3/time/FastDateParser.java   | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/db6f7c1d/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
--
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java 
b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
index 8275ddf..f52008d 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
@@ -242,11 +242,9 @@ public class FastDateParser implements DateParser, 
Serializable {
 char c = pattern.charAt(currentIdx);
 if (!activeQuote && isFormatLetter(c)) {
 break;
-} else if (c == '\'') {
-if (++currentIdx == pattern.length() || 
pattern.charAt(currentIdx) != '\'') {
-activeQuote = !activeQuote;
-continue;
-}
+} else if (c == '\'' && (++currentIdx == pattern.length() || 
pattern.charAt(currentIdx) != '\'')) {
+activeQuote = !activeQuote;
+continue;
 }
 ++currentIdx;
 sb.append(c);



[lang] Correct JavaDoc @param tags

2016-09-20 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master 9c5b6cdc7 -> 31d02f680


Correct JavaDoc @param tags


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/31d02f68
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/31d02f68
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/31d02f68

Branch: refs/heads/master
Commit: 31d02f6806e4d2e9ca86706af33acca334bf2eef
Parents: 9c5b6cd
Author: Benedikt Ritter 
Authored: Tue Sep 20 17:55:42 2016 +0200
Committer: Benedikt Ritter 
Committed: Tue Sep 20 17:55:42 2016 +0200

--
 src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/31d02f68/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java 
b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
index 0131e03..c48a0a0 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
@@ -142,8 +142,7 @@ abstract class MemberUtils {
  * Returns the sum of the object transformation cost for each class in the
  * source argument list.
  * @param srcArgs The source arguments
- * @param destArgs The destination arguments
- * @param isVarArgs True if the destination arguments are for a varags 
methods
+ * @param executable The executable to calculate transformation costs for
  * @return The total transformation cost
  */
 private static float getTotalTransformationCost(final Class[] srcArgs, 
final Executable executable) {



[Math] Change on branch "master": Commons Math MasterBranch - Build # 10 - Successful

2016-09-20 Thread Apache Jenkins Server
The Apache Jenkins build system has built Commons Math MasterBranch (build #10)

Status: Successful

Check console output at 
https://builds.apache.org/job/Commons%20Math%20MasterBranch/10/ to view the 
results.

svn commit: r1761530 - /commons/trunks-proper/

2016-09-20 Thread markt
Author: markt
Date: Tue Sep 20 06:50:53 2016
New Revision: 1761530

URL: http://svn.apache.org/viewvc?rev=1761530=rev
Log:
Remove external for IO post Git move

Modified:
commons/trunks-proper/   (props changed)

Propchange: commons/trunks-proper/
--
--- svn:externals (original)
+++ svn:externals Tue Sep 20 06:50:53 2016
@@ -21,7 +21,6 @@ https://svn.apache.org/repos/asf/commons
 https://svn.apache.org/repos/asf/commons/proper/exec/trunk exec
 https://svn.apache.org/repos/asf/commons/proper/functor/trunk functor
 https://svn.apache.org/repos/asf/commons/proper/imaging/trunk imaging
-https://svn.apache.org/repos/asf/commons/proper/io/trunk io
 https://svn.apache.org/repos/asf/commons/proper/jci/trunk jci
 https://svn.apache.org/repos/asf/commons/proper/jcs/trunk jcs
 https://svn.apache.org/repos/asf/commons/proper/jelly/trunk jelly




[07/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
index b4b5357..feac005 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsFieldStepInterpolator.java
@@ -103,7 +103,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 this.scalingH  = stepSize;
 this.reference = reference;
 this.scaled= scaled.clone();
-this.nordsieck = new Array2DRowFieldMatrix(nordsieck.getData(), 
false);
+this.nordsieck = new Array2DRowFieldMatrix<>(nordsieck.getData(), 
false);
 }
 
 /** Create a new instance.
@@ -121,7 +121,7 @@ class AdamsFieldStepInterpolator> extends Abstract

FieldODEStateAndDerivative newSoftPreviousState,

FieldODEStateAndDerivative newSoftCurrentState,
FieldEquationsMapper 
newMapper) {
-return new AdamsFieldStepInterpolator(scalingH, reference, scaled, 
nordsieck,
+return new AdamsFieldStepInterpolator<>(scalingH, reference, scaled, 
nordsieck,
  newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
@@ -181,7 +181,7 @@ class AdamsFieldStepInterpolator> extends Abstract
 
estimatedDerivatives[j].add(scaled[j].multiply(normalizedAbscissa)).divide(x);
 }
 
-return new FieldODEStateAndDerivative(time, estimatedState, 
estimatedDerivatives);
+return new FieldODEStateAndDerivative<>(time, estimatedState, 
estimatedDerivatives);
 
 }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
index c659cc0..72d4de2 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsMoultonFieldIntegrator.java
@@ -284,8 +284,8 @@ public class AdamsMoultonFieldIntegrator> extends
 updateHighOrderDerivativesPhase2(predictedScaled, correctedScaled, 
predictedNordsieck);
 
 // discrete events handling
-stepEnd = new FieldODEStateAndDerivative(stepEnd.getTime(), 
predictedY, correctedYDot);
-setStepStart(acceptStep(new 
AdamsFieldStepInterpolator(getStepSize(), stepEnd,
+stepEnd = new FieldODEStateAndDerivative<>(stepEnd.getTime(), 
predictedY, correctedYDot);
+setStepStart(acceptStep(new 
AdamsFieldStepInterpolator<>(getStepSize(), stepEnd,
   
correctedScaled, predictedNordsieck, forward,
   
getStepStart(), stepEnd,
   
equations.getMapper()),

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
index c1e5bee..7c2b872 100644
--- 
a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
+++ 
b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdamsNordsieckFieldTransformer.java
@@ -137,8 +137,7 @@ public class AdamsNordsieckFieldTransformer> {
 private static final Map,
AdamsNordsieckFieldTransformer>>> CACHE =
-new HashMap,
- AdamsNordsieckFieldTransformer>>>();
+new HashMap<>();
 
 /** Field to which the time and state vector elements belong. */
 private final Field field;
@@ -162,11 +161,11 @@ public class AdamsNordsieckFieldTransformer> {
 // compute coefficients
 FieldMatrix bigP = buildP(rows);
 

[02/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
index d79a19f..80b6828 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/AbstractRungeKuttaFieldIntegratorTest.java
@@ -151,8 +151,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 y0[i] = field.getOne().add(i);
 }
 
-FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE(ode),
-new 
FieldODEState(t0, y0),
+FieldODEStateAndDerivative result = integrator.integrate(new 
FieldExpandableODE<>(ode),
+new 
FieldODEState<>(t0, y0),
 tEvent);
 Assert.assertEquals(tEvent.getReal(), result.getTime().getReal(), 
epsilonT);
 T[] y = result.getState();
@@ -180,8 +180,8 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 return Action.CONTINUE;
 }
 }, Double.POSITIVE_INFINITY, 1.0e-20, 100);
-result = integrator.integrate(new FieldExpandableODE(ode),
-  new FieldODEState(t0, y0),
+result = integrator.integrate(new FieldExpandableODE<>(ode),
+  new FieldODEState<>(t0, y0),
   tEvent.add(120));
 Assert.assertEquals(tEvent.add(120).getReal(), 
result.getTime().getReal(), epsilonT);
 y = result.getState();
@@ -201,17 +201,17 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
MaxCountExceededException, NoBracketingException {
 RungeKuttaFieldIntegrator integrator = createIntegrator(field, 
field.getZero().add(0.01));
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1(field);
-integrator.integrate(new FieldExpandableODE(pb),
- new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
+TestFieldProblem1 pb = new TestFieldProblem1<>(field);
+integrator.integrate(new FieldExpandableODE<>(pb),
+ new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension() + 10)),
  field.getOne());
 Assert.fail("an exception should have been thrown");
 } catch(DimensionMismatchException ie) {
 }
 try  {
-TestFieldProblem1 pb = new TestFieldProblem1(field);
-integrator.integrate(new FieldExpandableODE(pb),
- new FieldODEState(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
+TestFieldProblem1 pb = new TestFieldProblem1<>(field);
+integrator.integrate(new FieldExpandableODE<>(pb),
+ new FieldODEState<>(field.getZero(), 
MathArrays.buildArray(field, pb.getDimension())),
  field.getZero());
 Assert.fail("an exception should have been thrown");
 } catch(NumberIsTooSmallException ie) {
@@ -231,12 +231,12 @@ public abstract class 
AbstractRungeKuttaFieldIntegratorTest {
 @SuppressWarnings("unchecked")
 TestFieldProblemAbstract[] allProblems =
 (TestFieldProblemAbstract[]) 
Array.newInstance(TestFieldProblemAbstract.class, 6);
-allProblems[0] = new TestFieldProblem1(field);
-allProblems[1] = new TestFieldProblem2(field);
-allProblems[2] = new TestFieldProblem3(field);
-allProblems[3] = new TestFieldProblem4(field);
-allProblems[4] = new TestFieldProblem5(field);
-allProblems[5] = new TestFieldProblem6(field);
+allProblems[0] = new TestFieldProblem1<>(field);
+allProblems[1] = new TestFieldProblem2<>(field);
+allProblems[2] = new TestFieldProblem3<>(field);
+allProblems[3] = new TestFieldProblem4<>(field);
+allProblems[4] = new TestFieldProblem5<>(field);
+allProblems[5] = new TestFieldProblem6<>(field);
 for (TestFieldProblemAbstract pb :  allProblems) {
 
 T previousValueError = null;
@@ -246,7 +246,7 @@ public abstract class AbstractRungeKuttaFieldIntegratorTest 
{
 T step = 
pb.getFinalTime().subtract(pb.getInitialState().getTime()).multiply(FastMath.pow(2.0,
 -i));
 
 

[04/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
index 00dde9d..57c9cb7 100644
--- a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
@@ -167,8 +167,8 @@ public final class BlockFieldMatrixTest {
 /** test dimensions */
 @Test
 public void testDimensions() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 Assert.assertEquals("testData row dimension",3,m.getRowDimension());
 Assert.assertEquals("testData column 
dimension",3,m.getColumnDimension());
 Assert.assertTrue("testData is square",m.isSquare());
@@ -182,18 +182,18 @@ public final class BlockFieldMatrixTest {
 public void testCopyFunctions() {
 Random r = new Random(66636328996002l);
 BlockFieldMatrix m1 = createRandomMatrix(r, 47, 83);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(m1.getData());
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(m1.getData());
 Assert.assertEquals(m1, m2);
-BlockFieldMatrix m3 = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m4 = new 
BlockFieldMatrix(m3.getData());
+BlockFieldMatrix m3 = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m4 = new BlockFieldMatrix<>(m3.getData());
 Assert.assertEquals(m3, m4);
 }
 
 /** test add */
 @Test
 public void testAdd() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
 FieldMatrix mPlusMInv = m.add(mInv);
 Fraction[][] sumEntries = mPlusMInv.getData();
 for (int row = 0; row < m.getRowDimension(); row++) {
@@ -206,8 +206,8 @@ public final class BlockFieldMatrixTest {
 /** test add failure */
 @Test
 public void testAddFail() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 try {
 m.add(m2);
 Assert.fail("MathIllegalArgumentException expected");
@@ -219,11 +219,11 @@ public final class BlockFieldMatrixTest {
  /** test m-n = m + -n */
 @Test
 public void testPlusMinus() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testDataInv);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testDataInv);
 TestUtils.assertEquals(m.subtract(m2), m2.scalarMultiply(new 
Fraction(-1)).add(m));
 try {
-m.subtract(new BlockFieldMatrix(testData2));
+m.subtract(new BlockFieldMatrix<>(testData2));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // ignored
@@ -233,17 +233,17 @@ public final class BlockFieldMatrixTest {
 /** test multiply */
 @Test
 public void testMultiply() {
-BlockFieldMatrix m = new 
BlockFieldMatrix(testData);
-BlockFieldMatrix mInv = new 
BlockFieldMatrix(testDataInv);
-BlockFieldMatrix identity = new 
BlockFieldMatrix(id);
-BlockFieldMatrix m2 = new 
BlockFieldMatrix(testData2);
+BlockFieldMatrix m = new BlockFieldMatrix<>(testData);
+BlockFieldMatrix mInv = new BlockFieldMatrix<>(testDataInv);
+BlockFieldMatrix identity = new BlockFieldMatrix<>(id);
+BlockFieldMatrix m2 = new BlockFieldMatrix<>(testData2);
 TestUtils.assertEquals(m.multiply(mInv), identity);
 TestUtils.assertEquals(mInv.multiply(m), identity);
 TestUtils.assertEquals(m.multiply(identity), m);
 TestUtils.assertEquals(identity.multiply(mInv), mInv);
 TestUtils.assertEquals(m2.multiply(identity), m2);
 try {
-m.multiply(new BlockFieldMatrix(bigSingular));
+m.multiply(new BlockFieldMatrix<>(bigSingular));
 Assert.fail("Expecting illegalArgumentException");
 } catch (MathIllegalArgumentException ex) {
 // expected
@@ -253,7 +253,7 @@ public final class BlockFieldMatrixTest {
 @Test
 public void testSeveralBlocks() {
  

[08/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
index e84bf58..6d4d980 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/spherical/twod/SphericalPolygonsSet.java
@@ -59,7 +59,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
  * @param tolerance below which points are consider to be identical
  */
 public SphericalPolygonsSet(final Vector3D pole, final double tolerance) {
-super(new BSPTree(new Circle(pole, 
tolerance).wholeHyperplane(),
+super(new BSPTree<>(new Circle(pole, tolerance).wholeHyperplane(),
 new BSPTree(Boolean.FALSE),
 new BSPTree(Boolean.TRUE),
 null),
@@ -198,7 +198,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 final int n = vertices.length;
 if (n == 0) {
 // the tree represents the whole space
-return new BSPTree(Boolean.TRUE);
+return new BSPTree<>(Boolean.TRUE);
 }
 
 // build the vertices
@@ -208,7 +208,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the edges
-List edges = new ArrayList(n);
+List edges = new ArrayList<>(n);
 Vertex end = vArray[n - 1];
 for (int i = 0; i < n; ++i) {
 
@@ -241,7 +241,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 }
 
 // build the tree top-down
-final BSPTree tree = new BSPTree();
+final BSPTree tree = new BSPTree<>();
 insertEdges(hyperplaneThickness, tree, edges);
 
 return tree;
@@ -284,8 +284,8 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // we have split the node by inserting an edge as a cut sub-hyperplane
 // distribute the remaining edges in the two sub-trees
-final List outsideList = new ArrayList();
-final List insideList  = new ArrayList();
+final List outsideList = new ArrayList<>();
+final List insideList  = new ArrayList<>();
 for (final Edge edge : edges) {
 if (edge != inserted) {
 edge.split(inserted.getCircle(), outsideList, insideList);
@@ -384,7 +384,7 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 
 // convert the list of all edges into a list of start vertices
-loops = new ArrayList();
+loops = new ArrayList<>();
 while (!edges.isEmpty()) {
 
 // this is an edge belonging to a new loop, store it
@@ -468,10 +468,10 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 
 // handle special cases first
 if (isEmpty()) {
-return new EnclosingBall(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
+return new EnclosingBall<>(S2Point.PLUS_K, 
Double.NEGATIVE_INFINITY);
 }
 if (isFull()) {
-return new EnclosingBall(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
+return new EnclosingBall<>(S2Point.PLUS_K, 
Double.POSITIVE_INFINITY);
 }
 
 // as the polygons is neither empty nor full, it has some boundaries 
and cut hyperplanes
@@ -479,13 +479,13 @@ public class SphericalPolygonsSet extends 
AbstractRegion {
 if (isEmpty(root.getMinus()) && isFull(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall(new 
S2Point(circle.getPole()).negate(),
+return new EnclosingBall<>(new S2Point(circle.getPole()).negate(),
 0.5 * FastMath.PI);
 }
 if (isFull(root.getMinus()) && isEmpty(root.getPlus())) {
 // the polygon covers an hemisphere, and its boundary is one 2π 
long edge
 final Circle circle = (Circle) root.getCut().getHyperplane();
-return new EnclosingBall(new 
S2Point(circle.getPole()),
+return new EnclosingBall<>(new S2Point(circle.getPole()),
 0.5 * FastMath.PI);
 }
 
@@ -505,7 +505,7 @@ public 

[10/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
Remove redundant type arguments.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/8b5f4535
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/8b5f4535
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/8b5f4535

Branch: refs/heads/master
Commit: 8b5f4535ec5a3983e655e5fc66a90fce657d4344
Parents: 598edc1
Author: Gary Gregory 
Authored: Mon Sep 19 23:40:15 2016 -0700
Committer: Gary Gregory 
Committed: Mon Sep 19 23:40:15 2016 -0700

--
 .../analysis/differentiation/DSCompiler.java|  10 +-
 .../differentiation/SparseGradient.java |   4 +-
 .../integration/gauss/BaseRuleFactory.java  |   8 +-
 .../gauss/GaussIntegratorFactory.java   |   2 +-
 .../integration/gauss/HermiteRuleFactory.java   |   4 +-
 .../gauss/LegendreHighPrecisionRuleFactory.java |   4 +-
 .../integration/gauss/LegendreRuleFactory.java  |   4 +-
 .../interpolation/FieldHermiteInterpolator.java |   6 +-
 .../interpolation/HermiteInterpolator.java  |   6 +-
 .../interpolation/InterpolatingMicrosphere.java |   6 +-
 .../analysis/polynomials/PolynomialsUtils.java  |  12 +-
 .../apache/commons/math4/complex/Complex.java   |   2 +-
 .../distribution/EnumeratedDistribution.java|   6 +-
 .../EnumeratedIntegerDistribution.java  |  10 +-
 .../EnumeratedRealDistribution.java |  10 +-
 .../MixtureMultivariateNormalDistribution.java  |   4 +-
 .../MixtureMultivariateRealDistribution.java|   6 +-
 ...ateNormalMixtureExpectationMaximization.java |   4 +-
 .../commons/math4/exception/util/ArgUtils.java  |   2 +-
 .../math4/exception/util/ExceptionContext.java  |  12 +-
 .../math4/fitting/GaussianCurveFitter.java  |   2 +-
 .../math4/fitting/HarmonicCurveFitter.java  |   2 +-
 .../math4/fitting/WeightedObservedPoints.java   |   4 +-
 .../leastsquares/GaussNewtonOptimizer.java  |   2 +-
 .../leastsquares/LeastSquaresFactory.java   |   2 +-
 .../math4/genetics/AbstractListChromosome.java  |   2 +-
 .../math4/genetics/BinaryChromosome.java|   2 +-
 .../commons/math4/genetics/BinaryMutation.java  |   2 +-
 .../commons/math4/genetics/CycleCrossover.java  |   8 +-
 .../commons/math4/genetics/ListPopulation.java  |   2 +-
 .../commons/math4/genetics/NPointCrossover.java |   4 +-
 .../math4/genetics/OnePointCrossover.java   |   4 +-
 .../math4/genetics/OrderedCrossover.java|   8 +-
 .../commons/math4/genetics/RandomKey.java   |  16 +-
 .../math4/genetics/RandomKeyMutation.java   |   2 +-
 .../math4/genetics/TournamentSelection.java |   2 +-
 .../math4/genetics/UniformCrossover.java|   4 +-
 .../math4/geometry/enclosing/WelzlEncloser.java |   4 +-
 .../geometry/euclidean/oned/IntervalsSet.java   |  22 +-
 .../euclidean/oned/SubOrientedPoint.java|   6 +-
 .../euclidean/threed/FieldRotation.java |  40 ++--
 .../euclidean/threed/FieldVector3D.java |  42 ++--
 .../euclidean/threed/OutlineExtractor.java  |   2 +-
 .../euclidean/threed/PolyhedronsSet.java|   4 +-
 .../euclidean/threed/SphereGenerator.java   |  10 +-
 .../geometry/euclidean/threed/SubLine.java  |   2 +-
 .../geometry/euclidean/threed/SubPlane.java |  12 +-
 .../geometry/euclidean/twod/DiskGenerator.java  |   8 +-
 .../geometry/euclidean/twod/NestedLoops.java|   8 +-
 .../geometry/euclidean/twod/PolygonsSet.java|  18 +-
 .../math4/geometry/euclidean/twod/SubLine.java  |  14 +-
 .../twod/hull/AklToussaintHeuristic.java|   4 +-
 .../euclidean/twod/hull/ConvexHull2D.java   |   2 +-
 .../euclidean/twod/hull/MonotoneChain.java  |   8 +-
 .../geometry/partitioning/AbstractRegion.java   |  26 +--
 .../partitioning/AbstractSubHyperplane.java |   8 +-
 .../math4/geometry/partitioning/BSPTree.java|  34 +--
 .../geometry/partitioning/BoundaryBuilder.java  |  12 +-
 .../partitioning/BoundaryProjector.java |   4 +-
 .../geometry/partitioning/Characterization.java |   4 +-
 .../math4/geometry/partitioning/NodesSet.java   |   2 +-
 .../geometry/partitioning/RegionFactory.java|  14 +-
 .../math4/geometry/spherical/oned/ArcsSet.java  |  36 +--
 .../geometry/spherical/oned/SubLimitAngle.java  |   4 +-
 .../geometry/spherical/twod/EdgesBuilder.java   |   6 +-
 .../spherical/twod/PropertiesComputer.java  |   2 +-
 .../spherical/twod/SphericalPolygonsSet.java|  30 +--
 .../geometry/spherical/twod/SubCircle.java  |   4 +-
 .../math4/geometry/spherical/twod/Vertex.java   |   2 +-
 .../math4/linear/AbstractFieldMatrix.java   |  16 +-
 .../math4/linear/AbstractRealMatrix.java|   2 +-
 .../math4/linear/Array2DRowFieldMatrix.java |  10 +-
 .../commons/math4/linear/ArrayFieldVector.java  |  40 ++--
 .../commons/math4/linear/BlockFieldMatrix.java  |  32 +--
 

[01/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
Repository: commons-math
Updated Branches:
  refs/heads/master 598edc127 -> 8b5f4535e


http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
index 86ed2f9..601a32f 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesFieldStepInterpolatorTest.java
@@ -34,7 +34,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
FieldODEStateAndDerivative softPreviousState,
FieldODEStateAndDerivative softCurrentState,
FieldEquationsMapper mapper) {
-return new ThreeEighthesFieldStepInterpolator(field, forward, yDotK,
+return new ThreeEighthesFieldStepInterpolator<>(field, forward, yDotK,
  globalPreviousState, 
globalCurrentState,
  softPreviousState, 
softCurrentState,
  mapper);
@@ -42,7 +42,7 @@ public class ThreeEighthesFieldStepInterpolatorTest extends 
RungeKuttaFieldStepI
 
 protected > FieldButcherArrayProvider
 createButcherArrayProvider(final Field field) {
-return new ThreeEighthesFieldIntegrator(field, field.getOne());
+return new ThreeEighthesFieldIntegrator<>(field, field.getOne());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
index f546745..cda8f2c 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/DummyFieldStepInterpolator.java
@@ -40,7 +40,7 @@ public class DummyFieldStepInterpolator>
   final 
FieldODEStateAndDerivative newSoftPreviousState,
   final 
FieldODEStateAndDerivative newSoftCurrentState,
   final 
FieldEquationsMapper newMapper) {
-return new DummyFieldStepInterpolator(newForward,
+return new DummyFieldStepInterpolator<>(newForward,
  newGlobalPreviousState, 
newGlobalCurrentState,
  newSoftPreviousState, 
newSoftCurrentState,
  newMapper);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
index 5c592d3..d3d5fca 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepInterpolatorTestUtils.java
@@ -137,7 +137,7 @@ public class StepInterpolatorTestUtils {
 
 });
 
-integrator.integrate(new FieldExpandableODE(problem), 
problem.getInitialState(), problem.getFinalTime());
+integrator.integrate(new FieldExpandableODE<>(problem), 
problem.getInitialState(), problem.getFinalTime());
 
 }
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
index 1955321..6f6bfbe 100644
--- 
a/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
+++ 
b/src/test/java/org/apache/commons/math4/ode/sampling/StepNormalizerOutputTestBase.java
@@ -255,7 +255,7 @@ public abstract class StepNormalizerOutputTestBase
 double[] y   = {0.0};
 double start = reverse ? getEnd()   : getStart();
 double end   = reverse ? getStart() : 

[05/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
index 24e5515..758e870 100644
--- 
a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
+++ 
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/FieldVector3DTest.java
@@ -41,8 +41,8 @@ public class FieldVector3DTest {
 double sinAlpha = FastMath.sqrt(3) / 2.0;
 double cosDelta = FastMath.sqrt(2) / 2.0;
 double sinDelta = -FastMath.sqrt(2) / 2.0;
-FieldVector3D u = new 
FieldVector3D(2,
-new FieldVector3D(new 
DerivativeStructure(2, 1, 0,  FastMath.PI / 3),
+FieldVector3D u = new FieldVector3D<>(2,
+new FieldVector3D<>(new DerivativeStructure(2, 1, 0,  
FastMath.PI / 3),
 new DerivativeStructure(2, 1, 1, -FastMath.PI / 4)));
 checkVector(u, 2 * cosAlpha * cosDelta, 2 * sinAlpha * cosDelta, 2 * 
sinDelta);
 Assert.assertEquals(-2 * sinAlpha * cosDelta, 
u.getX().getPartialDerivative(1, 0), 1.0e-12);
@@ -52,41 +52,41 @@ public class FieldVector3DTest {
 Assert.assertEquals(-2 * sinAlpha * sinDelta, 
u.getY().getPartialDerivative(0, 1), 1.0e-12);
 Assert.assertEquals(2 * cosDelta, 
u.getZ().getPartialDerivative(0, 1), 1.0e-12);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3)),
+checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3)),
2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4)),
2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 
0);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0)),
2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
0);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0,  0, 3),
+checkVector(new FieldVector3D<>(2, createVector(1, 0,  0, 3),
-3, createVector(0, 0, -1, 3)),
2, 0, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 0, 3, -1, 0, 0, 1, 0, -1, 0, 0, 0, 0, 
-1, -1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3, -3.0),
new Vector3D(0, 0, -1)),
2, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
-1);
 
-checkVector(new FieldVector3D(2, createVector(1, 
0, 0, 3),
+checkVector(new FieldVector3D<>(2, createVector(1, 0, 0, 3),
5, createVector(0, 1, 0, 3),
-3, createVector(0, 0, -1, 3)),
2, 5, 3, 4, 0, 0, 0, 4, 0, 0, 0, 4);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
createVector(1, 0,  0, 4),
new DerivativeStructure(4, 1, 3,  5.0),
createVector(0, 1,  0, 4),
new DerivativeStructure(4, 1, 3, -3.0),
createVector(0, 0, -1, 4)),
2, 5, 3, 4, 0, 0, 1, 0, 4, 0, 1, 0, 0, 4, 
-1);
-checkVector(new FieldVector3D(new 
DerivativeStructure(4, 1, 3,  2.0),
+checkVector(new FieldVector3D<>(new DerivativeStructure(4, 1, 3,  2.0),
new Vector3D(1, 0,  0),
new DerivativeStructure(4, 1, 3,  5.0),
new Vector3D(0, 1,  0),
@@ -94,12 +94,12 @@ public class 

[09/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
index 2dc6933..be89ef4 100644
--- 
a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
+++ 
b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/FieldRotation.java
@@ -374,9 +374,9 @@ public class FieldRotation> 
implements Serializabl
 public FieldRotation(final RotationOrder order, final RotationConvention 
convention,
  final T alpha1, final T alpha2, final T alpha3) {
 final T one = alpha1.getField().getOne();
-final FieldRotation r1 = new FieldRotation(new 
FieldVector3D(one, order.getA1()), alpha1, convention);
-final FieldRotation r2 = new FieldRotation(new 
FieldVector3D(one, order.getA2()), alpha2, convention);
-final FieldRotation r3 = new FieldRotation(new 
FieldVector3D(one, order.getA3()), alpha3, convention);
+final FieldRotation r1 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA1()), alpha1, convention);
+final FieldRotation r2 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA2()), alpha2, convention);
+final FieldRotation r3 = new FieldRotation<>(new 
FieldVector3D<>(one, order.getA3()), alpha3, convention);
 final FieldRotation composed = r1.compose(r2.compose(r3, 
convention), convention);
 q0 = composed.q0;
 q1 = composed.q1;
@@ -453,7 +453,7 @@ public class FieldRotation> 
implements Serializabl
  * of the instance
  */
 public FieldRotation revert() {
-return new FieldRotation(q0.negate(), q1, q2, q3, false);
+return new FieldRotation<>(q0.negate(), q1, q2, q3, false);
 }
 
 /** Get the scalar coordinate of the quaternion.
@@ -509,17 +509,17 @@ public class FieldRotation> 
implements Serializabl
 final T squaredSine = 
q1.multiply(q1).add(q2.multiply(q2)).add(q3.multiply(q3));
 if (squaredSine.getReal() == 0) {
 final Field field = squaredSine.getField();
-return new FieldVector3D(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
+return new FieldVector3D<>(convention == 
RotationConvention.VECTOR_OPERATOR ? field.getOne(): field.getOne().negate(),
 field.getZero(),
 field.getZero());
 } else {
 final double sgn = convention == 
RotationConvention.VECTOR_OPERATOR ? +1 : -1;
 if (q0.getReal() < 0) {
 T inverse = squaredSine.sqrt().reciprocal().multiply(sgn);
-return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 final T inverse = 
squaredSine.sqrt().reciprocal().negate().multiply(sgn);
-return new FieldVector3D(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
+return new FieldVector3D<>(q1.multiply(inverse), 
q2.multiply(inverse), q3.multiply(inverse));
 }
 }
 
@@ -1032,7 +1032,7 @@ public class FieldRotation> 
implements Serializabl
  */
 private FieldVector3D vector(final double x, final double y, final 
double z) {
 final T zero = q0.getField().getZero();
-return new FieldVector3D(zero.add(x), zero.add(y), zero.add(z));
+return new FieldVector3D<>(zero.add(x), zero.add(y), zero.add(z));
 }
 
 /** Get the 3X3 matrix corresponding to the instance
@@ -1090,7 +1090,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 
FieldVector3D(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
+return new 
FieldVector3D<>(q0.multiply(x.multiply(q0).subtract(q2.multiply(z).subtract(q3.multiply(y.add(s.multiply(q1)).multiply(2).subtract(x),
 
q0.multiply(y.multiply(q0).subtract(q3.multiply(x).subtract(q1.multiply(z.add(s.multiply(q2)).multiply(2).subtract(y),
 
q0.multiply(z.multiply(q0).subtract(q1.multiply(y).subtract(q2.multiply(x.add(s.multiply(q3)).multiply(2).subtract(z));
 
@@ -1108,7 +1108,7 @@ public class FieldRotation> 
implements Serializabl
 
 final T s = q1.multiply(x).add(q2.multiply(y)).add(q3.multiply(z));
 
-return new 

[06/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
index 17097f5..e3b1959 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/HarmonicCurveFitterTest.java
@@ -170,7 +170,7 @@ public class HarmonicCurveFitterTest {
  0, 1, 2, 3, 2, 1,
  0, -1, -2, -3, -2, -1,
  0, 1, 2, 3, 2, 1, 0 };
-final List points = new 
ArrayList();
+final List points = new ArrayList<>();
 for (int i = 0; i < y.length; i++) {
 points.add(new WeightedObservedPoint(1, i, y[i]));
 }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
index 377726d..016bf8b 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleProblem.java
@@ -57,7 +57,7 @@ class CircleProblem {
 public CircleProblem(double xError,
  double yError,
  int searchResolution) {
-points = new ArrayList();
+points = new ArrayList<>();
 xSigma = xError;
 ySigma = yError;
 resolution = searchResolution;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
index 3c88431..87a2b6f 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/CircleVectorial.java
@@ -29,7 +29,7 @@ class CircleVectorial {
 private ArrayList points;
 
 public CircleVectorial() {
-points  = new ArrayList();
+points  = new ArrayList<>();
 }
 
 public void addPoint(double px, double py) {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
index b34dcaf..bffb95b 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTest.java
@@ -262,7 +262,7 @@ public class EvaluationTest {
 // "MultivariateJacobianFunction".
 final MultivariateJacobianFunction m1 = new 
MultivariateJacobianFunction() {
 public Pair value(RealVector notUsed) {
-return new Pair(null, null);
+return new Pair<>(null, null);
 }
 };
 
@@ -276,7 +276,7 @@ public class EvaluationTest {
 
 final MultivariateJacobianFunction m2 = new ValueAndJacobianFunction() 
{
 public Pair value(RealVector notUsed) {
-return new Pair(null, null);
+return new Pair<>(null, null);
 }
 public RealVector computeValue(final double[] params) {
 return null;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
index 6642854..3c637ae 100644
--- 
a/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
+++ 
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/EvaluationTestValidation.java
@@ -232,7 +232,7 @@ public class EvaluationTestValidation {
   

[03/10] [math] Remove redundant type arguments.

2016-09-20 Thread ggregory
http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
--
diff --git a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java 
b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
index b547cdc..c8bd3f9 100644
--- a/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/MatrixUtilsTest.java
@@ -104,9 +104,9 @@ public final class MatrixUtilsTest {
 
 @Test
 public void testcreateFieldMatrix() {
-Assert.assertEquals(new 
Array2DRowFieldMatrix(asFraction(testData)),
+Assert.assertEquals(new Array2DRowFieldMatrix<>(asFraction(testData)),
  MatrixUtils.createFieldMatrix(asFraction(testData)));
-Assert.assertEquals(new 
Array2DRowFieldMatrix(FractionField.getInstance(), fractionColMatrix),
+Assert.assertEquals(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), fractionColMatrix),
  MatrixUtils.createFieldMatrix(fractionColMatrix));
 try {
 MatrixUtils.createFieldMatrix(asFraction(new double[][] {{1}, 
{1,2}}));  // ragged
@@ -149,9 +149,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateRowFieldMatrix() {
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(asFraction(row)),
- new 
Array2DRowFieldMatrix(asFraction(rowMatrix)));
+ new Array2DRowFieldMatrix<>(asFraction(rowMatrix)));
 Assert.assertEquals(MatrixUtils.createRowFieldMatrix(fractionRow),
- new Array2DRowFieldMatrix(fractionRowMatrix));
+ new Array2DRowFieldMatrix<>(fractionRowMatrix));
 try {
 MatrixUtils.createRowFieldMatrix(new Fraction[] {});  // empty
 Assert.fail("Expecting MathIllegalArgumentException");
@@ -187,9 +187,9 @@ public final class MatrixUtilsTest {
 @Test
 public void testCreateColumnFieldMatrix() {
 
Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(asFraction(col)),
- new 
Array2DRowFieldMatrix(asFraction(colMatrix)));
+ new Array2DRowFieldMatrix<>(asFraction(colMatrix)));
 Assert.assertEquals(MatrixUtils.createColumnFieldMatrix(fractionCol),
- new Array2DRowFieldMatrix(fractionColMatrix));
+ new Array2DRowFieldMatrix<>(fractionColMatrix));
 
 try {
 MatrixUtils.createColumnFieldMatrix(new Fraction[] {});  // empty
@@ -268,7 +268,7 @@ public final class MatrixUtilsTest {
 { new BigFraction(2), new BigFraction(5), new BigFraction(3) },
 { new BigFraction(1), new BigFraction(0), new BigFraction(8) }
 };
-FieldMatrix m = new 
Array2DRowFieldMatrix(bfData, false);
+FieldMatrix m = new Array2DRowFieldMatrix<>(bfData, 
false);
 RealMatrix converted = MatrixUtils.bigFractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);
@@ -281,7 +281,7 @@ public final class MatrixUtilsTest {
 { new Fraction(2), new Fraction(5), new Fraction(3) },
 { new Fraction(1), new Fraction(0), new Fraction(8) }
 };
-FieldMatrix m = new Array2DRowFieldMatrix(fData, 
false);
+FieldMatrix m = new Array2DRowFieldMatrix<>(fData, false);
 RealMatrix converted = MatrixUtils.fractionMatrixToRealMatrix(m);
 RealMatrix reference = new Array2DRowRealMatrix(testData, false);
 Assert.assertEquals(0.0, converted.subtract(reference).getNorm(), 0.0);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8b5f4535/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java 
b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
index 176b227..0266b30 100644
--- a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
@@ -209,7 +209,7 @@ public class SparseFieldMatrixTest {
 SparseFieldMatrix m2 = createSparseMatrix(testData2);
 assertClose("inverse multiply", m.multiply(mInv), identity,
 entryTolerance);
-assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix(FractionField.getInstance(), testDataInv)), 
identity,
+assertClose("inverse multiply", m.multiply(new 
Array2DRowFieldMatrix<>(FractionField.getInstance(), testDataInv)), identity,
 entryTolerance);
 assertClose("inverse multiply", mInv.multiply(m), identity,