Commit Graph

5145 Commits

Author SHA1 Message Date
Luc Maisonobe d41b96e58d Added a warning about interfaces not implementable by users.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566416 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 20:56:55 +00:00
Thomas Neidhart 517ff8cbe3 Revert unneeded serializationUID field.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566396 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 20:36:24 +00:00
Luc Maisonobe 5ae01f1f99 Added a getEnclosingCap method for spherical polygons.
In simple cases (small polygon, one piece only, no holes), the enclosing
cap will be the smallest one, but this is not guaranteed in the general
case.

The enclosing cap can be used to speed up inside/outside points when the
region is small with respect to the sphere as with only one check of an
angular separation, most points of the sphere can be safely identified
as outside. The more time-consuming checks involving the full boundary
are therefore done only for a small portion of the sphere.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566358 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 19:17:55 +00:00
Thomas Neidhart 2535320878 [MATH-749] Add changelog entry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566342 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 18:24:27 +00:00
Thomas Neidhart 996c0c164a [MATH-1065] Fix EnumeratedRealDistribution.inverseCumulativeProbability. Thanks to matteodg and Phil.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566274 13f79535-47bb-0310-9956-ffa450edef68
2014-02-09 11:21:28 +00:00
Thomas Neidhart 3f59a81a15 Add missing since tags.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566092 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 18:48:29 +00:00
Thomas Neidhart b957ee1646 Add missing serialVersionUIDs.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566088 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 18:36:30 +00:00
Thomas Neidhart 42dffede43 [MATH-1050] Added changelog entry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566074 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 18:14:37 +00:00
Thomas Neidhart 3c644cf87e [MATH-749] Change the way the line segments are computed as they can not be serialized. Use the array only as cache and create them as needed.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566064 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 17:44:37 +00:00
Thomas Neidhart c92f7d0c8f [MATH-976] Add changelog entry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566047 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 16:54:45 +00:00
Thomas Neidhart 683a898d55 [MATH-976] Use placeholders and fix manifest for tools jar.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566046 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 16:50:32 +00:00
Thomas Neidhart 8dae299004 [MATH-990] Added changelog entry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566021 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 14:33:03 +00:00
Thomas Neidhart 51a7ec0633 Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566020 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 14:28:20 +00:00
Thomas Neidhart d434c5d0cc [MATH-1044] Clarify javadoc of DecompositionSolver#getInverse and corresponding implementations. Thanks to Sean Owen.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566017 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 14:13:34 +00:00
Thomas Neidhart b268dfbb82 Add missing AL header.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1565447 13f79535-47bb-0310-9956-ffa450edef68
2014-02-06 21:31:52 +00:00
Thomas Neidhart de21905859 [MATH-749] Rename method, add/improve javadoc, better handle degenerate cases, improve unit tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1565444 13f79535-47bb-0310-9956-ffa450edef68
2014-02-06 21:27:20 +00:00
Thomas Neidhart 6b43922648 [MATH-749] Handle case that all points are identical.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1564954 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 22:10:22 +00:00
Thomas Neidhart b353d07bcc [MATH-749] Add GiftWrap algorithm as precursor for Chan's algorithm.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1564951 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 21:54:10 +00:00
Thomas Neidhart e5dc3ad337 [MATH-749] Improve robustness for convex hull algorithms in case of identical / collinear points, added flag whether to include only extreme points or all points on the hull, improve unit tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1564934 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 21:21:31 +00:00
Luc Maisonobe e5002ce3f6 Removed unfinished method.
The method was added by error.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1564922 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 20:46:43 +00:00
Luc Maisonobe 739708f1af Added enclosing ball generator for 2-sphere.
On the 2-sphere, enclosing balls are sphericals caps.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1564921 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 20:42:58 +00:00
Luc Maisonobe 3d0e61ebe5 Fixed comments.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1564255 13f79535-47bb-0310-9956-ffa450edef68
2014-02-04 11:19:41 +00:00
Thomas Neidhart 3b50199358 Add missing Override tags.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563714 13f79535-47bb-0310-9956-ffa450edef68
2014-02-02 20:55:14 +00:00
Luc Maisonobe 19c1c3bb9b Fixed sphere generation in degenerated cases.
In almost coplanar / almost colinear cases, sphere generation could
diverge in such a way the support points did not belong to the sphere
anymore! This new implementation uses exact arithmetic for the
computation. It is much slower, but since very few balls should be
generated during the Welzl algorithm execution, this is probably
acceptable.

