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
Luc Maisonobe
6a6c06acdf
Extract classes out of SphericalPolygonsSet source file.
...
None of these classes required private access to the
SphericalPolygonsSet class, so they can be outside, simplifying the
source.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1561506 13f79535-47bb-0310-9956-ffa450edef68
2014-01-26 15:31:18 +00:00
Luc Maisonobe
7cfbc0da48
Fixed error when splitting an arc close to its end.
...
fixes: MATH-1093
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1561047 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 16:03:44 +00:00
Gilles Sadowski
fbd429f2d7
Javadoc.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560956 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 11:58:00 +00:00
Gilles Sadowski
d42fcbdb2f
Enable choice of RNG, so that the unit test can be run with a
...
seed that makes it always succeed.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560953 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 11:55:25 +00:00
Luc Maisonobe
fde06bb6b6
Removed spurious @Override.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560928 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 09:58:43 +00:00
Thomas Neidhart
c9b7b57d3c
Add missing AL header.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560551 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 22:35:21 +00:00
Thomas Neidhart
58693fbcb3
[MATH-970] Add a method isSolutionOptimal to SolutionCallback.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560541 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 22:12:42 +00:00
Thomas Neidhart
c58e2abfe5
Fix typo.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560532 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 22:05:37 +00:00
Thomas Neidhart
842351710e
[MATH-1038] Refactor code as agreed on the mailinglist.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560531 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 22:00:37 +00:00
Luc Maisonobe
1f8d874895
Updated user guide for geometry.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560390 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 15:55:03 +00:00
Luc Maisonobe
1fc112d053
improved javadoc
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560336 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 12:39:14 +00:00
Luc Maisonobe
e02b8f8a5a
typo in a function name ...
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560335 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 12:39:06 +00:00
Luc Maisonobe
28b39e33d8
typo
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560332 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 12:28:04 +00:00
Luc Maisonobe
b0252439c3
updated RAT plugin exlusion, to ignore a file added by Eclipse
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560330 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 12:21:01 +00:00
Luc Maisonobe
43ef84b729
BSP tree now provide an API to compute a global signed distance.
...
The distance is defined from a test point to the region. It is positive
if the point is outside of the region, negative if the point is inside,
and zero when the point is at the boundary. The distance is continuous
everywhere, so it can be used with a root solver to identify accurately
boundary crossings. This API is available for all BSP trees, in
Euclidean and spherical geometries, and in all dimensions.
Fixes MATH-1091
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560115 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 17:49:13 +00:00
Luc Maisonobe
5b71c17c81
Javadoc fix.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1560114 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 17:48:16 +00:00
Luc Maisonobe
01e1ca4bfd
IntervalsSet now implements Iterable<double[]>.
...
Fixes MATH-1090
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1559746 13f79535-47bb-0310-9956-ffa450edef68
2014-01-20 15:34:41 +00:00
Luc Maisonobe
b1e3f391b5
Javadoc fix.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1559745 13f79535-47bb-0310-9956-ffa450edef68
2014-01-20 15:34:02 +00:00