Commit Graph

60745 Commits

Author SHA1 Message Date
Panagiotis Cheilaris a080f0c1b8 test PSS bdiff=3 point on a side pssd3a.cin
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:47 +02:00
Panagiotis Cheilaris fd1b7e5023 test PSS bdiff=4 corner point pssd4a.cin
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:47 +02:00
Panagiotis Cheilaris 6b9e5caab5 test PSS bdiff=2 opposite side pssd2btw3.cin
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:47 +02:00
Panagiotis Cheilaris f3ac657c12 tests related to points_inside_touching_sides
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:47 +02:00
Panagiotis Cheilaris 789f3e6c91 sss test with one axis-parallel segment
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:47 +02:00
Panagiotis Cheilaris 4e4c4d9fff test for SSS axis-parallel
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Sandeep Kumar Dey 466f82d122 Tests for pps case with vertical segment
Tests for pps case with vertical segment and two points with same y coordinate on the left of seg
12 test cases are inserted for different position of test point t.

Conflicts:
	Segment_Delaunay_graph_Linf_2/test/Segment_Delaunay_graph_Linf_2/test_sdg_traits_2.cpp

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris e45bc4f341 test related to input pssprob1.cin
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Sandeep Kumar Dey d8ba6dd2af incircle test pps
The segment is vertical and the points are on right side of the segment.
And also the points on projection will hit the line segment.
t is chosen at different locations to test incircle property.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris 870d50871b pps tests for points with same coordinates
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris c6ebc066c0 tests related to pssphor1.cin etc.
These are incircle tests related to input pssphor1.cin:

s -100 -50 50 100
s 50 50 100 50
p 0 0

and similar inputs (pssphor2.cin, pssphor3.cin).

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris 3fd556cea1 tests related to br80.cin
Input br80.cin is:
s       10      120     60      20
s       60      40      70      60
s       30      110     100     40

(segments AB, CD, EF, respectively)

The incircle predicates (CD, F, EF, B) and (CD, B, F, EF) should
both return 0 (ZERO).

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris 2454107687 tests for a pss case in 3segstepnosegbef.cin
test_incircle<Gt>(Point_2(0, 100),
                    Segment_2(Point_2(0, 50), Point_2(0, 100)),
                    Segment_2(Point_2(-50, 50), Point_2(50, -50)),
                    Point_2(50, 0),
                    CGAL::NEGATIVE);

  test_incircle<Gt>(Segment_2(Point_2(-50, 50), Point_2(50, -50)),
                    Point_2(0, 100),
                    Segment_2(Point_2(0, 50), Point_2(0, 100)),
                    Point_2(50, 0),
                    CGAL::NEGATIVE);

  test_incircle<Gt>(Segment_2(Point_2(0, 50), Point_2(0, 100)),
                    Segment_2(Point_2(-50, 50), Point_2(50, -50)),
                    Point_2(0, 100),
                    Point_2(50, 0),
                    CGAL::NEGATIVE);

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris 50fc5924fd pss Linf incircle test related to r2minpt.cin
The r2minpt.cin input is as follows:
s -91 36 36 87
p -23 4
p -17 37
p -17 40

The test in test_sdg_traits_2.cpp is as follows:
test_incircle<Gt>(Point_2(-23, 4), Point_2(-17, 37),
                  Segment_2(Point_2(-91, 36), Point_2(36, 87)),
                  Point_2(-17, 40),
                  CGAL::POSITIVE);

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:46 +02:00
Panagiotis Cheilaris 78f510c399 a new traits SDG Linf tester
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris aee5d567cd updated test for Linf (using std::string)
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris c5c82940fb do not allow deletion of sites in Linf test
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris eaa50eba4e SDG Linf testsuite programs and data
The test programs are adapted from the SDG L2 ones.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris be3ef8cfa4 remove another warning for s2 pointer
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris c70fc29971 remove dx warning in Side_of_bounded_square_2.h
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris e87c6b8719 incirc benchmark program
Example use:

type=linf ; iprofiler -o incirc${type} -T 15s -timeprofiler ~/code/geom/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/incirc -r 50000000 --${type} 'p 200 -150'  'p 250 50'  'p 50 -50'  'p 300 -50'

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris 41096299e7 add --linf argument to benchmark-gen for symmetry
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris 50ecfb1e13 CMakeLists.txt for benchmark-gen
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:45 +02:00
Panagiotis Cheilaris 94d51380ba general benchmark program for both L2 and Linf
Example uses:

