Commit Graph

5656 Commits

Author SHA1 Message Date
Luc Maisonobe 62ef50bc75 Top level integrator interface.
We have merged together what was initially in an integrator interface
and in an AbstractIntegrator class. The separation was only due to
backward compatibility issues which prevented to push some functions up
in the interface. A consequence was that users needed to use the
abstract class in their declaration as soon as they needed the
additional features ... which was most of the cases. We try to fix this
here. When 4.0 will be out, the same merging will be done in the
double[] implementation of ode.

JIRA: MATH-1288
2015-11-11 21:35:01 +01:00
Luc Maisonobe 89e6219689 Mapping between primary/secondary equations and flat arrays.
The API is much simpler than the one in the current double[]
implementation. We do not mix anymore the equations and the state.

JIRA: MATH-1288
2015-11-11 21:30:48 +01:00
Luc Maisonobe b5fd9b58db Interface and enum for event handling.
This corresponds to an improved g-stop feature. It basically allow to
manage discrete events that occur during ode integration. when the event
occurs, user can decide to log it and continue, or to change the
dynamics of a problem (for example to handle derivatives
discontinuities) or even to stop the integration before its target date
(for example when the exact final date cannot be known beforehand but is
discovered on the fly). It is the second major feature of our ode
package.
2015-11-11 21:28:02 +01:00
Luc Maisonobe 5c647c12e6 Interfaces and normalizer for step handling.
This corresponds to a continuous output feature. It basically allow to
navigate throughout current step instead of having only discrete grid
points. It is a major feature of our ode package.

JIRA: MATH-1288
2015-11-11 21:23:35 +01:00
Luc Maisonobe 4685d0376a Starting work on Field-based ordinary differential equations.
The base elements are the primary equation that users must implement,
and optional secondary equations to support features like adjoint
parameters or variational equations. Some containers to hold current
state are also introduced to simplify API (these container do not exist
in the double[] version of the API).

