commons-math.git
11 months agoSpurious "throws" clauses.
Gilles Sadowski [Tue, 28 Sep 2021 23:00:15 +0000 (01:00 +0200)] 
Spurious "throws" clauses.

11 months agoJavadoc.
Gilles Sadowski [Tue, 28 Sep 2021 19:08:37 +0000 (21:08 +0200)] 
Javadoc.

11 months agoUse "valueOf".
Gilles Sadowski [Tue, 28 Sep 2021 09:56:02 +0000 (11:56 +0200)] 
Use "valueOf".

Call to constructor is deprecated in Java 11.

11 months agoUpdated tests to use factory constructors for Statistics distributions
aherbert [Wed, 13 Oct 2021 13:20:47 +0000 (14:20 +0100)] 
Updated tests to use factory constructors for Statistics distributions

11 months agoUpdated SpotBugs 3.1.8 to 4.3.0 to allow building on JDK 17.
aherbert [Wed, 13 Oct 2021 13:09:08 +0000 (14:09 +0100)] 
Updated SpotBugs 3.1.8 to 4.3.0 to allow building on JDK 17.

A generic exclusion has been added to allow the build to pass.

11 months agoUpdated to use factory constructors for Statistics distributions
aherbert [Wed, 13 Oct 2021 13:01:08 +0000 (14:01 +0100)] 
Updated to use factory constructors for Statistics distributions

12 months agoMATH-1462: Extend workaround for bins that contain up to 3 values.
Gilles Sadowski [Sun, 26 Sep 2021 23:02:54 +0000 (01:02 +0200)] 
MATH-1462: Extend workaround for bins that contain up to 3 values.

12 months agoMATH-1462: Reproduce the infinite quantile bug
Maciej Kwidzinski [Fri, 17 Sep 2021 11:58:19 +0000 (13:58 +0200)] 
MATH-1462: Reproduce the infinite quantile bug

12 months agoJavadoc.
Gilles Sadowski [Sat, 18 Sep 2021 01:05:51 +0000 (03:05 +0200)] 
Javadoc.

12 months agoUpgrade dependency.
Gilles Sadowski [Tue, 14 Sep 2021 11:34:44 +0000 (13:34 +0200)] 
Upgrade dependency.

12 months agoPMD.
Gilles Sadowski [Wed, 1 Sep 2021 11:36:40 +0000 (13:36 +0200)] 
PMD.

12 months agoRelax tolerance (unit tests).
Gilles Sadowski [Wed, 1 Sep 2021 11:34:56 +0000 (13:34 +0200)] 
Relax tolerance (unit tests).

12 months agoSpurious "throws" clauses.
Gilles Sadowski [Wed, 1 Sep 2021 09:25:20 +0000 (11:25 +0200)] 
Spurious "throws" clauses.

12 months agoReplace algorithm used in "best list" search.
Gilles Sadowski [Wed, 1 Sep 2021 01:43:05 +0000 (03:43 +0200)] 
Replace algorithm used in "best list" search.

Although efficient in terms of evaluations, "NelderMeadTransform" fails for
some higher-dimensional test functions.

13 months agoUpgrade dependency.
Gilles Sadowski [Sat, 28 Aug 2021 01:19:57 +0000 (03:19 +0200)] 
Upgrade dependency.

13 months agoUnused "import".
Gilles Sadowski [Fri, 27 Aug 2021 18:58:27 +0000 (20:58 +0200)] 
Unused "import".

13 months agoRemove obsolete helper class for unit testing.
Gilles Sadowski [Fri, 27 Aug 2021 17:16:03 +0000 (19:16 +0200)] 
Remove obsolete helper class for unit testing.

Retries are handled by the "surefire" plugin.

13 months agoRelax expectations (unit test).
Gilles Sadowski [Fri, 27 Aug 2021 17:15:17 +0000 (19:15 +0200)] 
Relax expectations (unit test).

13 months agoFix incorrect usage of "ROSENBROCK" test function (unit tests).
Gilles Sadowski [Fri, 27 Aug 2021 16:35:47 +0000 (18:35 +0200)] 
Fix incorrect usage of "ROSENBROCK" test function (unit tests).

