Commit Graph

1426 Commits

Author SHA1 Message Date
Luc Maisonobe 24e6771406 added a top-level AbstractIntegrator class to manage events and step handlers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@673069 13f79535-47bb-0310-9956-ffa450edef68
2008-07-01 12:36:20 +00:00
Luc Maisonobe 1d078f3d10 added missing keywords
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@673068 13f79535-47bb-0310-9956-ffa450edef68
2008-07-01 12:34:18 +00:00
Luc Maisonobe 6d4200df71 Changed return type for FirstOrderIntegrator.integrate() to double
in order to retrieve exact stop time. This allows to handle properly
integration interruption due to an EventHandler instance asking to
stop the integration when its associated event is triggered. The state
was already set to the current state at interruption time, but it was
difficult to get the corresponding time (it involved setting a step
handler monitoring the last step specially).

JIRA: MATH-213


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@671168 13f79535-47bb-0310-9956-ffa450edef68
2008-06-24 13:38:28 +00:00
Luc Maisonobe f11d7217fd ported all changes from trunk between r6152100 (branch 2.0 creation) and r670469 (today)
These changes contain fixes for MATH-204 and MATH-205


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@670569 13f79535-47bb-0310-9956-ffa450edef68
2008-06-23 13:46:46 +00:00
Luc Maisonobe 0010754c0b clarified the ODE package by breaking in into several sub-packages and renaming
classes. This also prepares future work for non-stiff solvers.

SwitchingFunctions is now known as EventHandler
SwitchingFunctionsHandler is now known as CombinedEventsManager

The user manual as also been slightly improved, both to reflect these changes
and to make it easier to grasp the underlying principles in our implementation
of ODE solving


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@670469 13f79535-47bb-0310-9956-ffa450edef68
2008-06-23 08:01:38 +00:00
Luc Maisonobe 60042cfcd2 Changed return type for FirstOrderIntegrator.getSwitchingFunctions()
to a collection of SwitchingFunction instances. This better suits the
intended use of the method and fixes a visibility error since the
previous return type referenced the package private SwitchState class.

JIRA: MATH-210


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@669851 13f79535-47bb-0310-9956-ffa450edef68
2008-06-20 10:59:33 +00:00
Luc Maisonobe 6f4e48d42a fixed dimension error in operate method for RealMatrixImpl and BigMatrixImpl
JIRA: MATH-209

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@668798 13f79535-47bb-0310-9956-ffa450edef68
2008-06-17 19:09:36 +00:00
Luc Maisonobe 87e066ad31 replaced inefficient constructors Character(char) by Character.valueOf(char)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@668117 13f79535-47bb-0310-9956-ffa450edef68
2008-06-16 11:28:34 +00:00
Luc Maisonobe 151be95053 missing dot at end of javadoc first sentence
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@668107 13f79535-47bb-0310-9956-ffa450edef68
2008-06-16 10:47:50 +00:00
Luc Maisonobe e2a9416471 The FirstOrderDifferentialEquations and FirstOrderIntegrator interfaces now extends Serializable.
This allows users to embed implementations of these interfaces in their objects when their
objects needs to be serializable.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@668106 13f79535-47bb-0310-9956-ffa450edef68
2008-06-16 10:46:44 +00:00
Luc Maisonobe 57fbcf7362 fixed javadoc link
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@668105 13f79535-47bb-0310-9956-ffa450edef68
2008-06-16 10:40:12 +00:00
Phil Steitz f9b8731e89 Added another OLS test case.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@667880 13f79535-47bb-0310-9956-ffa450edef68
2008-06-14 20:59:31 +00:00
Phil Steitz 240749484c Made assertEquals display difference between arguments.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@667879 13f79535-47bb-0310-9956-ffa450edef68
2008-06-14 20:58:43 +00:00
Luc Maisonobe 815cb8949d putting the <project> tag on one line as recommended by the commons wiki
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@667869 13f79535-47bb-0310-9956-ffa450edef68
2008-06-14 19:30:44 +00:00
Luc Maisonobe d056eaadab replaced inefficient use of constructors for Integer, Long, Float and Double
by the recommended static valueOf methods that cache results

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@666292 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 19:32:52 +00:00
Luc Maisonobe 71174b5602 fixed a type error in array parameter
(String[] instead of Object[] as in super constructor ... and all other exceptions)
fixed a typo

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@666287 13f79535-47bb-0310-9956-ffa450edef68
2008-06-10 19:21:24 +00:00
Luc Maisonobe 1786844fd7 Improved usability of the geometry package.
From a developer point of view, all the changes are related.
From a user point of view, they are independent changes.

 - added several convenience methods for Vector3D and Rotation
 - replaced public no argument constructors with IDENTITY or ZERO
   static instances for immutable classes Vector3D and Rotation
 - fixed inconsistencies in the naming scheme for static fields in
   Vector3D and Rotation with respect to the overall library


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@665700 13f79535-47bb-0310-9956-ffa450edef68
2008-06-09 14:17:21 +00:00
Phil Steitz d09e4819be Added some initial tests for regression parameters and residuals.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@664602 13f79535-47bb-0310-9956-ffa450edef68
2008-06-09 01:57:42 +00:00
Phil Steitz fb0a36c7ab Added some initial OLS multiple regression tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@664519 13f79535-47bb-0310-9956-ffa450edef68
2008-06-08 15:52:20 +00:00
Phil Steitz 78cb3a131d Support NaN, na, NULL values in assertEquals.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@664513 13f79535-47bb-0310-9956-ffa450edef68
2008-06-08 15:29:46 +00:00
Luc Maisonobe 2b8b57d394 changed fields visibility to protected,
to allow users to extend the implementation

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@662538 13f79535-47bb-0310-9956-ffa450edef68
2008-06-02 19:53:37 +00:00
Luc Maisonobe d60d53526d avoid array copy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@662274 13f79535-47bb-0310-9956-ffa450edef68
2008-06-01 19:40:16 +00:00
Luc Maisonobe 482ebca8f5 Improved linear RealMatrixImpl and BigMatrixImpl performances.
The main changes are the following ones:
 - use directly the storage array when possible for
   diadic operations (add, subtract, multiply), as
   suggested by Phil, this avoids the cost of the
   generic getEntry method
 - replaced custom indices checks by simple use of
   the JVM checks and ArrayIndexOutOfBoundException
 - put row arrays reference in local variables to
   avoid multiple checks in double loops
 - use final variables where possible
 - removed unneeded array copying
 - added a constructor to build a matrix from an
   array without copying it where it makes sense