JIRA: MATH-1096

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563712 13f79535-47bb-0310-9956-ffa450edef68
2014-02-02 20:52:49 +00:00
Thomas Neidhart 7897aa6a83 [MATH-749] Use new method Vector2D.crossProduct, fix typos, return Segment instead of Line in ConvexHull2D.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563687 13f79535-47bb-0310-9956-ffa450edef68
2014-02-02 17:56:13 +00:00
Thomas Neidhart 0fa8bcc008 [MATH-749] Added crossProduct method to Vector2D as a replacement for getLocation, using MathArrays.linearCombination to improve accuracy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563684 13f79535-47bb-0310-9956-ffa450edef68
2014-02-02 17:51:06 +00:00
Thomas Neidhart 2933e5773b Add EnclosingBall example, update convex hull.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563409 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 12:50:41 +00:00
Thomas Neidhart 764f56955d Apply @Override rules for java 1.5
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563402 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 12:00:21 +00:00
Thomas Neidhart 9dc30fddc1 Make constructor package private for now to simplify potential future changes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563288 13f79535-47bb-0310-9956-ffa450edef68
2014-01-31 22:07:35 +00:00
Thomas Neidhart bcba29320f Improve tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563285 13f79535-47bb-0310-9956-ffa450edef68
2014-01-31 22:06:49 +00:00
Thomas Neidhart 8f7c59ce88 [MATH-749] Add MonotoneChain implementation.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563284 13f79535-47bb-0310-9956-ffa450edef68
2014-01-31 22:06:31 +00:00
Thomas Neidhart ca22dac3f8 Rename to GrahamScan as the algorithm anyway is only defined for the 2D case.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563246 13f79535-47bb-0310-9956-ffa450edef68
2014-01-31 20:24:02 +00:00
Luc Maisonobe 423371e790 USer should not provide space dimension, it should be automatic.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563204 13f79535-47bb-0310-9956-ffa450edef68
2014-01-31 18:33:22 +00:00
Thomas Neidhart 310008f48c Convex hull example for user guide.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1563008 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 22:48:22 +00:00
Thomas Neidhart ea030e732e [MATH-749] Add AklToussaintHeuristic as pre-processing step for convex hull generation.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562999 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 22:16:59 +00:00
Thomas Neidhart 7bbba6995a [MATH-749] Fix GrahamScan2D for colinear points, improve tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562975 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 21:28:05 +00:00
Luc Maisonobe 796c8329d6 Most of the 3D errors were due to ... wrong tests.
The dimension was set to 2 instead of 3.

There is still one problem, so investigation continues.

JIRA: MATH-1096

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562959 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 21:04:58 +00:00
Luc Maisonobe faf997271b Partly fixed MATH-1096.
The 2D cases seem to work now, but there are still problems with the 3D
cases.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562882 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 16:31:08 +00:00
Luc Maisonobe 2ada148fdb Allow declaring subclasses in exceptions.
The eclipse plugin for checkstyle sometimes flagged this as errors.
Since we have decided to be explicit in the Javadoc, we have to allow
it.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562756 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 09:37:31 +00:00
Luc Maisonobe 8025900b3a Removed redundant throws
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562755 13f79535-47bb-0310-9956-ffa450edef68
2014-01-30 09:37:08 +00:00
Thomas Neidhart 1e6915db87 [MATH-749] Convex hull support for two-dimensional space: GrahamScan2D.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562624 13f79535-47bb-0310-9956-ffa450edef68
2014-01-29 22:57:04 +00:00
Thomas Neidhart 49642956cd Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562610 13f79535-47bb-0310-9956-ffa450edef68
2014-01-29 22:17:16 +00:00
Luc Maisonobe 2a3b56daa0 Added tests for 3D smallest ball enclosing.
WARNING! These tests have revealed a bug in our implementation of the
smallest enclosing ball algorithm. So some tests are currently ignored
in order to avoid having lots of messages, but I am already working on
them. The problems should be fixed (and the tests activated) before 3.3
release.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562573 13f79535-47bb-0310-9956-ffa450edef68
2014-01-29 20:19:20 +00:00
Luc Maisonobe 7ce5950963 Added ball generation from support points in 3D.
This can be used for applying Emo Welzl smallest enclosing ball
algorithm in the Euclidean 3D case.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562571 13f79535-47bb-0310-9956-ffa450edef68
2014-01-29 20:18:32 +00:00
Luc Maisonobe 8dd48742c3 Fixed wrong javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562384 13f79535-47bb-0310-9956-ffa450edef68
2014-01-29 09:36:27 +00:00
Thomas Neidhart 7a2a276d76 Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562232 13f79535-47bb-0310-9956-ffa450edef68
2014-01-28 21:14:05 +00:00
Luc Maisonobe 672b58548c Added Emo Welzl algorithm finding points smallest enclosing ball.
JIRA: MATH-1095

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1562220 13f79535-47bb-0310-9956-ffa450edef68
2014-01-28 20:29:27 +00:00
Thomas Neidhart 7029443e49 [MATH-985] Added changelog entry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1561510 13f79535-47bb-0310-9956-ffa450edef68
2014-01-26 15:58:04 +00:00
Thomas Neidhart 38df46f944 Add missing since tag.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1561509 13f79535-47bb-0310-9956-ffa450edef68
2014-01-26 15:47:40 +00:00
Thomas Neidhart 91291520cf [MATH-1072] Added constructor for AbstractListChromosome that does not copy the input argument.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1561508 13f79535-47bb-0310-9956-ffa450edef68
2014-01-26 15:46:49 +00:00