13 months agoFavouring the "expanded" simplex over the "reflected" one.
Gilles Sadowski [Fri, 27 Aug 2021 15:24:51 +0000 (17:24 +0200)] 
Favouring the "expanded" simplex over the "reflected" one.

This modification decreases the number of function evaluations in several
test cases. Note however that the original description of the algorithm
uses the strict inequality...

13 months agoSimplex search in higher-dimensional cases (unit test).
Gilles Sadowski [Fri, 27 Aug 2021 03:37:49 +0000 (05:37 +0200)] 
Simplex search in higher-dimensional cases (unit test).

13 months agoAdd (back) "POwELL" standard test function for optimizers.
Gilles Sadowski [Thu, 26 Aug 2021 21:56:42 +0000 (23:56 +0200)] 
Add (back) "POwELL" standard test function for optimizers.

13 months agoUse default SA setup in "SimplexOptimizerTest" (unit test).
Gilles Sadowski [Thu, 26 Aug 2021 00:05:15 +0000 (02:05 +0200)] 
Use default SA setup in "SimplexOptimizerTest" (unit test).

A single additional search finds the optimum of the test functions.

13 months agoMATH-1622: Simulated annealing entails at least one additional search.
Gilles Sadowski [Wed, 25 Aug 2021 23:39:46 +0000 (01:39 +0200)] 
MATH-1622: Simulated annealing entails at least one additional search.

Also ensure that the "best list" contains at least two points.

13 months agoInput files for "SimplexOptimizerTest" (unit tests).
Gilles Sadowski [Tue, 24 Aug 2021 23:51:34 +0000 (01:51 +0200)] 
Input files for "SimplexOptimizerTest" (unit tests).

13 months agoMATH-1622: Simulated annealing variant of "NelderMeadTransform".
Gilles Sadowski [Tue, 24 Aug 2021 23:50:28 +0000 (01:50 +0200)] 
MATH-1622: Simulated annealing variant of "NelderMeadTransform".

13 months agoChange how simulated annealing affects the transformed simplex (cf. MATH-1622).
Gilles Sadowski [Tue, 24 Aug 2021 13:39:52 +0000 (15:39 +0200)] 
Change how simulated annealing affects the transformed simplex (cf. MATH-1622).

Compared with commit 97462b1a1b6f64ab10e06db331d5b6762d979aab, this commit is
more consistent with assumptions of the original (non-hybridized) algorithm.

13 months agoUseless local variable.
Gilles Sadowski [Tue, 24 Aug 2021 02:09:42 +0000 (04:09 +0200)] 
Useless local variable.

13 months agoInput files for "SimplexOptimizerTest" (unit tests).
Gilles Sadowski [Mon, 23 Aug 2021 23:28:43 +0000 (01:28 +0200)] 
Input files for "SimplexOptimizerTest" (unit tests).

13 months agoMATH-1622: Simulated annealing variant of "MultiDirectionalTransform".
Gilles Sadowski [Mon, 23 Aug 2021 23:18:16 +0000 (01:18 +0200)] 
MATH-1622: Simulated annealing variant of "MultiDirectionalTransform".

13 months agoUpdate exception fr locale to match changes to en locale
Alex Herbert [Mon, 23 Aug 2021 06:40:55 +0000 (07:40 +0100)] 
Update exception fr locale to match changes to en locale

13 months agoMATH-1627: Throw an exception when column or row sums are zero.
Alex Herbert [Sun, 22 Aug 2021 20:43:27 +0000 (21:43 +0100)] 
MATH-1627: Throw an exception when column or row sums are zero.

13 months agoRemove incorrect localization format for zero exception
Alex Herbert [Sun, 22 Aug 2021 20:30:01 +0000 (21:30 +0100)] 
Remove incorrect localization format for zero exception

13 months agoFix localization formats used by ZeroException.
Alex Herbert [Sun, 22 Aug 2021 20:29:29 +0000 (21:29 +0100)] 
Fix localization formats used by ZeroException.

