Commit Graph

64306 Commits

Author SHA1 Message Date
Panagiotis Cheilaris ff8a2ddbaa debug message for common endpoint bisector_SS case
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris 83c768c534 special bisector code for common endpoint segments
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris 5dd642b95b is_mid_qsrc and is_mid_qtrg variables in bisector
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris a2ef6d936b check if parallel only when no common point in SS
This change uses the short-circuit evaluation of if.
It first checks that the two segments have no common
endpoint and only then checks if they are parallel.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris 2ee4a00a68 move bisector SS computation common points earlier
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris a2b4cd7a3f bisector debug messages in vsqr
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris e8c50f93a1 whitespace fixes in benchmarks
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Sandeep Kumar Dey a2f1494102 CMakeLists.txt is updated
CMakeLists.txt is updated to include benchmark-linf-hv.cpp

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Sandeep Kumar Dey e43801f342 benchmark-linf-hv.cpp
benchmark-linf-hv.cpp is added to check the
runtime for the inputs having only axis parallel segments.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:15 +02:00
Panagiotis Cheilaris f9e136e0ac removed a too strong assertion in fecf
The following file r4m1knosegless1.cin gave a failed assertion:
p -100 -74
s -89 6 34 -98
p -23 -87
p -48 -91

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris 08415ef8b7 fix a typo: os -> bs
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris da9624c3f2 use only side_of_bs in vring
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris f4c1980fa2 remove side_of_os include from vsqrt new
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris e6e357be9b removal of a case that is already included
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris 111ebae585 use just side of bs in vsqrt new
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris ef6b4e207f query t on side of bounded square
I moved a lot of the functionality for deciding the Linf incircle
test for four points to the side of bounded square predicate.

In the case of query point t being on one of the sides of the
bounded square, I use the predicate test1d. Maybe even this can
be optimized, or made even more robust with some more checks.

A bug that is fixed with the current commit is in the following
input:

$ cat ~/Dropbox/cgal/sdg/panos/sqch1a.cin
p -51 -180
p -180 -30
p -180 20
p -7 -180

I also fixed a small bug when expanding both sides of the bounded
square.

The next step is to completely remove the slow "side of oriented
square" test.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris 11e5198a61 fix in reading points in benchmarks
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:14 +02:00
Panagiotis Cheilaris f4d79b3504 is_lft_input variables: Side_of_oriented_square_2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris f42dfd8cab pmin, pmax removal from Side_of_bounded_square_2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris f8c84e89d8 use lrbt pointers in Side_of_bounded_square_2
I also keep the old code, to try some assertions.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris 738b2c6b36 show px_min, px_max, py_min, py_max debug messages
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris 6a9cdb1069 make Side_of_bounded_square_2 functions inline
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris 4817961cd5 debug message for touching sides of t in sidebs
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris ea417f4842 use constant half in Side_of_bounded_square_2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris 4c9681e3fd shorten long lines in Side_of_bounded_square_2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris 629f05a8e1 use CGAL::compare in side of bounded square
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:13 +02:00
Panagiotis Cheilaris dc186b670e use bounded square first in vsqrtnew
For the case PPP for incircle_p, use the bounded side predicate
before the oriented side predicate.

A similar change should probably be done in vring, too.

The oriented side predicate makes a lot of tests that are irrelevant
for a finite PPP vertex.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris 16d016dd65 benchmarks for Linf and L2 adapted from Menelaos'
The benchmarks do not support crossing segmetns.

The input should be fed from stdin and should
be in the the format of "p x y" or "s x1 y1 x2 y2"
per line. Do not give the total number of points
and segments in the first line (this is in contrast
with Menelaos' benchmark expected input).

Example input:
p 20 34
s 10 34 78 1
s 23 18 91 22

Example run:
n=600000 ;
 rbox $n D2 s B180 | tail -n $n | awk '{print "p " $1 " " $2 }' |
 time benchmark-linf

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris 672a24ed4d slightly faster Side_of_bounded_square_2
Store the result of comparison of t with coordinates
of bottom left and top right point of square.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris 9458afe15b removal of side of bounded square include
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris 27e6b1112b point computation pushed inside debug
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris d34cd07b7d whitespace fix of Side_of_bounded_square_2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris 1b8428a998 whitespace fixes in Side_of_oriented_square_2
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Sandeep Kumar Dey 68b61ac17a Assertion is removed
CGAL_assertion((l.perpendicular(vpqr).
                has_on_negative_side(vqps))or
                ((compare_x_2(vpqr, vqps) == EQUAL) and
                (compare_y_2(vpqr, vqps) == EQUAL)));
Example: This assertion is failed in 4seg.cin
s -196 109 -194 38
s -114 83 -6 83
s -7 67 -110 72
s -110 72 -114 83

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris 4a8ab6100c assertion instead of test to make faster
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:12 +02:00
Panagiotis Cheilaris fb323b1a3c show more verbose validity messages only in debug
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris 566c5a3023 removal of sdg benchmarks from examples CMakeLists
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris a752730e6a CMakeLists for benchmarks SDG-Linf
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris 885cb46e4e typedefs for benchmarks (just copies)
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris 87768c94e8 move SDG-Linf benchmarks to benchmarks directory
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Sandeep Kumar Dey f7ca406d30 CMakeList is updated to include two new examples
sdg-creation-time.cpp
sdg-creation-time-hv.cpp

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Sandeep Kumar Dey f24548376f Added two examples and updated CMakeList
sdg-creation-time.cpp
This example only creates Linf sdg with general Linf traits
sdg-creation-time-hv.cpp
This example creates Linf sdg with Linf traits for axis parallel segments

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris 23c40d0746 replace boost/random.hpp with rnd number generator
This fixes a problem with generating Segment_voronoi_2.moc:

opt/local/include/boost/type_traits/detail/has_binary_operator.hp:50:
Parse error at "BOOST_JOIN"

The problem did not appear before installing boost 1.53 with macports.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris f05baeb04c put debug messages in intersection bis SS
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:11 +02:00
Panagiotis Cheilaris b05926553e Bisctor_Linf SS with vectors
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:10 +02:00
Panagiotis Cheilaris 2e42758fcd intersection of two lines for bisector Linf
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:10 +02:00
Panagiotis Cheilaris 3b99f23d99 removal of an assertion on q, t that is too strong
In the case when q and t have the same support, the following
assertion is too strong:

     CGAL_assertion(
                    same_points(q.source_site(), t.source_site()) or
                    same_points(q.source_site(), t.target_site()) or
                    same_points(q.target_site(), t.source_site()) or
                    same_points(q.target_site(), t.target_site())   )

This fixes a bug in the input br89.cin:

s       10      120     60      20
s       60      40      70      60
s       30      110     100     40
s        8       56     180    160

Probably, a similar assertion has to be removed that has to do
with r and t.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:10 +02:00
Panagiotis Cheilaris c23b499a32 convert only visible objects in ipe2cin
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:10 +02:00
Panagiotis Cheilaris 01614f2fd3 fix for touching parabolas PSS case
Fix for the following input start2db.cin:

s -250 50 -50 -150
s -100 -50 -60 -50
p -150 50

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:10 +02:00
Panagiotis Cheilaris 943a8edf76 fix for touching parabolas PPS case
Fix for the following input parpar2.cin:

s -250 50 -50 -150
p -100 -50
p -60 -50
p -150 50

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:10 +02:00