The speed gain is about 3X for multiplication. Performances
for this operation are now on par with Jama.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@662241 13f79535-47bb-0310-9956-ffa450edef68
2008-06-01 16:22:19 +00:00
Luc Maisonobe 7e7207cd4f typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@661042 13f79535-47bb-0310-9956-ffa450edef68
2008-05-28 18:40:38 +00:00
Niall Pemberton beae2e9891 COMMONSSITE-30 - fix the checkstyle configuration to work for multi-module and review/update <reporting> plugin version numbers for the poms being changed.
- pom's need to use ${basedir} for configuration files as the multi-module profile is run from commons-parent, so if not specified it can't find those files
 - the checkstyle configuration file needs to use ${checkstyle.header.file} for the headerFile property and  <headerFile> element added to the plugin config in the pom.xml
 - fix m1 checkstyle config to reflect the above where appropriate (specify header file property)


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@659441 13f79535-47bb-0310-9956-ffa450edef68
2008-05-23 06:14:37 +00:00
Niall Pemberton ca07fcc053 COMMONSSITE-30 - fix the checkstyle configuration to work for multi-module and review/update <reporting> plugin version numbers for the poms being changed.
- pom's need to use ${basedir} for configuration files as the multi-module profile is run from commons-parent, so if not specified it can't find those files
 - the checkstyle configuration file needs to use ${checkstyle.header.file} for the headerFile property and  <headerFile> element added to the plugin config in the pom.xml
 - fix m1 checkstyle config to reflect the above where appropriate (specify header file property)


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@659438 13f79535-47bb-0310-9956-ffa450edef68
2008-05-23 06:10:00 +00:00
Luc Maisonobe 93a8bb4f13 Configured checkstyle to stop complaining about incomplete Javadoc in some very specific cases.
This problem has been discussed previously here:
  http://markmail.org/message/pmbiyiqssjesq7tm

The solution implemented with this modification is to configure checkstyle
in such a way the errors can be filtered out using dedicated comments in the
source code:

  // CHECKSTYLE: stop JavadocMethodCheck

  // a bunch of functions known to trigger warnings
  // that we explicitly REFUSE to fix

  // CHECKSTYLE: resume JavadocMethodCheck