The ZeroException preprends zero to the arguments. The {0} corresponds
to zero. All arguments to be formatted must start at {1}.

13 months agoSpurious "throws" clauses.
Gilles Sadowski [Sun, 22 Aug 2021 01:46:25 +0000 (03:46 +0200)] 
Spurious "throws" clauses.

13 months agoRedundant inner class.
Gilles Sadowski [Sun, 22 Aug 2021 01:28:37 +0000 (03:28 +0200)] 
Redundant inner class.

13 months agoMerge branch 'master' of https://gitbox.apache.org/repos/asf/commons-math
Gilles Sadowski [Sun, 22 Aug 2021 00:32:10 +0000 (02:32 +0200)] 
Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-math

13 months agoUpdate script for visual check of "SimplexOptimizerTest" debugging output.
Gilles Sadowski [Sun, 22 Aug 2021 00:30:01 +0000 (02:30 +0200)] 
Update script for visual check of "SimplexOptimizerTest" debugging output.

Allow displaying negative values of the objective function.

13 months agoAdapt input files for "SimplexOptimizerTest" (unit tests).
Gilles Sadowski [Sun, 22 Aug 2021 00:14:53 +0000 (02:14 +0200)] 
Adapt input files for "SimplexOptimizerTest" (unit tests).

The current tests are "baseline" (2D) cases.
Further work should check degradation with increased dimensionality.

13 months agoRelax expected number of evaluations (unit test).
Gilles Sadowski [Sat, 21 Aug 2021 23:10:04 +0000 (01:10 +0200)] 
Relax expected number of evaluations (unit test).

Optimization is sensitive to the change from "AccurateMath" to "Math"
for computing the "pow" function used in "TestFunction.SUM_POW".

13 months agoAdd variance tests for zero weights
Alex Herbert [Sat, 21 Aug 2021 09:04:49 +0000 (10:04 +0100)] 
Add variance tests for zero weights

Update javadoc for the behaviour when input weights are zero.

This issue was found when checking the sonar report for the variance
class which has a potential divide by zero if the weights sum to zero.

13 months agoCorrect verification of zero length values and weights
Alex Herbert [Sat, 21 Aug 2021 08:58:13 +0000 (09:58 +0100)] 
Correct verification of zero length values and weights

This bug was found when checking the sonar report for the variance class
which uses MathArrays.verifyValues.

13 months agosonar fix: Handle variance=0 in skewness computation for input array
Alex Herbert [Sat, 21 Aug 2021 08:11:05 +0000 (09:11 +0100)] 
sonar fix: Handle variance=0 in skewness computation for input array

13 months agosonar fix: Ensure checkFeasableCount is not negative.
Alex Herbert [Sat, 21 Aug 2021 07:16:20 +0000 (08:16 +0100)] 
sonar fix: Ensure checkFeasableCount is not negative.

Change loop condition to 'i <= checkFeasableCount' from 'i <
checkFeasableCount + 1'

This ensures the loop to identify a new feasible column (RealMatrix
arxk) always executes at least once even with checkFeasibleCount at the
limit of 0 or Integer.MAX_VALUE.

13 months agoJavadoc typo
Alex Herbert [Fri, 20 Aug 2021 21:23:58 +0000 (22:23 +0100)] 
Javadoc typo

13 months agoOnly restore interrupted state if necessary
Alex Herbert [Fri, 20 Aug 2021 20:19:23 +0000 (21:19 +0100)] 
Only restore interrupted state if necessary

13 months agoJavadoc typo
Alex Herbert [Fri, 20 Aug 2021 12:43:59 +0000 (13:43 +0100)] 
Javadoc typo

13 months agoSonar fix: restore thread interrupted state
Alex Herbert [Fri, 20 Aug 2021 12:38:10 +0000 (13:38 +0100)] 
Sonar fix: restore thread interrupted state

13 months agoSimplify data format for "SimplexOptimizerTest" (randomized) input.
Gilles Sadowski [Fri, 20 Aug 2021 10:51:09 +0000 (12:51 +0200)] 
Simplify data format for "SimplexOptimizerTest" (randomized) input.

