Commit Graph

2959 Commits

Author SHA1 Message Date
Adam Wulkiewicz
e8fafc942d Merge pull request #272 from awulkiew/fix/cart_intersect2
Fix for cart_intersect and side_by_triangle - inconsistencies on MinGW and more (robustness)
2015-03-22 14:44:33 +01:00
Adam Wulkiewicz
d1358af447 Merge pull request #267 from awulkiew/fix/cart_intersect
[strategies][cart_intersect] Compare ratios denominators consistently.
2015-03-22 14:41:41 +01:00
Adam Wulkiewicz
d3f95f2cbb [index][doc] Remove manually enabled doxygen code for details since now it should be automatically generated. 2015-03-20 03:42:13 +01:00
Adam Wulkiewicz
cc4ac4599d [index][doc] Hide details in docs if DOXYGEN_NO_DETAIL is defined.
Change functions return types to unspecified.
Replace parameters defaults generated by functions/metafunctions with values.
Hide base classes.
2015-03-20 02:07:23 +01:00
Adam Wulkiewicz
b788a9e4ab [index] Rename node_auto_ptr with subtree_destroyer and auto_deallocator with scoped_dealloactor. 2015-03-19 23:39:42 +01:00
Adam Wulkiewicz
4514e325f9 [index] Move predicates and operators into detail::predicates namespace.
In order to use the operators only for predicates.
2015-03-19 23:36:32 +01:00
Adam Wulkiewicz
0f4ce76449 [index] Replace std::auto_ptr with boost::scoped_ptr in query_iterator. 2015-03-19 23:35:20 +01:00
Adam Wulkiewicz
91fb7241e5 [index] Support move_iterator in packing algorithm. 2015-03-19 01:25:34 +01:00
Adam Wulkiewicz
6eb80018c6 [index][pack_create] Fix for iterators not returning true references.
Don't dereference iterators passed by the user in the expression where a
dereferenced value is passed into the translator/indexable-getter.

Without this fix if an iterator returns non-true reference (e.g. like
segment_iterator) and this reference is adapted to the Geometry concept
(like pointing_segment returned by segment_iterator) and the default
indexable<> getter is used (which returns a true reference), then a true
reference returned by it is a dangling reference corresponding to a
destroyed temporary object.
2015-03-17 02:49:54 +01:00
Adam Wulkiewicz
062a7abce9 [strategies][cart_intersect] Modify type of factor stored in the equals policy. 2015-03-16 17:26:20 +01:00
Adam Wulkiewicz
6098d419ba [util][math] Fix equals policies return types.
To avoid returning reference to temporary object.

Add equals_factor_policy "empty" specialization for integral types.
2015-03-16 17:22:13 +01:00
Adam Wulkiewicz
f59f6fface [strategies][side_by_triangle] Use equals() with policy.
Compare the floating-point results of determinant (denominators) using
the epsilon scaled by the greatest of the differences of coordinates of
the points passed into the determinant formula.
2015-03-14 04:03:02 +01:00
Adam Wulkiewicz
dbeb823fcb [strategies][cart_intersect] Use equals() with policy.
Compare the floating-point results of cramer's rule (denominators) using the epsilon
scaled by the greatest of the differences of coordinates of the segments'
endpoints (the input of the determinant formula).
2015-03-14 03:55:44 +01:00
Adam Wulkiewicz
b5887efd5e [math] Add/improve math utils.
Add the support for policy calculating epsilon factor in equals().
Add greatest() algorithm - max() equivalent taking more than 2 parameters.
Add specialization of abs() for floating-point numbers.
2015-03-14 03:52:02 +01:00
Adam Wulkiewicz
ec6f9148cd [strategies][cart_intersect] Compare ratios denominators consistently.
Compare both ratios' potential denominators, corresponding to both
segments. Furthermore, take into account the machine epsilon.
2015-03-12 23:03:27 +01:00
Adam Wulkiewicz
e5c40ca188 [buffer] Fix unused variable MSVC warning in analyse_turn_wrt_point_piece. 2015-03-11 03:56:04 +01:00
Adam Wulkiewicz
6828fd5bda [policies] Fix unused parameter warnings in direction policy. 2015-03-11 03:54:42 +01:00
Adam Wulkiewicz
666837bcb9 [algorithms] Fix the type of returned Range/Ring in sub_range(Polygon). 2015-03-09 16:05:29 +01:00
Adam Wulkiewicz
731ea108d7 Merge pull request #252 from sdebionne/fix/range_reference
[range] Use range_reference
2015-03-09 12:58:59 +01:00
Samuel Debionne
d7aae45daf [util][range] Use range_reference
Use range_reference to determine the return type of boost::at,
boost::front and boost::back.
2015-03-09 09:52:11 +01:00
Menelaos Karavelas
b3b95ae92b [strategies][cartesian][buffer][join_round] protect std::max with parentheses 2015-03-08 20:56:02 +02:00
Menelaos Karavelas
ca45ee76ac [strategies][cartesian][buffer][join_round] optimize expression
calculating number of interior points
2015-03-08 20:11:53 +02:00
Barend Gehrels
64ee58ed46 [buffer] Fix calculation of the number of points. For an angle of 125 or more,
no points in between were generated, which was erroneous.
Thanks to Menelaos for spotting and Adam for the calculation