time ( cat ~/code/mycgal/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/data/norway.cin | iprofiler -T 11s -o nlinf -timeprofiler ~/code/geom/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/benchmark-gen )

time ( cat ~/code/mycgal/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/data/norway.cin | iprofiler -T 10s -o nl2 -timeprofiler ~/code/geom/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/benchmark-gen --l2 )

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris f9488b5865 prepare benchmark to support both L2 and Linf
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris 8e27388e73 change pref to rref in two comments
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris e75e7498ec fix for a touching non-hv segment
This fixes a bug in the validity test for input pssd5aless2.cin:
p 100 0
s 150 0 50 -100
p 100 100
p -100 100
(A, BC, D, E)

In particular vertex conflict (BC, D, E, A) was returning -1
and now it returns ZERO.

At the same time, we should keep a negative predicate return value
for 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:44 +02:00
Panagiotis Cheilaris 0e3f2d5e3b PSS case bdiff=5 compute_pss_side_p_known
All bisector computations have been removed.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris 451198fe19 rotate counterclockwise by pi/2 an lsp input
Example use:

cat ~/Dropbox/geom/data/pssd3a.cin | python ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/lsprotate90.py > ~/Dropbox/geom/data/pssd3b.cin

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris 61c70120c9 compute_pss_ortho_wedge function for PSS case
This function is called for bdiff in {3,4}.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris cbd9493722 compute_pss_nonhv_consecutive for field
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:44 +02:00
Panagiotis Cheilaris 25ae2f53f8 convert from plg to lsp format
Example use:

cat ~/Dropbox/geom/mat/input1.plg | ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/plg2lsp.py | ipescript lsp2ipe vecmask1test.ipe 16 16 0.0625

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris 941c26e7e6 create random lsp input from a set of points
Example use:

n=20 ; bbox=100; rbox ${n} t D2 z B${bbox} | tail -n ${n} | python ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/randsp.py > ~/Dropbox/geom/inp/rx9.cin

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris 6f3adf3e31 convert from lsp to ipe format (ipe lua script)
Example use:

cat ~/Dropbox/geom/mat/input1.plg | ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/plg2lsp.py | ipescript lsp2ipe vecmask1test.ipe 16 16 0.0625

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris d69a143abd convert vertex conflict return values to tests
Example use:

~/code/geom/Segment_Delaunay_graph_Linf_2/examples/Segment_Delaunay_graph_Linf_2/sdg-voronoi-edges-exact ~/Dropbox/geom/data/pssd2btw3.cin | sed -E -e 's/\/1([^0-9])/\1/g' | sed -E -e 's/\/1$//g' | grep 'pqrt.*s.*s.*p.*returns 1' | sort | uniq | grep 'p 200 50' | tail -n 5 | ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/ret2testsp.py --points 1

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris a256ff7100 convert sites from lsp to test format
Example run:

cat ~/Dropbox/geom/data/pssendp1a.cin | python ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/lsp2testsp.py

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris aecf35b0c9 compute_pss_nonhv_consecutive for ring
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris 523bbd5475 use points_inside_touching_sides_v for POSITIVE
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris 0e6397c432 more general points_inside_touching_sides_v
Function points_inside_touching_sides_v now supports PPPx, PPSx,
and PSSx cases. Before, it supported only cases with two segments.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris 371bdd0379 use points_inside_touching_sides_v in field
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:43 +02:00
Panagiotis Cheilaris b256187e6e check that points are indeed on different sides
fix in points_inside_touching_sides_v

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 6e05a7c73f fix when two points hide a segment from vv in ring
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 1b5db71997 assertion in place of a check for corner line
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 117ff8ff01 partial removal of PSS bisectors
There are several changes here, also in using a new typedef for Bearing.

Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 0223cdf33a fix: use compute_pss_bisectors
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 0d73c4e71e add an assertion in orient_line_nonendp
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 45db1cc34a prepare for compute_pss_nonendp
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 7231f3ba9a use Homogeneous_point_2 with compute_line_dir
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:42 +02:00
Panagiotis Cheilaris 5f82f17a9b PSS case, add compute_pss_endp to ring
Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
2015-06-30 10:31:41 +02:00
Panagiotis Cheilaris f34e42e1d0 PSS endpoint case speedup for field case
Avoid using polychainline bisectors.

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