This commit also makes the following changes (unit tests):
 * Add/remove/rename/rewrite test functions.

13 months agoAdd variance tests for zero weights
Alex Herbert [Sat, 21 Aug 2021 09:04:49 +0000 (10:04 +0100)] 
Add variance tests for zero weights

Update javadoc for the behaviour when input weights are zero.

This issue was found when checking the sonar report for the variance
class which has a potential divide by zero if the weights sum to zero.

13 months agoCorrect verification of zero length values and weights
Alex Herbert [Sat, 21 Aug 2021 08:58:13 +0000 (09:58 +0100)] 
Correct verification of zero length values and weights

This bug was found when checking the sonar report for the variance class
which uses MathArrays.verifyValues.

13 months agosonar fix: Handle variance=0 in skewness computation for input array
Alex Herbert [Sat, 21 Aug 2021 08:11:05 +0000 (09:11 +0100)] 
sonar fix: Handle variance=0 in skewness computation for input array

13 months agosonar fix: Ensure checkFeasableCount is not negative.
Alex Herbert [Sat, 21 Aug 2021 07:16:20 +0000 (08:16 +0100)] 
sonar fix: Ensure checkFeasableCount is not negative.

Change loop condition to 'i <= checkFeasableCount' from 'i <
checkFeasableCount + 1'

This ensures the loop to identify a new feasible column (RealMatrix
arxk) always executes at least once even with checkFeasibleCount at the
limit of 0 or Integer.MAX_VALUE.

13 months agoJavadoc typo
Alex Herbert [Fri, 20 Aug 2021 21:23:58 +0000 (22:23 +0100)] 
Javadoc typo

13 months agoOnly restore interrupted state if necessary
Alex Herbert [Fri, 20 Aug 2021 20:19:23 +0000 (21:19 +0100)] 
Only restore interrupted state if necessary

13 months agoJavadoc typo
Alex Herbert [Fri, 20 Aug 2021 12:43:59 +0000 (13:43 +0100)] 
Javadoc typo

13 months agoSonar fix: restore thread interrupted state
Alex Herbert [Fri, 20 Aug 2021 12:38:10 +0000 (13:38 +0100)] 
Sonar fix: restore thread interrupted state

13 months agoUpdate plugin order in pom
Alex Herbert [Wed, 18 Aug 2021 23:35:58 +0000 (00:35 +0100)] 
Update plugin order in pom

checkstyle
spotbugs
pmd

13 months agoUpdate distribution source archive specification
Alex Herbert [Wed, 18 Aug 2021 23:29:56 +0000 (00:29 +0100)] 
Update distribution source archive specification

Copy from commons-rng multi-module project

13 months agoRemove checksum from installed artifacts
Alex Herbert [Wed, 18 Aug 2021 23:17:08 +0000 (00:17 +0100)] 
Remove checksum from installed artifacts

This creates md5 and sha1 checksums for the dist-archive pom in the
local maven repository. It is not required.

13 months agoAdd jars to dist archive
Alex Herbert [Wed, 18 Aug 2021 23:15:50 +0000 (00:15 +0100)] 
Add jars to dist archive

13 months agoRemove plugin checks from default goal
Alex Herbert [Wed, 18 Aug 2021 23:09:46 +0000 (00:09 +0100)] 
Remove plugin checks from default goal

These plugins already run using executions:

apache-rat:check (validate)
checkstyle:check (verify)

Added to verify using executions:

pmd:check
spotbugs:check

13 months agoUse JUnit 5 Assertions for exact double equality
Alex Herbert [Wed, 18 Aug 2021 22:33:00 +0000 (23:33 +0100)] 
Use JUnit 5 Assertions for exact double equality

Fix checkstyle

13 months agoSimplify atan2 expressions when y is non-zero
Alex Herbert [Wed, 18 Aug 2021 22:16:01 +0000 (23:16 +0100)] 
Simplify atan2 expressions when y is non-zero