The checks are still performed normally in file parts not bracketed by
these comments. Hence the first few methods in o.a.c.m.stat.inference.TestUtils are
still checked for correct javadoc, and only for the last ones in the same files
are the checks relaxed.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@658671 13f79535-47bb-0310-9956-ffa450edef68
2008-05-21 12:58:15 +00:00
Luc Maisonobe 69af448345 added error handling for multiple linear-regression
added documentation for multiple linear-regression
JIRA: MATH-203

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@658645 13f79535-47bb-0310-9956-ffa450edef68
2008-05-21 12:13:27 +00:00
Luc Maisonobe c9661749db changed groupId from commons-math to org.apache.commons
as suggested in http://markmail.org/message/hxdsteovws7lalsa

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657736 13f79535-47bb-0310-9956-ffa450edef68
2008-05-19 07:13:41 +00:00
Luc Maisonobe 4efb735b1d set up svn:keywords property as the other java files
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657633 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 20:35:25 +00:00
Luc Maisonobe 0a2cd04fef fixed many checkstyle errors about javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657629 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 20:21:23 +00:00
Luc Maisonobe 4e50bbcb90 Replaced Raw types by Parameterized types where appropriate.
The various ArrayList, HashSet and HashMap used in math have
be restricted to the content they are intended for.
This removes lots of warnings that have appeared after the
switch to Java 5, and improves safety (for example the categories
used by OneWayAnova are guaranteed to be double arrays at compile
time).
Two difficult cases where not handled here: the Frequency class
and the Fitness interface. The first one mixes types and needs to
be studied before any change is attempted. The second one generates
some side effects on the overall package which is still under development.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657612 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 19:37:23 +00:00
Luc Maisonobe f8b2fa71fb fixed javadoc links
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657572 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 15:20:00 +00:00
Luc Maisonobe ec56c2c5ff added missing newline at end of file
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657571 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 15:18:32 +00:00
Luc Maisonobe 21872adbf8 added Mauro's patch to support multiple regression
there is still some work to do on this new feature
JIRA: MATH-203

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657570 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 15:05:29 +00:00
Luc Maisonobe 6ebc980cbc changed minimum java platform version to Java5
this change was discussed in the following thread:
http://markmail.org/message/3v5imgkeh72ypm5v

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@657568 13f79535-47bb-0310-9956-ffa450edef68
2008-05-18 15:00:52 +00:00
Luc Maisonobe 033ac8e016 fixed formula in fast cosine transformer javadoc comments
JIRA: MATH-205

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@656814 13f79535-47bb-0310-9956-ffa450edef68
2008-05-15 19:54:52 +00:00
Niall Pemberton 9022176c85 Upgrade to commons-parent-10 pom
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@654484 13f79535-47bb-0310-9956-ffa450edef68
2008-05-08 11:43:09 +00:00
Brent Worden 9232ea98fc MATH-204. added root checks for the endpoints.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@654100 13f79535-47bb-0310-9956-ffa450edef68
2008-05-07 13:36:33 +00:00
Henri Yandell 2d5f1b0b76 Fixing the headerFile location as per CODEC-67 and Benjamin's patch
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@651971 13f79535-47bb-0310-9956-ffa450edef68
2008-04-27 16:00:39 +00:00
Phil Steitz dca7fe58ee Updated javadoc links.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651868 13f79535-47bb-0310-9956-ffa450edef68
2008-04-26 23:15:48 +00:00
Luc Maisonobe 03b9e6771e added a way to handle errors in user-defined switching functions
previously, only the function evaluation could trigger errors,
not the other functions of the interface

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651514 13f79535-47bb-0310-9956-ffa450edef68
2008-04-25 07:25:58 +00:00
Luc Maisonobe de621a4151 added the getSwitchingFunctions and clearSwitchingfunctions to the integrator interface
JIRA: MATH-202

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651282 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 14:44:00 +00:00
Luc Maisonobe 9b8972d209 removed references to discovery
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651280 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 14:40:29 +00:00
Luc Maisonobe bd162ca7d4 announced a whole bunch of deprecation removals
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651262 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 13:31:19 +00:00
Luc Maisonobe 8c206f6225 removed deprecated methods
this does not belong to commons-math yet, but will probably be merged some day

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651259 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 13:25:06 +00:00
Luc Maisonobe c29768da8d removed the deprecated getIdentity method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651256 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 13:22:14 +00:00
Luc Maisonobe ef5946618c removed deprecated implementations
the implementation is now in the base class, and can be modified by setter injection

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651254 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 13:20:53 +00:00
Luc Maisonobe 93c0636cb6 removed deprecated exceptions constructors
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651252 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 13:17:30 +00:00
Luc Maisonobe 4c7e51fd41 removed factories
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@651251 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 13:13:31 +00:00