JIRA: MATH-1288
2015-11-11 21:17:13 +01:00
Otmar Ertl 29dfd9bb66 MATH-1285: added definition of distribution to javadoc of
ZipfDistribution
2015-11-10 21:22:42 +01:00
Phil Steitz 430c7f4567 Added constructors taking sample data as arguments to enumerated real and integer distributions. JIRA: MATH-1287. 2015-11-09 20:48:21 -07:00
Otmar Ertl 8aecb842d3 MATH-1269: fixed FastMath.exp returning NaN for non-NaN arguments 2015-11-05 21:19:35 +01:00
Otmar Ertl 69c83683fd fixed some typos in comments 2015-11-05 21:16:44 +01:00
Luc Maisonobe fff5c35b27 Use a "static" instance rather than an anonymous one instantiated
on-the-fly.
2015-11-04 14:51:03 +01:00
Luc Maisonobe 4a1708d2e1 PairNeuronDouble should not implement Comparable.
As the purpose was only to sort neurons according to an associated
value, using an explicit comparator is simpler. Implementing Comparable
induces also implementing equals and hashcode which are not really
meaningful. They are nevertheless required by our code quality checking
tools.
2015-11-04 14:07:22 +01:00
Luc Maisonobe 97b2e8dffe Added a nth order Brent solver for general real fields.
This solver replaces the former solver that was restricted to
Dfp fields only.
2015-11-04 12:50:16 +01:00
Luc Maisonobe 320a3a3a13 Set up a customized configuration for PMD. 2015-11-03 21:15:57 +01:00
Luc Maisonobe 5f3d0d7923 Added missing braces. 2015-11-03 20:58:05 +01:00
Luc Maisonobe 85dd630c0c Added missing javadoc. 2015-11-03 20:52:28 +01:00
Luc Maisonobe 99cbfc28e2 Removed static imports. 2015-11-03 15:58:57 +01:00
Luc Maisonobe a8bf634a5f Spurious semicolon. 2015-11-03 15:55:25 +01:00
Luc Maisonobe e3118728d1 Replaced implementation types.
ArrayList -> List
TreeMap   -> SortedMap
2015-11-03 15:53:03 +01:00
Luc Maisonobe a96ee63181 Combined nested if statements. 2015-11-03 15:49:23 +01:00
Luc Maisonobe f0c6d3c0c5 Fixed inconsistent synchronization. 2015-11-03 12:34:07 +01:00
Luc Maisonobe be8563a6c5 Fixed findbugs warnings.
The warnings were related to compareTo implementations not handling -0.0
or NaN properly (cf
<http://findbugs.sourceforge.net/bugDescriptions.html#CO_COMPARETO_INCORRECT_FLOATING>).
2015-11-03 12:21:08 +01:00
Luc Maisonobe 9672399666 Replaced use of inefficient keyset with use of entryset. 2015-11-03 12:12:19 +01:00
Luc Maisonobe b6c2d697ab Roll back clirr plugin version to 2.6.1 as 2.7 triggered an exception. 2015-11-03 12:06:26 +01:00
Luc Maisonobe 04454fc009 Fixed findbugs warning.
When defining compareTo, we should also define equals and hashcode.
2015-11-03 11:23:46 +01:00
Luc Maisonobe b72d44673c Avoid a false positive findbugs warning.
Findbugs is confused by constant 1.570796251296997 which is a
intentionally slightly offset from PI/2 as per Cody Waite arguments
reduction.
2015-11-03 11:20:47 +01:00
Luc Maisonobe fae8d86872 Avoid a false positive findbugs warning.
The source code tests an angle using "angle > (FastMath.PI - 1.0e-10)".
As the compiler does the subtraction of the constants directly, findbugs
complains about a "Rough value of Math.PI found: 3.141592653489793".
2015-11-03 11:18:59 +01:00
Luc Maisonobe 8c2aa686b9 Removed useless object. 2015-11-03 11:17:34 +01:00
Luc Maisonobe da77465fc1 Updated parent pom and plugins versions to latest available. 2015-11-03 11:16:49 +01:00
Luc Maisonobe ee7b3a5827 reactivated redundant modifiers needed for serialization. 2015-11-02 16:03:52 +01:00
Luc Maisonobe 254783521b reintroduced modifiers needed for serialization. 2015-11-02 15:47:31 +01:00
Luc Maisonobe 0a0c5aa391 Fixed hidden field warning. 2015-11-02 15:24:22 +01:00
Luc Maisonobe 2114da384a Fixed checkstyle warnings.
These warnings correspond to redundant modifiers (public, static, ...).
They are identified by recent versions of checkstyle, in particular the
one shipped with Eclipse. They are not detected by our
maven-checkstyle-plugin yet because it is not the latest one and still
depends on an older version of checkstyle.
2015-11-02 15:23:30 +01:00
Luc Maisonobe a07663cfae Fixed missing types in javadoc. 2015-11-02 15:15:15 +01:00
Luc Maisonobe 635c35be74 Use a fixed seed to avoid random test failure. 2015-11-02 13:39:21 +01:00
Gilles 2f782bc259 MATH-1286
New "Range" inner class that holds a field with the number of elements of the range.
An instance of this class replaces the anonymous class returned by the "range" method.
2015-10-31 16:11:20 +01:00
Otmar Ertl 5f03f0d702 MATH-1285: replaced inappropriate reference to MathWorld by reference to
Wikipedia's article about Zipf's law, thanks to  Pim van der Hoorn for
reporting this issue
2015-10-27 20:40:24 +01:00
Thomas Neidhart 40f35da565 [MATH-1283] Fixed Gamma#gamma function for values smaller than -20. Thanks to Jean Noel Delavalade 2015-10-22 22:32:50 +02:00
Thomas Neidhart 0dd621687d [MATH-1237] Fix javadoc of methods floorDiv,floorMod in FastMath. Thanks to Ken Williams. 2015-10-19 22:01:50 +02:00
Thomas Neidhart 5511eec3b4 [MATH-837] Support aggregation of any kind of StatisticalSummary in AggregateSummaryStatistics. 2015-10-19 21:36:15 +02:00
Luc Maisonobe 9f1368715b Avoid slight inaccuracies at the end of events detections steps. 2015-10-02 17:34:15 +02:00
Gilles 5e4739fb72 MATH-1279
Check precondition.
Thanks to David Georg Reichelt for the report.
2015-09-30 14:41:47 +02:00
Luc Maisonobe 4025b62c7d Fixed checkstyle warning about parentheses. 2015-09-21 11:21:23 +02:00
Gilles 4f1d85c0bf Update "changes.xml". 2015-09-20 21:46:57 +02:00
Gilles f13693fdc3 MATH-1278
Deep copy of "Neuron", "Network" and "NeuronSquareMesh2D".
2015-09-20 21:45:31 +02:00
Gilles 78b9d819a7 Merge branch 'MATH_3_X' of https://git-wip-us.apache.org/repos/asf/commons-math into MATH_3_X 2015-09-20 21:35:21 +02:00
Otmar Ertl df1db29ab4 [MATH-1276] Improved performance of sampling and inverse cumulative
probability calculation for geometric distributions.
2015-09-20 21:01:25 +02:00
Otmar Ertl 7fe8a8aff6 extended GeometricDistributionTest to test inverse cumulative probability function also at point 1 2015-09-20 20:52:17 +02:00
Otmar Ertl 6c53783ea0 optimization of probability, logProbability, and cumulativeProbability methods in GeometricDistribution by precalculation of log(1-p) and log(p) 2015-09-20 20:49:38 +02:00
Otmar Ertl ecb52999cb code cleanup in GeometricDistribution.java as proposed by Gilles: * removed needless declaration of a local variable "p" with the same value as the "probabilityOfSuccess" field * remove needless local variable "ret" ("return" statements can be used directly in each way of the alternatives) 2015-09-20 20:46:41 +02:00
Gilles bd988f8342 Unused variable. Typo. 2015-09-20 19:13:04 +02:00