13 months agosonar fix: avoid division by zero in atan2 when y=0
Alex Herbert [Wed, 18 Aug 2021 22:00:12 +0000 (23:00 +0100)] 
sonar fix: avoid division by zero in atan2 when y=0

13 months agoUpdate atan2 special cases test
Alex Herbert [Wed, 18 Aug 2021 21:55:30 +0000 (22:55 +0100)] 
Update atan2 special cases test

Enumerate all combinations of 0, infinity and another value (0.1) with
+/- for each. Results are the same with java.lang.Math.

13 months agoSonar fix: Replace x != x with Double.isNaN
Alex Herbert [Wed, 18 Aug 2021 17:30:53 +0000 (18:30 +0100)] 
Sonar fix: Replace x != x with Double.isNaN

13 months agoSonar fix: Cast operands to double before assigning result to double
Alex Herbert [Wed, 18 Aug 2021 15:41:10 +0000 (16:41 +0100)] 
Sonar fix: Cast operands to double before assigning result to double

13 months agoSonar fix: use equals to compare Integers
Alex Herbert [Wed, 18 Aug 2021 10:14:58 +0000 (11:14 +0100)] 
Sonar fix: use equals to compare Integers

13 months agoRemove unused imports
Alex Herbert [Wed, 18 Aug 2021 09:45:14 +0000 (10:45 +0100)] 
Remove unused imports

13 months agoSonarfix: Rename test for equality in markers
Alex Herbert [Wed, 18 Aug 2021 07:26:14 +0000 (08:26 +0100)] 
Sonarfix: Rename test for equality in markers

Use explicit equals method to check equality (not assertEquals)

13 months agoRemove duplicate ConstantName module
Alex Herbert [Mon, 16 Aug 2021 08:57:33 +0000 (09:57 +0100)] 
Remove duplicate ConstantName module

13 months agoNit: Display debug file name.
Gilles Sadowski [Mon, 16 Aug 2021 00:03:08 +0000 (02:03 +0200)] 
Nit: Display debug file name.

13 months agoMake debugging parameters optional (unit test).
Gilles Sadowski [Sun, 15 Aug 2021 16:55:49 +0000 (18:55 +0200)] 
Make debugging parameters optional (unit test).

First optional parameter is the prefix of the output file's name.
Second optional parameter is the list of simplex vertices to save.

13 months agoSimplify null checks.
Gilles Sadowski [Sat, 14 Aug 2021 14:18:36 +0000 (16:18 +0200)] 
Simplify null checks.

13 months agoUpdate copyright information.
Gilles Sadowski [Sat, 14 Aug 2021 01:24:08 +0000 (03:24 +0200)] 
Update copyright information.

13 months agoMATH-1625: Gnuplot script for visual debugging.
Gilles Sadowski [Sat, 14 Aug 2021 00:42:28 +0000 (02:42 +0200)] 
MATH-1625: Gnuplot script for visual debugging.

13 months agoMATH-1625: Add callback to generate debugging output (unit test).
Gilles Sadowski [Fri, 13 Aug 2021 23:36:44 +0000 (01:36 +0200)] 
MATH-1625: Add callback to generate debugging output (unit test).

Debugging output is activated through specifying a file prefix in the CSV input file.

13 months agoMATH-1625: Enable callback in "SimplexOptimizer".
Gilles Sadowski [Fri, 13 Aug 2021 23:24:38 +0000 (01:24 +0200)] 
MATH-1625: Enable callback in "SimplexOptimizer".

13 months agoOverride "toString".
Gilles Sadowski [Thu, 12 Aug 2021 22:54:56 +0000 (00:54 +0200)] 
Override "toString".

13 months agoJavadoc.
Gilles Sadowski [Thu, 12 Aug 2021 15:21:17 +0000 (17:21 +0200)] 
Javadoc.

13 months agoIgnore site-content.README
Alex Herbert [Fri, 13 Aug 2021 13:22:11 +0000 (14:22 +0100)] 
Ignore site-content.README