This changes some of the unit test results, because in some cases a point in between
is generated now, creating a larger polygon
2015-03-08 18:08:43 +01:00
Adam Wulkiewicz
a3db6b2ad1 Merge pull request #246 from mkaravel/fix/sqrt_for_32bit_platforms
Workaround for sqrt for some 32-bit platforms
2015-03-08 15:14:30 +01:00
Barend Gehrels
4e6a319fdb Merge pull request #248 from mkaravel/feature/simplify_detail_not
Simplify detail::not_
2015-03-08 15:01:28 +01:00
Menelaos Karavelas
a3012c4beb [strategies][cartesian][buffer][join_round] rename local variable so that it is more descriptive 2015-03-08 12:54:19 +02:00
Menelaos Karavelas
4fcf879b25 [algorithms][detail][not] modify the implementation of detail::not_ by moving
the geometry template parameters inside the class; this way it is simpler to
use detail::not_ as it is not required to specify the geometries;
2015-03-08 11:42:45 +02:00
Menelaos Karavelas
3312f4a03d [algorithms][is_valid] apply coding rules (space after operator !) 2015-03-07 18:13:12 +02:00
Menelaos Karavelas
fc257347e2 [util][math] add comments at end of #ifdef BOOST_GEOMETRY_SQRT_CHECK_FINITENESS/#endif block 2015-03-07 16:34:19 +02:00
Menelaos Karavelas
0a6e1a6829 [util][math] guard inclusion of fpclassify.hpp by the macro
BOOST_GEOMETRY_SQRT_CHECK_FINITENESS
2015-03-07 09:33:45 +02:00
Menelaos Karavelas
b0a78785b7 [iterators][point iterator] add missing const in constructor 2015-03-06 08:29:33 +02:00
Adam Wulkiewicz
2e18afacce Merge pull request #239 from sdebionne/fix/iterators
Fix point_iterator with raw pointer base
2015-03-06 06:17:08 +01:00
Menelaos Karavelas
0efb49d054 [algorithms][is_valid] fix comment 2015-03-05 15:12:22 +02:00
Menelaos Karavelas
75c3590aef [util][math] implement workaround for 32-bit platforms for which sqrt(nan)
returns a finite value; workaround is activated by defining the macro
BOOST_GEOMETRY_SQRT_CHECK_FINITENESS;
2015-03-05 11:27:59 +02:00
Barend Gehrels
e80ec0babf [buffer][doc] Make miter limit more clear in documentation 2015-03-04 12:26:49 +01:00
Barend Gehrels
ed2f52a16d [buffer] Fix end caps with odd number of points, they were not closed
Including unit test. Issue was found by Oracle/MySQL testing
2015-03-04 11:40:44 +01:00
Menelaos Karavelas
90bb9a8a4f [strategies][cartesian][buffer][join_round] revert change in strategy 2015-03-04 12:09:56 +02:00
Samuel Debionne
73a9a47598 [iterators] Use base_type from boost::iterator_adaptor
Use base_type from boost::iterator_adaptor. Remove base type definition
that clash with the base() function of boost::iterator_adaptor. Reformat
to follow coding guidelines.
2015-03-04 10:10:02 +01:00
Samuel Debionne
84463ae8ba [iterators] Fix point_iterator with raw pointer base
Fix point_iterator (and adapt reverse_point_iterator to the fix) to
support curves implemented with raw pointer as iterator. The fix uses
boost::iterator_adaptor that implements base() a synonyme of base_ptr()
that consequently has been removed. The operators are also redondant and
removed.
2015-03-03 15:46:54 +01:00
Menelaos Karavelas
ac1a78f1cd [strategies][cartesian][buffer][join_round] move the max outside the static cast 2015-03-03 16:04:32 +02:00
Menelaos Karavelas
a6a448f429 [strategies][cartesian][buffer][join_round] make sure that at least one
interior point is generated
2015-03-03 09:50:46 +02:00
Menelaos Karavelas
38fc1224c7 [strategies][cartesian][buffer][end_round] fix internal point count
for small input values (less than 4): when the input point count is less
than 4, set the internal point count to 4; for values less than 4 the
generated ends do not look round;
2015-03-02 21:11:40 +02:00
Adam Wulkiewicz
6bf022bedb Merge pull request #236 from sdebionne/fix/range
Fix range back() function
2015-03-02 14:15:26 +01:00
Samuel Debionne
d9f95e6952 [algorithms][within] Use geometry::range
Make use of geometry::range algorithms to get front and back values of
Linestring (rather than Boost.Range begin() and front()).
2015-03-02 10:59:42 +01:00
Samuel Debionne
cae3bab2fe [util][range] Fix back()
*(--boost::end(rng)); is not valid for range with pointer as iterators.
since the range is supposed to be BidirectionalRange, use rbegin
instead.
2015-03-02 10:59:32 +01:00
Barend Gehrels
f74180b084 [buffer] Enhance turn-in-piece for pieces around points. They now
make use of monotonic sections, and get special treatment because there
are no helper segments, basically the whole procedure is different

This can make buffers around points 3 times faster (if the buffered ring contains many points)
2015-03-01 14:08:16 +01:00
Barend Gehrels
cf167f9a36 [sectionalize] support sections in vector (so sections_type is redundant) 2015-03-01 13:57:39 +01:00
Barend Gehrels
f45df767d5 [buffer] remove obsolete file 2015-03-01 11:25:13 +01:00
Barend Gehrels
c244debf53 [buffer] calculate turns: use monotonic properties in two dimensions
(does not give improvements for circles, however it might do for ellipses
longer in y dimension)
2015-02-28 12:58:51 +01:00
Barend Gehrels
483c373cf5 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-02-27 22:15:39 +01:00