Commit Graph

5827 Commits

Author SHA1 Message Date
Phil Steitz b38ce47047 Added @since tags, cleaned up code. JIRA: MATH-1287 2015-11-15 10:56:43 -07:00
Luc Maisonobe d3fb47063e Intermediate level implementations of variable-step Runge-Kutta methods. 2015-11-15 15:56:52 +01:00
Luc Maisonobe 04feb99603 Avoid spurious array copy. 2015-11-15 15:33:21 +01:00
Luc Maisonobe 96bdfe27f9 The full set of derivatives are needed in Runge-Kutta. 2015-11-15 15:16:54 +01:00
Luc Maisonobe 5f2459ded2 Added min/max utility methods for RealField elements. 2015-11-15 14:54:49 +01:00
Luc Maisonobe 23f3ca423f Field-based version of Luther method for solving ODE. 2015-11-15 14:03:03 +01:00
Luc Maisonobe b41ef1abd1 Field-based version of 3/8 method for solving ODE. 2015-11-15 11:54:32 +01:00
Luc Maisonobe e0c0398cad Field-based version of Gill method for solving ODE. 2015-11-15 11:36:58 +01:00
Luc Maisonobe f4286ec262 Field-based version of classical Runge-Kutta method for solving ODE. 2015-11-15 11:17:05 +01:00
Luc Maisonobe d509c4a2a0 Field-based version of midpoint method for solving ODE. 2015-11-15 10:58:30 +01:00
Luc Maisonobe c89d2453c5 Fixed javadoc. 2015-11-15 10:44:13 +01:00
Luc Maisonobe 97a65021c7 Whitespace. 2015-11-15 10:41:39 +01:00
Luc Maisonobe ea0dabfd1b Field-based version of Euler method for solving ODE. 2015-11-15 10:39:26 +01:00
Luc Maisonobe 7ec2a6342b Intermediate level implementations of fixed-step Rung-Kutta methods. 2015-11-15 10:37:04 +01:00
Luc Maisonobe 8949c0b99f Integrator returns the full state, not only the time. 2015-11-15 10:35:50 +01:00
Luc Maisonobe 1e71453fa1 Step interpolator only needs the mapper, not the full equations. 2015-11-15 10:34:51 +01:00
Luc Maisonobe 0820cd68d3 Initialize primary and secondary equations at integration start. 2015-11-15 10:33:11 +01:00
Luc Maisonobe e55d38c43e Use MapArrays utility methods for building arrays. 2015-11-15 10:31:17 +01:00
Luc Maisonobe 70e48a02d0 Added init methods for primary and secondary ODE.
This addition is for consistency with other user-implemented interfaces
as step handlers and event handlers. However, since the equations have
only the state as input and the produce derivatives as output, their
init method also only uses state, as derivatives can be computed only
after equations have been initialized, not before.
2015-11-15 10:27:10 +01:00
Luc Maisonobe 136f644e22 Separate equations from mapper. 2015-11-14 14:52:09 +01:00
Luc Maisonobe ea4bea1d89 Implementation of the top level abstract classes in field ode.
This layer implements boilerplate code, mainly step handling and events
handling. It is independent of the type of integrator used. Below this
layer will be the real implementations (Runge-Kutta, embedded
runge-Kutta, Gragg-Bulirsch-Stoer, Adams, ...).
2015-11-13 21:10:16 +01:00
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