13 months agoAvoid existing site checkout in all child modules
Alex Herbert [Fri, 13 Aug 2021 13:11:47 +0000 (14:11 +0100)] 
Avoid existing site checkout in all child modules

13 months agoTrack changes
Alex Herbert [Fri, 13 Aug 2021 08:26:24 +0000 (09:26 +0100)] 
Track changes

13 months agoSimplify assertions with simpler equivalent. (#196)
Arturo Bernal [Fri, 13 Aug 2021 08:24:22 +0000 (10:24 +0200)] 
Simplify assertions with simpler equivalent. (#196)

13 months agoJavadoc.
Gilles Sadowski [Thu, 12 Aug 2021 01:03:42 +0000 (03:03 +0200)] 
Javadoc.

13 months agoIncrease number of allowed failures (unit tests).
Gilles Sadowski [Thu, 12 Aug 2021 00:04:15 +0000 (02:04 +0200)] 
Increase number of allowed failures (unit tests).

13 months agoConsistency check to ensure that "TestFunction" implementations are correct.
Gilles Sadowski [Wed, 11 Aug 2021 23:59:37 +0000 (01:59 +0200)] 
Consistency check to ensure that "TestFunction" implementations are correct.

Call is commented out (it is mostly intended for a one-time visual check).

13 months agoMore test functions.
Gilles Sadowski [Wed, 11 Aug 2021 23:56:44 +0000 (01:56 +0200)] 
More test functions.

13 months agoDrop repeated tests inside "SimplexOptimizerTest.Task" class.
Gilles Sadowski [Wed, 11 Aug 2021 17:58:28 +0000 (19:58 +0200)] 
Drop repeated tests inside "SimplexOptimizerTest.Task" class.

Explicitly specify the initial simplex side (as test parameter).

13 months agoDelete spurious files.
Gilles Sadowski [Wed, 11 Aug 2021 11:30:44 +0000 (13:30 +0200)] 
Delete spurious files.

Files were committed by mistake.

13 months agoFunction optimum is rarely found: Disable (comment out) test.
Gilles Sadowski [Tue, 10 Aug 2021 10:44:01 +0000 (12:44 +0200)] 
Function optimum is rarely found: Disable (comment out) test.

13 months agoReduce build failure frequency.
Gilles Sadowski [Tue, 10 Aug 2021 10:43:23 +0000 (12:43 +0200)] 
Reduce build failure frequency.

13 months agoUnused "import".
Gilles Sadowski [Tue, 10 Aug 2021 10:42:13 +0000 (12:42 +0200)] 
Unused "import".

13 months agoMove tests for expected exceptions to "SimplexOptimizerTest" class.
Gilles Sadowski [Tue, 10 Aug 2021 09:47:59 +0000 (11:47 +0200)] 
Move tests for expected exceptions to "SimplexOptimizerTest" class.

13 months agoMATH-1623: Add unit tests for "HedarFukushimaTransform".
Gilles Sadowski [Tue, 10 Aug 2021 09:06:14 +0000 (11:06 +0200)] 
MATH-1623: Add unit tests for "HedarFukushimaTransform".

Adapt input files for the "simulated annealing" option.

Class "SimplexOptimizerHedarFukushimaTest" superseded by input from CSV.

13 months agoUnused "import".
Gilles Sadowski [Tue, 10 Aug 2021 08:56:17 +0000 (10:56 +0200)] 
Unused "import".

13 months agoUnused field.
Gilles Sadowski [Tue, 10 Aug 2021 08:22:12 +0000 (10:22 +0200)] 
Unused field.

13 months agoMATH-1623: Remove duplicate unit tests.
Gilles Sadowski [Mon, 9 Aug 2021 23:07:31 +0000 (01:07 +0200)] 
MATH-1623: Remove duplicate unit tests.

Standard test functions are now handled by class "SimplexOptimizerTest".

13 months agoMATH-1623: Add parameterized unit tests for simplex-based optimizers.
Gilles Sadowski [Mon, 9 Aug 2021 16:27:00 +0000 (18:27 +0200)] 
MATH-1623: Add parameterized unit tests for simplex-based optimizers.