7096 Commits

Author SHA1 Message Date
Gilles Sadowski
97462b1a1b MATH-1622: Simulated annealing variant of "MultiDirectionalTransform". 2021-08-24 01:18:16 +02:00
Alex Herbert
47904caeb8 Update exception fr locale to match changes to en locale 2021-08-23 07:40:55 +01:00
Alex Herbert
21f8008108 MATH-1627: Throw an exception when column or row sums are zero. 2021-08-22 21:43:52 +01:00
Alex Herbert
991314d461 Remove incorrect localization format for zero exception 2021-08-22 21:43:52 +01:00
Alex Herbert
dc639967c2 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}.
2021-08-22 21:43:52 +01:00
Gilles Sadowski
fb314ef3df Spurious "throws" clauses. 2021-08-22 03:46:25 +02:00
Gilles Sadowski
9bb5791906 Redundant inner class. 2021-08-22 03:28:37 +02:00
Gilles Sadowski
f466637d82 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-math 2021-08-22 02:32:10 +02:00
Gilles Sadowski
78fbc5f07c Update script for visual check of "SimplexOptimizerTest" debugging output.
Allow displaying negative values of the objective function.
2021-08-22 02:30:01 +02:00
Gilles Sadowski
1e7bce134f Adapt input files for "SimplexOptimizerTest" (unit tests).
The current tests are "baseline" (2D) cases.
Further work should check degradation with increased dimensionality.
2021-08-22 02:14:53 +02:00
Gilles Sadowski
14ebd93426 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".
2021-08-22 01:10:04 +02:00
Alex Herbert
bdb4160b00 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.
2021-08-21 14:37:13 +02:00
Alex Herbert
033c7e2c39 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.
2021-08-21 14:37:13 +02:00
Alex Herbert
5245a685a0 sonar fix: Handle variance=0 in skewness computation for input array 2021-08-21 14:37:13 +02:00
Alex Herbert
30aa597f1e 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.
2021-08-21 14:37:13 +02:00
Alex Herbert
228a832532 Javadoc typo 2021-08-21 14:37:13 +02:00
Alex Herbert
75c7377e47 Only restore interrupted state if necessary 2021-08-21 14:37:13 +02:00
Alex Herbert
26e4a737f7 Javadoc typo 2021-08-21 14:37:13 +02:00
Alex Herbert
1bdb310ffa Sonar fix: restore thread interrupted state 2021-08-21 14:37:13 +02:00
Gilles Sadowski
3ba0221c26 Simplify data format for "SimplexOptimizerTest" (randomized) input.
This commit also makes the following changes (unit tests):
 * Add/remove/rename/rewrite test functions.
2021-08-21 14:33:30 +02:00
Alex Herbert
569e35ddbe 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.
2021-08-21 10:04:49 +01:00
Alex Herbert
a2efd4fad5 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.
2021-08-21 09:58:13 +01:00
Alex Herbert
3f7de0eb1e sonar fix: Handle variance=0 in skewness computation for input array 2021-08-21 09:11:05 +01:00
Alex Herbert
1fdd55981d 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.
2021-08-21 08:16:20 +01:00
Alex Herbert
69bab476a5 Javadoc typo 2021-08-20 22:23:58 +01:00
Alex Herbert
5201f2c5fa Only restore interrupted state if necessary 2021-08-20 21:19:23 +01:00
Alex Herbert
7ee70ef474 Javadoc typo 2021-08-20 13:44:15 +01:00
Alex Herbert
09dd29e56d Sonar fix: restore thread interrupted state 2021-08-20 13:38:10 +01:00
Alex Herbert
7813ecb115 Update plugin order in pom
checkstyle
spotbugs
pmd
2021-08-19 00:35:58 +01:00
Alex Herbert
86624912ff Update distribution source archive specification
Copy from commons-rng multi-module project
2021-08-19 00:29:56 +01:00
Alex Herbert
b6acad285d 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.
2021-08-19 00:19:54 +01:00
Alex Herbert
c8b45d43fa Add jars to dist archive 2021-08-19 00:19:54 +01:00
Alex Herbert
6e1e402ed6 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
2021-08-19 00:09:46 +01:00
Alex Herbert
e693b4d264 Use JUnit 5 Assertions for exact double equality
Fix checkstyle
2021-08-18 23:33:00 +01:00
Alex Herbert
56b7b12c2a Simplify atan2 expressions when y is non-zero 2021-08-18 23:16:01 +01:00
Alex Herbert
7cb883c54b sonar fix: avoid division by zero in atan2 when y=0 2021-08-18 23:02:55 +01:00
Alex Herbert
f06bb2aa3f 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.
2021-08-18 23:02:55 +01:00
Alex Herbert
f6fe96b23f Sonar fix: Replace x != x with Double.isNaN 2021-08-18 18:30:53 +01:00
Alex Herbert
e97c3288a5 Sonar fix: Cast operands to double before assigning result to double 2021-08-18 16:41:10 +01:00
Alex Herbert
21a9aa4413 Sonar fix: use equals to compare Integers 2021-08-18 11:14:58 +01:00
Alex Herbert
0a42dc86cb Remove unused imports 2021-08-18 10:45:14 +01:00
Alex Herbert
58e0efc651 Sonarfix: Rename test for equality in markers
Use explicit equals method to check equality (not assertEquals)
2021-08-18 08:26:14 +01:00
Alex Herbert
1c88930c3a Remove duplicate ConstantName module 2021-08-16 09:57:33 +01:00
Gilles Sadowski
9be74e3abd Nit: Display debug file name. 2021-08-16 02:03:08 +02:00
Gilles Sadowski
1d1fe2acc0 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.
2021-08-15 18:55:49 +02:00
Gilles Sadowski
a0cd950a7c Simplify null checks. 2021-08-14 16:18:36 +02:00
Gilles Sadowski
8804071ac7 Update copyright information. 2021-08-14 03:24:08 +02:00
Gilles Sadowski
070676d219 MATH-1625: Gnuplot script for visual debugging. 2021-08-14 02:42:28 +02:00
Gilles Sadowski
5f36bf970a MATH-1625: Add callback to generate debugging output (unit test).
Debugging output is activated through specifying a file prefix in the CSV input file.
2021-08-14 01:51:43 +02:00
Gilles Sadowski
310b21e4d7 MATH-1625: Enable callback in "SimplexOptimizer". 2021-08-14 01:51:43 +02:00