mirror of https://github.com/CGAL/cgal
merge from next
This commit is contained in:
commit
b918c8d88d
|
|
@ -1424,9 +1424,12 @@ Convex_decomposition_3/examples/Convex_decomposition_3/list_of_convex_parts.cin
|
|||
Convex_decomposition_3/test/Convex_decomposition_3/check_decomposition.cin -text
|
||||
Convex_decomposition_3/test/Convex_decomposition_3/reflex_sedge.cpp -text
|
||||
Convex_decomposition_3/test/Convex_decomposition_3/star.nef3 -text
|
||||
Convex_hull_2/benchmark/Convex_hull_2/static_ch2.cpp -text
|
||||
Convex_hull_2/demo/Convex_hull_2/help/index.html svneol=native#text/html
|
||||
Convex_hull_2/doc_tex/Convex_hull_2/convex_hull.png -text
|
||||
Convex_hull_2/doc_tex/Convex_hull_2/saarhull.png -text svneol=unset#image/png
|
||||
Convex_hull_2/examples/Convex_hull_2/iostream_convex_hull_2.cin -text
|
||||
Convex_hull_2/test/Convex_hull_2/ch2_projection_3.cpp -text
|
||||
Convex_hull_3/benchmark/Convex_hull_3/compare_different_approach.cpp -text
|
||||
Convex_hull_3/benchmark/Convex_hull_3/is_on_positive_side.cpp -text
|
||||
Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt -text
|
||||
|
|
@ -1774,9 +1777,6 @@ Installation/config/support/print_QT_version.cpp -text
|
|||
Installation/config/support/print_TAUCS_version.cpp -text
|
||||
Installation/config/support/print_ZLIB_version.cpp -text
|
||||
Installation/config/support/test_BOOST_THREAD.cpp -text
|
||||
Installation/config/testfiles/CGAL_CFG_NO_CPP0X_COPY_N.cpp -text
|
||||
Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp -text
|
||||
Installation/config/testfiles/CGAL_CFG_NO_CPP0X_NEXT_PREV.cpp -text
|
||||
Installation/config/version.h.in -text
|
||||
Installation/doc_tex/Installation/cmakelogo.png -text svneol=unset#image/png
|
||||
Installation/doc_tex/Installation/illustration.png -text
|
||||
|
|
@ -1803,7 +1803,7 @@ Intersections_3/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersec
|
|||
Intersections_3/test/Intersections_3/segment_segment.cpp -text
|
||||
Intersections_3/test/Intersections_3/triangle_3_triangle_3_intersection.cpp -text
|
||||
Interval_skip_list/doc_tex/Interval_skip_list/query.png -text
|
||||
Interval_skip_list/examples/Interval_skip_list/isl_terrain.pts -text
|
||||
Interval_skip_list/examples/Interval_skip_list/terrain.pts -text
|
||||
Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h -text
|
||||
Interval_support/include/CGAL/Test/_test_convert_to_bfi.h -text
|
||||
Interval_support/package_info/Interval_support/description.txt -text
|
||||
|
|
@ -3484,6 +3484,7 @@ STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp -text
|
|||
STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp -text
|
||||
STL_Extension/test/STL_Extension/test_Modifiable_priority_queue.cpp -text
|
||||
STL_Extension/test/STL_Extension/test_Uncertain.cpp -text
|
||||
STL_Extension/test/STL_Extension/test_namespaces.cpp -text
|
||||
STL_Extension/test/STL_Extension/test_type_traits.cpp -text
|
||||
Scripts/developer_scripts/autotest_cgal -text
|
||||
Scripts/developer_scripts/autotest_cgal_with_cmake -text
|
||||
|
|
@ -4206,6 +4207,7 @@ Testsuite/test/Testsuite/cgal_test_with_cmake eol=lf
|
|||
Testsuite/test/collect_cgal_testresults_from_cmake -text
|
||||
Testsuite/test/makefile2 -text
|
||||
Testsuite/test/run_testsuite_with_cmake -text
|
||||
Triangulation_2/benchmark/Triangulation_2/CDT_with_intersection_2.cpp -text
|
||||
Triangulation_2/benchmark/Triangulation_2/Delaunay_remove.cpp -text
|
||||
Triangulation_2/demo/Triangulation_2/qt3/help/cindex.html svneol=native#text/html
|
||||
Triangulation_2/demo/Triangulation_2/qt3/help/cinput_point_layer.gif -text svneol=unset#image/gif
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ logarithmic query time, while the query time for the landmark
|
|||
strategy is only logarithmic on average --- and we may have
|
||||
scenarios where the query time can be linear. In practice however,
|
||||
the query times of both strategies are competitive. For a detailed
|
||||
experimental comparison, see \cite{cgal:hh-eplca-05}
|
||||
experimental comparison, see \cite{hh-esplp-08}
|
||||
|
||||
The main drawback in the current implementation of the landmark
|
||||
strategy, compared to the trapezoidal RIC strategy, is that while
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <fstream>\
|
||||
#include <fstream>
|
||||
|
||||
#define SHOW(attribut) "\n "#attribut": " << image->attribut
|
||||
#define SHOWENUM(enumitem) #enumitem"=" << enumitem
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/convex_hull_2.h>
|
||||
#include <CGAL/ch_jarvis.h>
|
||||
#include <CGAL/ch_eddy.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
#include <boost/math/special_functions/next.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#define bench(METHOD,CONTAINER) \
|
||||
{\
|
||||
std::size_t previous=0;\
|
||||
unsigned run=0;\
|
||||
CGAL::Timer time;\
|
||||
do{\
|
||||
result.clear();\
|
||||
time.start();\
|
||||
METHOD( CONTAINER.begin(), CONTAINER.end(), std::back_inserter(result) );\
|
||||
time.stop();\
|
||||
if( previous!=0 && previous!=result.size()) std::cerr << "error got different result" << std::endl;\
|
||||
previous=result.size();\
|
||||
}while(++run<repeat+1);\
|
||||
std::cout << result.size() << " points on the convex hull using "<< #METHOD << "; Done in "<< time.time() << "s\n";\
|
||||
}
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef std::vector<Point_2> Points;
|
||||
typedef CGAL::Creator_uniform_2<double,Point_2> Creator;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
unsigned nbpts=100000;
|
||||
unsigned repeat=0;
|
||||
unsigned seed=0;
|
||||
|
||||
if (argc>1) nbpts=atoi(argv[1]);
|
||||
|
||||
if (argc>2) repeat=atoi(argv[2]);
|
||||
if (argc>3) seed=atoi(argv[3]);
|
||||
|
||||
Points points, result;
|
||||
|
||||
CGAL::Random r(seed);
|
||||
CGAL::Random_points_in_disc_2<Point_2,Creator> g( 150.0,r);
|
||||
CGAL::cpp0x::copy_n( g, nbpts, std::back_inserter(points));
|
||||
|
||||
//the following code is for testing when there is only two extreme points, affine hull is 2D
|
||||
/*
|
||||
CGAL::Bbox_2 bbox=points.begin()->bbox();
|
||||
for (Points::iterator it=points.begin();it!=points.end();++it)
|
||||
bbox=bbox+it->bbox();
|
||||
|
||||
points.push_back( Point_2(bbox.xmin()-1,bbox.ymin()-1) );
|
||||
points.push_back( Point_2(bbox.xmax()+1,bbox.ymax()+1) );
|
||||
*/
|
||||
|
||||
//the following code is for testing when there is only three extreme points
|
||||
/*
|
||||
CGAL::Bbox_2 bbox=points.begin()->bbox();
|
||||
for (Points::iterator it=points.begin();it!=points.end();++it)
|
||||
bbox=bbox+it->bbox();
|
||||
|
||||
points.push_back( Point_2(bbox.xmin()-1,bbox.ymin()-1) );
|
||||
points.push_back( Point_2(bbox.xmax()+1,bbox.ymax()+1) );
|
||||
points.push_back( Point_2(bbox.xmax(),bbox.ymax()+2) );
|
||||
*/
|
||||
|
||||
//the following code is for testing when there is only two extreme points, affine hull is 1D
|
||||
/*
|
||||
points.clear();
|
||||
for (unsigned i=0;i<nbpts;++i)
|
||||
points.push_back(Point_2(i,i));
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::cout << "seed is " << seed << "; using " << nbpts << " pts; on " << repeat+1 << " run(s).\n";
|
||||
|
||||
std::cout << "Using vector" << std::endl;
|
||||
bench(CGAL::convex_hull_2,points)
|
||||
//bench(CGAL::ch_akl_toussaint,points)
|
||||
//bench(CGAL::ch_bykat,points)
|
||||
//bench(CGAL::ch_eddy,points)
|
||||
//bench(CGAL::ch_graham_andrew,points)
|
||||
//bench(CGAL::ch_jarvis,points)
|
||||
|
||||
{
|
||||
std::list<Point_2> pt_list;
|
||||
std::copy(points.begin(),points.end(),std::back_inserter(pt_list));
|
||||
std::cout << "Using list" << std::endl;
|
||||
bench(CGAL::convex_hull_2,pt_list)
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1,2 @@
|
|||
demo
|
||||
demo
|
||||
benchmark
|
||||
|
|
|
|||
|
|
@ -0,0 +1,500 @@
|
|||
5887 415
|
||||
3001 7410
|
||||
1424 5645
|
||||
152 4513
|
||||
3309 92
|
||||
2056 5013
|
||||
2867 5103
|
||||
2130 2112
|
||||
1175 6885
|
||||
5961 1334
|
||||
6698 1687
|
||||
1697 6506
|
||||
2314 413
|
||||
6748 3033
|
||||
2999 6466
|
||||
4108 1497
|
||||
7058 4673
|
||||
2722 2660
|
||||
5650 7834
|
||||
6133 6758
|
||||
3437 5836
|
||||
5105 6980
|
||||
4859 7847
|
||||
661 5558
|
||||
7217 4971
|
||||
3914 8121
|
||||
2335 7065
|
||||
7768 5448
|
||||
788 6284
|
||||
435 5097
|
||||
2081 6371
|
||||
7561 3193
|
||||
7162 5054
|
||||
7192 1834
|
||||
613 5359
|
||||
6277 6713
|
||||
5133 4829
|
||||
2662 6455
|
||||
3016 430
|
||||
2142 3057
|
||||
4580 8102
|
||||
4023 3026
|
||||
5238 889
|
||||
285 2713
|
||||
6821 4910
|
||||
4476 6977
|
||||
7789 4847
|
||||
7146 6828
|
||||
925 2001
|
||||
5976 743
|
||||
796 3028
|
||||
3013 2308
|
||||
3259 7382
|
||||
6164 6374
|
||||
194 4727
|
||||
1465 7214
|
||||
3907 2634
|
||||
6618 7097
|
||||
7321 6129
|
||||
1004 6739
|
||||
6022 974
|
||||
6673 3219
|
||||
7622 4192
|
||||
5190 538
|
||||
3362 5537
|
||||
7109 6405
|
||||
3804 3786
|
||||
6490 3234
|
||||
6537 1970
|
||||
3981 4339
|
||||
4068 2563
|
||||
5859 786
|
||||
1909 7558
|
||||
5583 7876
|
||||
7884 5617
|
||||
6019 3225
|
||||
3833 1376
|
||||
2944 5302
|
||||
5985 5130
|
||||
6577 1577
|
||||
4222 8106
|
||||
2508 1459
|
||||
1300 7061
|
||||
6999 4506
|
||||
3372 8095
|
||||
7729 4514
|
||||
2606 2035
|
||||
4955 3001
|
||||
493 2389
|
||||
6837 3086
|
||||
1445 2160
|
||||
4987 5290
|
||||
7734 3466
|
||||
7663 2721
|
||||
406 5869
|
||||
6155 4289
|
||||
5652 3638
|
||||
2799 7406
|
||||
6218 3448
|
||||
1205 1578
|
||||
910 6660
|
||||
3581 5926
|
||||
899 3226
|
||||
4711 8048
|
||||
7154 5459
|
||||
139 5011
|
||||
7924 4481
|
||||
2386 6534
|
||||
6551 6706
|
||||
3970 3804
|
||||
3322 1252
|
||||
221 5229
|
||||
6917 7037
|
||||
4904 4789
|
||||
6047 6939
|
||||
1408 1784
|
||||
7278 4252
|
||||
4978 6220
|
||||
3934 6489
|
||||
6418 4256
|
||||
7919 5067
|
||||
6686 6448
|
||||
7967 3366
|
||||
7201 6764
|
||||
5898 747
|
||||
1906 2521
|
||||
3554 1386
|
||||
3490 7235
|
||||
6420 3292
|
||||
3545 3232
|
||||
6992 6850
|
||||
2924 5246
|
||||
2925 5579
|
||||
5371 1375
|
||||
3114 7794
|
||||
7 3861
|
||||
756 6438
|
||||
1125 3570
|
||||
7914 2782
|
||||
156 5153
|
||||
124 3792
|
||||
8028 5212
|
||||
3243 7377
|
||||
4643 6666
|
||||
7624 2363
|
||||
39 3540
|
||||
7116 5850
|
||||
5492 7943
|
||||
1726 6801
|
||||
4614 8158
|
||||
3510 6369
|
||||
4942 7139
|
||||
8053 5151
|
||||
707 4269
|
||||
1337 4824
|
||||
1155 6936
|
||||
3706 527
|
||||
4092 6932
|
||||
3614 364
|
||||
1389 3831
|
||||
5281 5182
|
||||
4315 7519
|
||||
1556 6863
|
||||
3610 668
|
||||
8051 3906
|
||||
32 4395
|
||||
4139 6410
|
||||
3193 7994
|
||||
519 5682
|
||||
509 6045
|
||||
3852 405
|
||||
87 3630
|
||||
4239 4694
|
||||
172 5208
|
||||
7361 4978
|
||||
6645 6246
|
||||
2817 4623
|
||||
7028 3898
|
||||
5314 4602
|
||||
7665 5467
|
||||
5663 1090
|
||||
3144 5935
|
||||
3168 8052
|
||||
2937 5645
|
||||
1413 2424
|
||||
2050 7610
|
||||
1584 4625
|
||||
1157 5450
|
||||
1493 5679
|
||||
3957 2665
|
||||
7686 3408
|
||||
2113 7498
|
||||
1080 3224
|
||||
1280 1476
|
||||
416 2608
|
||||
1589 2904
|
||||
3181 1172
|
||||
5319 327
|
||||
1655 815
|
||||
2750 1856
|
||||
5194 227
|
||||
3690 88
|
||||
3158 110
|
||||
1939 1895
|
||||
1959 678
|
||||
4290 3233
|
||||
8174 4474
|
||||
7020 6558
|
||||
3487 58
|
||||
6739 1346
|
||||
5285 6976
|
||||
1864 868
|
||||
4549 7895
|
||||
6127 582
|
||||
7725 2371
|
||||
4724 260
|
||||
5313 7499
|
||||
2653 3268
|
||||
4859 261
|
||||
4940 7249
|
||||
37 3593
|
||||
5038 4715
|
||||
739 2328
|
||||
1931 7258
|
||||
4702 3719
|
||||
214 2814
|
||||
2343 7707
|
||||
2242 2768
|
||||
2617 3520
|
||||
1417 5126
|
||||
7126 4971
|
||||
7518 3994
|
||||
3750 811
|
||||
2348 659
|
||||
3655 8063
|
||||
5576 4351
|
||||
7712 5908
|
||||
7549 5586
|
||||
608 4468
|
||||
897 4757
|
||||
7289 6329
|
||||
3402 2683
|
||||
6318 5202
|
||||
6192 1653
|
||||
7181 1465
|
||||
4559 42
|
||||
5303 7744
|
||||
7742 3505
|
||||
1414 6945
|
||||
5829 2677
|
||||
2445 364
|
||||
5822 6436
|
||||
594 2235
|
||||
2704 1660
|
||||
756 3301
|
||||
2068 3952
|
||||
7622 2111
|
||||
1056 4184
|
||||
6878 1379
|
||||
2472 4005
|
||||
7637 2051
|
||||
7234 1587
|
||||
1304 7087
|
||||
8020 2942
|
||||
1320 2042
|
||||
903 1666
|
||||
4207 1633
|
||||
6504 7081
|
||||
3191 7117
|
||||
2083 5272
|
||||
5412 3493
|
||||
1262 3960
|
||||
1408 6935
|
||||
4113 8111
|
||||
1896 4070
|
||||
2951 4895
|
||||
3896 3293
|
||||
2327 2823
|
||||
1040 6593
|
||||
168 3957
|
||||
3153 7837
|
||||
4515 8130
|
||||
938 4262
|
||||
3569 6276
|
||||
1285 5931
|
||||
4958 7424
|
||||
1735 5690
|
||||
2510 4100
|
||||
2258 2174
|
||||
6693 4939
|
||||
2856 7251
|
||||
4800 1983
|
||||
4923 1181
|
||||
7262 1539
|
||||
7629 6167
|
||||
6026 4578
|
||||
2421 7824
|
||||
863 6315
|
||||
7298 2459
|
||||
6243 769
|
||||
7914 3218
|
||||
5075 947
|
||||
4031 3880
|
||||
7417 5501
|
||||
3740 7138
|
||||
499 3554
|
||||
7040 4680
|
||||
644 4803
|
||||
6879 2086
|
||||
7750 2400
|
||||
7090 5971
|
||||
2715 4008
|
||||
5157 993
|
||||
401 4780
|
||||
469 3191
|
||||
247 3081
|
||||
2626 5305
|
||||
7831 3323
|
||||
2439 3379
|
||||
2217 3054
|
||||
3477 158
|
||||
2619 7619
|
||||
2092 2313
|
||||
806 4004
|
||||
3859 7956
|
||||
1902 7258
|
||||
7075 1306
|
||||
1584 4628
|
||||
606 4183
|
||||
7604 2746
|
||||
7725 5980
|
||||
5352 6531
|
||||
925 4829
|
||||
519 3517
|
||||
4510 6815
|
||||
3939 1583
|
||||
5587 1879
|
||||
962 2440
|
||||
3374 8056
|
||||
384 3233
|
||||
16 3750
|
||||
4294 23
|
||||
806 5983
|
||||
810 2210
|
||||
7812 5808
|
||||
3600 7564
|
||||
1672 801
|
||||
4902 1100
|
||||
2166 864
|
||||
3947 386
|
||||
1744 2375
|
||||
809 3229
|
||||
2818 7959
|
||||
2458 370
|
||||
1132 2452
|
||||
6678 2040
|
||||
8026 4273
|
||||
1752 7320
|
||||
562 3332
|
||||
5823 3949
|
||||
6820 4267
|
||||
7783 5877
|
||||
4444 2849
|
||||
4525 738
|
||||
1629 5442
|
||||
6568 4432
|
||||
6496 1497
|
||||
5229 7991
|
||||
6846 5155
|
||||
1495 7247
|
||||
270 4290
|
||||
6504 4747
|
||||
4356 8170
|
||||
7655 5576
|
||||
629 2217
|
||||
5201 7777
|
||||
1472 4426
|
||||
6273 2818
|
||||
450 5821
|
||||
538 4480
|
||||
3235 118
|
||||
4710 7913
|
||||
5357 7992
|
||||
5885 7663
|
||||
228 4242
|
||||
7840 5496
|
||||
2711 7939
|
||||
4810 96
|
||||
5888 5734
|
||||
7788 2428
|
||||
7202 5711
|
||||
6928 1142
|
||||
2411 7824
|
||||
1406 7055
|
||||
1549 894
|
||||
2250 3013
|
||||
2449 1048
|
||||
1915 640
|
||||
3065 7903
|
||||
6362 7371
|
||||
2035 6607
|
||||
2465 3099
|
||||
193 3209
|
||||
5665 3774
|
||||
3614 831
|
||||
6038 495
|
||||
1916 7336
|
||||
3753 7265
|
||||
1394 1607
|
||||
2338 1205
|
||||
1004 1462
|
||||
6195 3779
|
||||
3420 8123
|
||||
7148 5301
|
||||
2529 4608
|
||||
3574 281
|
||||
1582 2050
|
||||
601 1962
|
||||
6667 2847
|
||||
4947 359
|
||||
3245 7872
|
||||
579 4940
|
||||
2642 269
|
||||
2703 853
|
||||
912 2854
|
||||
4765 972
|
||||
6048 499
|
||||
2933 1020
|
||||
8065 3113
|
||||
4376 7932
|
||||
4678 5484
|
||||
4769 7467
|
||||
7963 5276
|
||||
7280 1548
|
||||
455 2598
|
||||
3200 3714
|
||||
7063 4333
|
||||
7967 3726
|
||||
6918 1380
|
||||
541 2072
|
||||
839 6554
|
||||
3168 4672
|
||||
7050 6858
|
||||
366 5697
|
||||
6994 5928
|
||||
7759 5807
|
||||
3523 392
|
||||
4744 53
|
||||
6376 3289
|
||||
2111 5838
|
||||
7743 5008
|
||||
3704 8171
|
||||
3707 2431
|
||||
7656 4869
|
||||
591 2448
|
||||
5981 7731
|
||||
1312 2434
|
||||
2616 521
|
||||
2282 6225
|
||||
6557 1734
|
||||
3811 1702
|
||||
1471 6985
|
||||
3270 2142
|
||||
619 5511
|
||||
64 3965
|
||||
4097 2438
|
||||
2298 7773
|
||||
5160 8035
|
||||
7463 5250
|
||||
1530 5996
|
||||
3933 1260
|
||||
1976 3259
|
||||
290 4058
|
||||
1571 7216
|
||||
1077 1464
|
||||
1643 7366
|
||||
3461 7728
|
||||
7200 3490
|
||||
5862 7720
|
||||
3034 4119
|
||||
6112 566
|
||||
1954 7443
|
||||
3793 6048
|
||||
8014 3305
|
||||
2283 7576
|
||||
7210 4879
|
||||
847 6503
|
||||
562 2637
|
||||
4350 7957
|
||||
4795 974
|
||||
4095 1188
|
||||
1271 4802
|
||||
6696 4009
|
||||
2965 7334
|
||||
3261 5206
|
||||
2671 6041
|
||||
7562 2516
|
||||
2497 4139
|
||||
2737 806
|
||||
2378 5325
|
||||
|
|
@ -31,9 +31,195 @@
|
|||
#include <CGAL/algorithm.h>
|
||||
#include <CGAL/IO/Tee_for_output_iterator.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <CGAL/tuple.h>
|
||||
#include <CGAL/utility.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
||||
namespace internal{
|
||||
|
||||
template <class ForwardIterator, class Traits>
|
||||
inline
|
||||
cpp0x::tuple<ForwardIterator,ForwardIterator,ForwardIterator,ForwardIterator>
|
||||
ch_nswe_point_with_order( ForwardIterator first, ForwardIterator last,
|
||||
ForwardIterator& n,
|
||||
ForwardIterator& s,
|
||||
ForwardIterator& w,
|
||||
ForwardIterator& e,
|
||||
const Traits& ch_traits,
|
||||
std::forward_iterator_tag )
|
||||
{
|
||||
typename Traits::Less_xy_2
|
||||
lexicographically_xy_smaller = ch_traits.less_xy_2_object();
|
||||
typename Traits::Less_yx_2
|
||||
lexicographically_yx_smaller = ch_traits.less_yx_2_object();
|
||||
n = s = w = e = first;
|
||||
unsigned i=0;
|
||||
//array use to track the position of w,e,n,s in the range. first is for the position, second to track
|
||||
//the original position after sorting
|
||||
std::pair<unsigned,unsigned> positions[4]={
|
||||
std::make_pair(0,0),
|
||||
std::make_pair(0,1),
|
||||
std::make_pair(0,2),
|
||||
std::make_pair(0,3) };
|
||||
|
||||
while ( first != last )
|
||||
{
|
||||
if ( lexicographically_xy_smaller( *first, *w )) { w = first; positions[0].first=i; }
|
||||
if ( lexicographically_xy_smaller( *e, *first )) { e = first; positions[1].first=i; }
|
||||
if ( lexicographically_yx_smaller( *n, *first )) { n = first; positions[2].first=i; }
|
||||
if ( lexicographically_yx_smaller( *first, *s )) { s = first; positions[3].first=i; }
|
||||
++first;
|
||||
++i;
|
||||
}
|
||||
ForwardIterator iterators[4]={w,e,n,s};
|
||||
std::sort(positions,positions+4);
|
||||
|
||||
return cpp0x::make_tuple(
|
||||
iterators[positions[0].second],
|
||||
iterators[positions[1].second],
|
||||
iterators[positions[2].second],
|
||||
iterators[positions[3].second]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template <class RandomAccessIterator, class Traits>
|
||||
inline
|
||||
cpp0x::tuple<RandomAccessIterator,RandomAccessIterator,RandomAccessIterator,RandomAccessIterator>
|
||||
ch_nswe_point_with_order( RandomAccessIterator first, RandomAccessIterator last,
|
||||
RandomAccessIterator& n,
|
||||
RandomAccessIterator& s,
|
||||
RandomAccessIterator& w,
|
||||
RandomAccessIterator& e,
|
||||
const Traits& ch_traits,
|
||||
std::random_access_iterator_tag)
|
||||
{
|
||||
ch_nswe_point(first,last,n,s,w,e,ch_traits);
|
||||
RandomAccessIterator iterators[4]={w,e,n,s};
|
||||
std::sort(iterators,iterators+4);
|
||||
|
||||
return cpp0x::make_tuple(
|
||||
iterators[0],
|
||||
iterators[1],
|
||||
iterators[2],
|
||||
iterators[3]
|
||||
);
|
||||
}
|
||||
|
||||
//this function does the same as ch_nswe_point but return the iterators n,s,w,e
|
||||
//sorted according to their positions in the range [first,last]
|
||||
template <class ForwardIterator, class Traits>
|
||||
inline
|
||||
cpp0x::tuple<ForwardIterator,ForwardIterator,ForwardIterator,ForwardIterator>
|
||||
ch_nswe_point_with_order( ForwardIterator first, ForwardIterator last,
|
||||
ForwardIterator& n,
|
||||
ForwardIterator& s,
|
||||
ForwardIterator& w,
|
||||
ForwardIterator& e,
|
||||
const Traits& ch_traits)
|
||||
{
|
||||
return ch_nswe_point_with_order(first,last,n,s,w,e,ch_traits,typename std::iterator_traits<ForwardIterator>::iterator_category());
|
||||
}
|
||||
|
||||
template <class ForwardIterator,class Traits>
|
||||
inline
|
||||
void ch_akl_toussaint_assign_points_to_regions(ForwardIterator first, ForwardIterator last,
|
||||
const typename Traits::Left_turn_2& left_turn,
|
||||
ForwardIterator e,
|
||||
ForwardIterator w,
|
||||
ForwardIterator n,
|
||||
ForwardIterator s,
|
||||
std::vector< typename Traits::Point_2 >& region1,
|
||||
std::vector< typename Traits::Point_2 >& region2,
|
||||
std::vector< typename Traits::Point_2 >& region3,
|
||||
std::vector< typename Traits::Point_2 >& region4,
|
||||
const Traits&)
|
||||
{
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
{
|
||||
if ( left_turn( *s, *w, *first ) ) region1.push_back( *first );
|
||||
else if ( left_turn( *e, *s, *first ) ) region2.push_back( *first );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( left_turn( *n, *e, *first ) ) region3.push_back( *first );
|
||||
else if ( left_turn( *w, *n, *first ) ) region4.push_back( *first );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class ForwardIterator,class Traits>
|
||||
inline
|
||||
void ch_akl_toussaint_assign_points_to_regions_deg(ForwardIterator first, ForwardIterator last,
|
||||
const typename Traits::Left_turn_2& left_turn,
|
||||
ForwardIterator e,
|
||||
ForwardIterator w,
|
||||
ForwardIterator n,
|
||||
ForwardIterator s,
|
||||
std::vector< typename Traits::Point_2 >& region1,
|
||||
std::vector< typename Traits::Point_2 >& region2,
|
||||
std::vector< typename Traits::Point_2 >& region3,
|
||||
std::vector< typename Traits::Point_2 >& region4,
|
||||
int duplicated_exteme_points,
|
||||
const Traits& traits)
|
||||
{
|
||||
std::vector< typename Traits::Point_2 >& r1 = (s==w?region2:region1);
|
||||
std::vector< typename Traits::Point_2 >& r3 = (n==e?region4:region3);
|
||||
switch(duplicated_exteme_points){
|
||||
case 2:
|
||||
{
|
||||
typename Traits::Orientation_2 orient = traits.orientation_2_object();
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
switch( orient(*e,*w,*first) ){
|
||||
case LEFT_TURN:
|
||||
r1.push_back( *first );
|
||||
break;
|
||||
case RIGHT_TURN:
|
||||
r3.push_back( *first );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: //this is case 1
|
||||
if (s==w || s==e){
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
r1.push_back( *first );
|
||||
else
|
||||
{
|
||||
if ( left_turn( *n, *e, *first ) ) region3.push_back( *first );
|
||||
else if ( left_turn( *w, *n, *first ) ) region4.push_back( *first );
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
for ( ; first != last; ++first )
|
||||
{
|
||||
//note that e!=w and s!=n except if the convex hull is a point (they are lexicographically sorted)
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
{
|
||||
if (s!=w && left_turn( *s, *w, *first ) ) region1.push_back( *first );
|
||||
else if (e!=s && left_turn( *e, *s, *first ) ) region2.push_back( *first );
|
||||
}
|
||||
else
|
||||
r3.push_back( *first );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}//namespace internal
|
||||
|
||||
template <class ForwardIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
|
||||
|
|
@ -52,7 +238,9 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
|
|||
|
||||
if (first == last) return result;
|
||||
ForwardIterator n, s, e, w;
|
||||
ch_nswe_point( first, last, n, s, w, e, ch_traits);
|
||||
cpp0x::tuple<ForwardIterator,ForwardIterator,ForwardIterator,ForwardIterator> ranges=
|
||||
internal::ch_nswe_point_with_order( first, last, n, s, w, e, ch_traits);
|
||||
|
||||
if (equal_points(*n, *s) )
|
||||
{
|
||||
*result = *w; ++result;
|
||||
|
|
@ -73,21 +261,35 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
|
|||
region4.push_back( *n);
|
||||
|
||||
CGAL_ch_postcondition_code( ForwardIterator save_first = first; )
|
||||
|
||||
for ( ; first != last; ++first )
|
||||
|
||||
int duplicated_exteme_points = (cpp0x::get<0>(ranges)==cpp0x::get<1>(ranges)?1:0) +
|
||||
(cpp0x::get<1>(ranges)==cpp0x::get<2>(ranges)?1:0) +
|
||||
(cpp0x::get<2>(ranges)==cpp0x::get<3>(ranges)?1:0);
|
||||
|
||||
//several calls to avoid filter failures when using n,s,e,w
|
||||
if (duplicated_exteme_points)
|
||||
{
|
||||
if ( left_turn(*e, *w, *first ) )
|
||||
{
|
||||
if ( left_turn( *s, *w, *first ) ) region1.push_back( *first );
|
||||
else if ( left_turn( *e, *s, *first ) ) region2.push_back( *first );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( left_turn( *n, *e, *first ) ) region3.push_back( *first );
|
||||
else if ( left_turn( *w, *n, *first ) ) region4.push_back( *first );
|
||||
}
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(first,cpp0x::get<0>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
if ( cpp0x::get<0>(ranges)!=cpp0x::get<1>(ranges) )
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<0>(ranges)),cpp0x::get<1>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
if ( cpp0x::get<1>(ranges)!=cpp0x::get<2>(ranges) )
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<1>(ranges)),cpp0x::get<2>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
if ( cpp0x::get<2>(ranges)!=cpp0x::get<3>(ranges) )
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<2>(ranges)),cpp0x::get<3>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
|
||||
internal::ch_akl_toussaint_assign_points_to_regions_deg(cpp0x::next(cpp0x::get<3>(ranges)),last,left_turn,e,w,n,s,region1,region2,region3,region4,duplicated_exteme_points,ch_traits);
|
||||
}
|
||||
|
||||
else{
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(first,cpp0x::get<0>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<0>(ranges)),cpp0x::get<1>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<1>(ranges)),cpp0x::get<2>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<2>(ranges)),cpp0x::get<3>(ranges),left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
internal::ch_akl_toussaint_assign_points_to_regions(cpp0x::next(cpp0x::get<3>(ranges)),last,left_turn,e,w,n,s,region1,region2,region3,region4,ch_traits);
|
||||
}
|
||||
|
||||
#if defined(CGAL_CH_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
|
||||
|| defined(NDEBUG)
|
||||
OutputIterator res(result);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
#ifndef CGAL_CONVEX_HULL_PROJECTIVE_XY_TRAITS_2_H
|
||||
#define CGAL_CONVEX_HULL_PROJECTIVE_XY_TRAITS_2_H
|
||||
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_projective_xy_traits_2.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Projection_traits_xy_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
#ifndef CGAL_CONVEX_HULL_PROJECTIVE_XZ_TRAITS_2_H
|
||||
#define CGAL_CONVEX_HULL_PROJECTIVE_XZ_TRAITS_2_H
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_projective_xz_traits_2.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Projection_traits_xz_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
#include <CGAL/predicates_on_points_2.h>
|
||||
#include <CGAL/function_objects.h>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
#ifndef CGAL_CONVEX_HULL_PROJECTIVE_YZ_TRAITS_2_H
|
||||
#define CGAL_CONVEX_HULL_PROJECTIVE_YZ_TRAITS_2_H
|
||||
|
||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_projective_yz_traits_2.h>"
|
||||
#define CGAL_REPLACEMENT_HEADER "<CGAL/Projection_traits_yz_3.h>"
|
||||
#include <CGAL/internal/deprecation_warning.h>
|
||||
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/convex_hull_2.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
typedef CGAL::Projection_traits_xy_3<Kernel> Traits;
|
||||
typedef Traits::Point_2 Point_2;
|
||||
|
||||
int main(){
|
||||
std::vector<Point_2> points;
|
||||
std::ifstream input("data/CD500");
|
||||
|
||||
double x,y;
|
||||
while (input >> x >> y){
|
||||
points.push_back(Point_2(x,y,3.));
|
||||
}
|
||||
|
||||
std::vector<Point_2> ch2;
|
||||
|
||||
CGAL::convex_hull_2(points.begin(),points.end(),std::back_inserter(ch2),Traits());
|
||||
|
||||
std::cout << ch2.size() << std::endl;
|
||||
}
|
||||
|
|
@ -10,10 +10,6 @@
|
|||
\lcTex{\usepackage{color}}
|
||||
\usepackage{nonlinkedpath}
|
||||
|
||||
% This will be the public edition of the developers manual.
|
||||
\newcommand{\InternalOnly}[1]{}
|
||||
\newcommand{\ExternalOnly}[1]{#1}
|
||||
|
||||
\makeindex
|
||||
|
||||
\begin{document}
|
||||
|
|
|
|||
|
|
@ -1,70 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Mailing Lists and Addresses
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : addresses.tex
|
||||
% authors: Susan Hert <hert@mpi-sb.mpg.de>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Mailing Lists and Addresses\label{chap:addresses}}
|
||||
\ccChapterRelease{Chapter Version: 1.0}
|
||||
\ccChapterAuthor{Susan Hert ({\tt hert@mpi-sb.mpg.de})}
|
||||
\ccIndexMainItemBegin{email addresses}
|
||||
\ccIndexMainItemBegin{mailing lists}
|
||||
|
||||
There are a number of mailing lists and email addresses that have been set
|
||||
up to communicate with various subsets of the \cgal\ community. The
|
||||
addresses that should be of interest to \cgal\ developers are as follows.
|
||||
The up-to-date addresses and archives can be found on the web site.
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt cgal-develop}]
|
||||
\index{cgal_develop mailing list@{\tt cgal-develop} mailing list}
|
||||
This list is intended for discussing detailed matters
|
||||
about implementation and development issues. All developers should
|
||||
subscribe to this list.
|
||||
|
||||
\item[\ccAnchor{mailto:cgal-commits@lists.gforge.inria.fr}{{\tt cgal-commits@lists.gforge.inria.fr}}]
|
||||
\index{cgal-commits mailing list@{\tt cgal-commits} mailing list}
|
||||
This list is read-only. It collects all automatic mails sent by
|
||||
the SVN server, one per commit, with the log messages and the URLS
|
||||
pointing to the corresponding diffs.
|
||||
Developers can subscribe to this list from
|
||||
\ccAnchor{https://gforge.inria.fr/mail/?group_id=52}{\cgal\ mailing lists page}.
|
||||
An \ccAnchor{http://lists.gforge.inria.fr/cgi-bin/mailman/private/cgal-commits}{archive}
|
||||
of this mailing list is maintained%
|
||||
\begin{ccTexOnly}
|
||||
at \nonlinkedpath|http://lists.gforge.inria.fr/cgi-bin/mailman/private/cgal-commits|
|
||||
\end{ccTexOnly}. To enter this archive, use your email address and InriaGForge
|
||||
password.
|
||||
|
||||
\item[{\tt cgal-discuss}]
|
||||
\index{cgal-discuss mailing list@{\tt cgal-discuss} mailing list}
|
||||
Users of \cgal\ post questions and discuss issues
|
||||
related to \cgal\ on this list. All developers should subscribe to this
|
||||
list so they can answer questions relevant to their packages and monitor
|
||||
the input from the users provided here.
|
||||
|
||||
\item[{\tt cgal-announce}]
|
||||
\index{cgal-announce mailing list@{\tt cgal-announce} mailing list}
|
||||
Announcements of new releases, bug fixes, special courses, etc. are posted
|
||||
to this list. The list is moderated (meaning every message posted needs
|
||||
to be approved) to keep the traffic low.
|
||||
|
||||
\item[{\tt cgal-editorial-board}]
|
||||
\index{cgal-editorial-board mailing list@{\tt cgal-editorial-board} mailing list}
|
||||
This is the email address to which you should
|
||||
send proposed design specifications (Chapter~\ref{chap:specification})
|
||||
for approval by the editorial
|
||||
board (Section~\ref{sec:editorial_board}). Anyone can do that
|
||||
at any time about any \cgal\ design issues.
|
||||
\end{description}
|
||||
|
||||
The mailing lists at \texttt{lists.gforge.inria.fr} and
|
||||
\texttt{lists-sop.inria.fr} are currently maintained by
|
||||
Sylvain Pion, Mariette Yvinec, Monique Teillaud.
|
||||
\ccIndexMainItemEnd{email addresses}
|
||||
\ccIndexMainItemEnd{mailing lists}
|
||||
|
|
@ -15,11 +15,6 @@
|
|||
\input{Developers_manual/index_see}
|
||||
|
||||
\include{Developers_manual/intro}
|
||||
\InternalOnly{
|
||||
\include{Developers_manual/specification}
|
||||
%\include{Developers_manual/directory_structure}
|
||||
\include{Developers_manual/tools}
|
||||
}
|
||||
\include{Developers_manual/code_format}
|
||||
\include{Developers_manual/kernels}
|
||||
\include{Developers_manual/traits_classes}
|
||||
|
|
@ -31,16 +26,6 @@
|
|||
\include{Developers_manual/iterators_and_circulators}
|
||||
\include{Developers_manual/robustness}
|
||||
\include{Developers_manual/portability}
|
||||
%\InternalOnly{
|
||||
%\include{Developers_manual/testing}
|
||||
%}
|
||||
\include{Developers_manual/debugging}
|
||||
%\InternalOnly{
|
||||
%\include{Developers_manual/examples_and_demos}
|
||||
%}
|
||||
\include{Developers_manual/submission_process}
|
||||
\InternalOnly{
|
||||
\include{Developers_manual/releases}
|
||||
%\include{Developers_manual/addresses}
|
||||
}
|
||||
\include{Developers_manual/information_sources}
|
||||
|
|
|
|||
|
|
@ -1,436 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Directory Structure for Packages
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : directory_structure.tex
|
||||
% authors: Geert-Jan Giezeman <geert@cs.uu.nl> & Susan Hert <hert@mpi-sb.mpg.de>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Directory Structure for Packages\label{chap:directory_structure}}
|
||||
\ccIndexMainItemBegin{directory structure}
|
||||
\ccIndexSubitemBegin{submitting}{directory structure for}
|
||||
\ccChapterRelease{Chapter Version: 1.1}
|
||||
\ccChapterAuthor{Geert-Jan Giezeman ({\tt geert@cs.uu.nl})\\
|
||||
Susan Hert ({\tt hert@mpi-sb.mpg.de})\\
|
||||
Sylvain Pion}
|
||||
|
||||
In order for code, demos, documentation, {\em etc.} developed for \cgal\ to
|
||||
be included in an automated way into the internal (and public) releases of the
|
||||
library, the files must be organized in a specific directory structure, which
|
||||
we describe here. We describe the entire directory structure for a package.
|
||||
Not every package will have all the parts described here. Only the files
|
||||
{\tt maintainer} and {\tt description.txt}
|
||||
are obligatory.
|
||||
\index{maintainer file@{\tt maintainer} file}
|
||||
\ccIndexMainItem{\tt description.txt}
|
||||
Submissions should not contain files in other places than described here.
|
||||
It is possible to have some under SVN, but they need to be listed in the
|
||||
\ccc{dont_submit} file to avoid being submitted.
|
||||
Make sure your package does not have any file clashing with any other packages
|
||||
(for example two files named {\tt simple\_example.cpp} in the example directories of
|
||||
two different packages will clash in the target names of cmake).
|
||||
|
||||
|
||||
The directory structure of a package named Package should be as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
+--- dont_submit
|
||||
|
|
||||
+--- include/CGAL/
|
||||
|
|
||||
+--- src/{CGAL|CGALQt|...}/
|
||||
|
|
||||
+--- test/<testdir>/
|
||||
|
|
||||
+--- doc_tex/
|
||||
|
|
||||
+--- examples/<exampledir>/
|
||||
|
|
||||
+--- demo/<demodir>/
|
||||
|
|
||||
+--- benchmark/<benchmarkdir>/
|
||||
|
|
||||
+--- auxiliary/
|
||||
|
|
||||
+--- scripts/
|
||||
|
|
||||
+--- developer_scripts/
|
||||
|
|
||||
+--- package_info/Package/
|
||||
|
|
||||
+- description.txt
|
||||
|
|
||||
+- long_description.txt
|
||||
|
|
||||
+- maintainer
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt include/CGAL}]\index{include/CGAL directory@{\tt include/CGAL} directory}
|
||||
\index{source\ files!{\tt .h} files}
|
||||
contains the {\tt .h} files for the package.
|
||||
\item[{\tt src}]\index{src directory@{\tt src} directory}
|
||||
\index{source\ files!{\tt .cpp} files}
|
||||
contains the {\tt .cpp} files (if any) for the package.
|
||||
They are gathered in subdirectories corresponding to each
|
||||
library (be it static or shared).
|
||||
\item[{\tt test}]\index{test directory@{\tt test} directory!for
|
||||
packages} contains the test suite code for the package. See
|
||||
Section~\ref{sec:test_subdirectory} for a detailed description.
|
||||
\item[{\tt doc\_tex}]\index{doc_tex directory@{\tt doc\_tex} directory}
|
||||
\ccIndexSubitem{source files}{documentation}
|
||||
contains the documentation for the user and reference manuals.
|
||||
These are the files used to produce the manuals for public releases and
|
||||
to run the internal release reference manual test suite.
|
||||
See Section~\ref{sec:doc_tex_subdirectory} for a detailed description
|
||||
of this subdirectory.
|
||||
See Chapter~\ref{chap:specification} for guidelines for producing
|
||||
the documentation.
|
||||
\item[{\tt examples}]\index{examples directory@{\tt examples} directory}
|
||||
contains the example programs for the package.
|
||||
See Section~\ref{sec:examples_subdirectory} for a detailed
|
||||
description of this subdirectory.
|
||||
\item[{\tt demo}]\index{demo directory@{\tt demo} directory}
|
||||
contains the demo programs for the package.
|
||||
Contrary to example programs, demo programs are not expected to be
|
||||
usable on all platforms. Demo programs may depend on platform-specific
|
||||
software and may require user interaction. They are compiled but not
|
||||
run in the test suite. See Section~\ref{sec:demo_subdirectory} for a
|
||||
more detailed description of this subdirectory.
|
||||
\item[{\tt benchmark}]\index{benchmark directory@{\tt benchmark} directory}
|
||||
contains the benchmark programs for the package.
|
||||
See Section~\ref{sec:benchmark_subdirectory} for a detailed
|
||||
description of this subdirectory.
|
||||
\item[{\tt auxiliary}]\index{auxiliary directory@{\tt auxiliary}
|
||||
directory} contains auxiliary software for CGAL. For
|
||||
instance, GMP goes here when using the Windows installer.
|
||||
The average package won't have this directory.
|
||||
\item[{\tt scripts}]\index{scripts directory@{\tt scripts}
|
||||
directory} contains scripts that are of interest to \cgal\ users.
|
||||
\item[{\tt developer\_scripts}]\index{developers\_scripts
|
||||
directory@{\tt developers\_scripts} directory} contains
|
||||
scripts that are of interest to \cgal\ developers. This directory
|
||||
is included in internal releases only, not in public releases.
|
||||
\item[{\tt dont\_submit}]%
|
||||
\ccIndexMainItem{\tt dont\_submit} specifies files and directories
|
||||
that are to be excluded from the release, for example:
|
||||
\begin{verse}
|
||||
TODO\\
|
||||
include/CGAL/my\_internal\_file.h\\
|
||||
benchmark
|
||||
\end{verse}
|
||||
\item[{\tt package\_info/Package/description.txt}]%
|
||||
\ccIndexMainItem{\tt description.txt}
|
||||
should give a very short description of the contents of the package.
|
||||
\item[{\tt long\_description.txt}]%
|
||||
\ccIndexMainItem[c]{\tt package\_info/Package/long\_description.txt}
|
||||
may be added with more detailed information about the package.
|
||||
\item[\ccAnchor{maintainer}{{\tt package\_info/Package/maintainer}}]%
|
||||
\index{maintainer file@{\tt maintainer} file}
|
||||
should be used to name the maintainers of the package. The file should
|
||||
have for each maintainer a line with the following format:
|
||||
\begin{verse}
|
||||
{\it name} $<${\it email address}$>$\\
|
||||
\end{verse}
|
||||
For example:
|
||||
\begin{verse}
|
||||
{\it Susan Hert} $<$hert@mpi-sb.mpg.de$>$\\
|
||||
{\it Sylvain Pion} $<$Sylvain.Pion@sophia.inria.fr$>$\\
|
||||
\end{verse}
|
||||
\end{description}
|
||||
|
||||
|
||||
A package has a name, which identifies it. This name should obey the same
|
||||
rules as for C identifiers: it consists of letters, digits and underscores and
|
||||
it does not start with a digit. Choose a name that is descriptive, yet not
|
||||
too long (under 25 characters). If a package deals with objects of a
|
||||
particular dimension, then use the suffixes \_2, \_3, and \_d, especially if
|
||||
there exists (or may exist in the future) a package with similar
|
||||
functionality in different dimensions. Examples of good package names are
|
||||
\texttt{Triangulation\_2} for a package dealing with triangulations of points
|
||||
in the plane and \texttt{Min\_ellipse\_2}, which contains an algorithm that
|
||||
finds the minimal enclosing ellipse of a set of points in the plane. The
|
||||
package names \texttt{pm} and \texttt{arr} are a bit too terse.
|
||||
\texttt{Planar\_map} and \texttt{Arrangement} (or
|
||||
\texttt{Arrangement\_2}) are better.
|
||||
|
||||
\section{{\tt test} subdirectory}
|
||||
\label{sec:test_subdirectory}
|
||||
\index{test directory@{\tt test} directory|(}
|
||||
\ccIndexMainItemBegin{test suite}
|
||||
|
||||
This directory contains the test suite for the package. Here we just
|
||||
briefly list the files contained in such a directory. For more
|
||||
detailed information about testsuites for \cgal\ packages refer to
|
||||
Chapter~\ref{chap:testing}.
|
||||
|
||||
\begin{verbatim}
|
||||
test/<testdir>
|
||||
+--- data/
|
||||
|
|
||||
+--- include/
|
||||
|
|
||||
|- CMakeLists.txt
|
||||
|
|
||||
|- cgal_test
|
||||
|
|
||||
|- *.cpp
|
||||
|
|
||||
|- *.cin
|
||||
\end{verbatim}
|
||||
where the directory \verb|<testdir>| has a name that corresponds to the package
|
||||
name.
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt data/}] is a subdirectory that contains local data files for the
|
||||
test suite\index{data directory@{\tt data} directory}.
|
||||
\item[{\tt include/}] is a subdirectory that contains local include files for
|
||||
the test suite.
|
||||
\item[{\tt cgal\_test}]\index{cgal_test script@{\tt cgal\_test}
|
||||
script|(} is the script that will be called when the entire
|
||||
test suite is run. As this file is created automatically
|
||||
during the release process, submitting it is error-prone and
|
||||
thus {\bf strongly discouraged}.
|
||||
|
||||
For testing purposes, such a script can be created using the
|
||||
{\tt create\_cgal\_test}%
|
||||
\index{create_cgal_test script@{\tt create\_cgal\_test} script}
|
||||
script (Section~\ref{sec:create_cgal_test}).
|
||||
\index{cgal_test script@{\tt cgal\_test} script|)}
|
||||
|
||||
\item[{\tt CMakeLists.txt}]\ccIndexSubitem{\tt CMakeLists.txt}{test suite}
|
||||
is the CMake configuration file for the test programs. It is created
|
||||
automatically, just like {\tt cgal\_test}. Submitting it is
|
||||
{\bf strongly discouraged}, and the only reason for submitting one is
|
||||
when the automatic generation script cannot produce a working CMake
|
||||
configuration file.
|
||||
|
||||
Such a {\tt CMakeLists.txt} can be created using the script
|
||||
{\tt cgal\_create\_cmake\_script}%
|
||||
\index{cgal_create_cmake_script script@{\tt cgal\_create\_cmake\_script} script}
|
||||
with the argument {\tt -t}
|
||||
(Section~\ref{sec:cgal_create_cmake_script}).
|
||||
\item[{\tt *.cpp}] source code for the test programs.
|
||||
\ccIndexSubitem{source files}{test suite}
|
||||
|
||||
When a test program runs correctly, it should return
|
||||
\ccIndexSubsubitem{test suite}{program}{return value} the
|
||||
value zero, or, more precisely, the value \verb|EXIT_SUCCESS|
|
||||
defined in \verb|<cstdlib>|.
|
||||
Test programs may not be graphical and they may not require any user
|
||||
interaction.\ccIndexSubitem{test suite}{program}
|
||||
\item[{\tt *.cin}] files containing command-line input for
|
||||
\index{test\ suite!input!from {\tt cin}}
|
||||
test programs. These files are necessary for only those programs
|
||||
that require command-line input (which can usually be avoided).
|
||||
If a file \texttt{program.cin} is
|
||||
present in the test directory, then, when the test suite is run,
|
||||
\texttt{program} will be executed using the command
|
||||
\begin{verbatim}
|
||||
./program < program.cin
|
||||
\end{verbatim}
|
||||
\end{description}
|
||||
|
||||
\section{{\tt doc\_tex} subdirectory}
|
||||
\label{sec:doc_tex_subdirectory}
|
||||
\index{doc_tex directory@{\tt doc\_tex} directory|(}
|
||||
\ccIndexSubitemBegin{manuals}{source files}
|
||||
\ccIndexSubitemBegin{source files}{documentation}
|
||||
|
||||
As described in Chapter~\ref{chap:specification}, the \cgal\ documentation is
|
||||
organized in subdirectories for each package and the different manuals
|
||||
are assembled from these packages. Contained in these
|
||||
subdirectories are the files required for producing a package's contributions
|
||||
to the different reference and users' manuals. The users' manual input
|
||||
files are located in the package's directory; the reference manual files are
|
||||
be located in a directory named $<Package>${\tt \_ref}
|
||||
\index{ref directory@{\tt \_ref} directory}.
|
||||
For both the users' manual and reference manual parts, the input can be
|
||||
split into more than one file (In fact, this is necessary for the reference
|
||||
manual in order to support conversion to HTML;
|
||||
see Section~\ref{sec:ref_manual}.), but there must be a file called
|
||||
{\tt main.tex} in both the user and reference manual directories that inputs
|
||||
all the other files for that manual part.
|
||||
({\bf Note}: You should use the \verb|\input| command and NOT the
|
||||
\verb|\include| command to input other source files in this file, and
|
||||
they have to include their files using relative paths starting in the
|
||||
\texttt{doc\_tex} directory.)
|
||||
|
||||
For example, the optimisation package of
|
||||
the basic library can have the following documentation.
|
||||
\begin{verbatim}
|
||||
doc_tex/Optimisation
|
||||
|--- main.tex
|
||||
|
|
||||
|--- *.tex
|
||||
|
|
||||
+--- *.((pdf)|(gif)|(jpg)|(png))
|
||||
|
||||
doc_tex/Optimisation_ref/
|
||||
|--- main.tex
|
||||
|
|
||||
|--- intro.tex
|
||||
|
|
||||
|--- *.tex
|
||||
|
|
||||
+--- *.((pdf)|(gif)|(jpg)|(png))
|
||||
|
||||
\end{verbatim}
|
||||
|
||||
\begin{description}
|
||||
\item[{\tt main.tex}]%
|
||||
\ccIndexMainItem{\tt main.tex}\ccIndexSubitem{users' manual}{\tt
|
||||
main.tex} must contain one chapter. It must NOT
|
||||
contain a preamble (so no {\tt documentclass}, {\tt usepackage},
|
||||
\verb|\begin{document}| or \verb|\end{document}| commands).
|
||||
If you want more than one chapter in the documentation of this
|
||||
package you have to put each chapter in its own \LaTeX\ file,
|
||||
and include those files in \texttt{main.tex} using the \verb|\input|
|
||||
macro.
|
||||
\item[{\tt intro.tex}]%
|
||||
\ccIndexMainItem{\tt intro.tex}%
|
||||
\ccIndexSubitem{reference manual}{\tt intro.tex}
|
||||
is not mandatory but common for reference manual chapter. It
|
||||
contains a brief introduction to the package (one paragraph) and
|
||||
lists the different concepts, classes, functions, etc. that are
|
||||
contained in this package in a systematic way.
|
||||
\item[{\tt *.tex}] -- the source files for the Users' and Reference
|
||||
Manual that are input by {\tt main.tex}
|
||||
\item[{\tt *.pdf}] -- the PDF pictures included in
|
||||
the PDF documentation.
|
||||
\item[{\tt *.((gif)|(jpg)|(png))}] -- the raster images included in
|
||||
the HTML documentation.
|
||||
\end{description}
|
||||
\ccIndexSubitemEnd{source files}{documentation}
|
||||
\ccIndexSubitemEnd{manuals}{source files}
|
||||
\index{doc_tex directory@{\tt doc\_tex} directory|)}
|
||||
|
||||
|
||||
\section{{\tt examples} subdirectory}
|
||||
\label{sec:examples_subdirectory}
|
||||
\index{examples directory@{\tt examples} directory|(}
|
||||
\ccIndexSubitemBegin{example programs}{submitting}
|
||||
|
||||
Example programs (Chapter~\ref{chap:examples_and_demos}) for a package should
|
||||
be placed in a subdirectory of the directory {\tt examples}.
|
||||
The subdirectory name, \verb|<exampledir>|, will usually correspond to the
|
||||
package name, but this is not a requirement.
|
||||
To make sure that the examples will be tested%
|
||||
\ccIndexSubitem{test suite}{examples in},
|
||||
a directory with examples
|
||||
should be submitted in exactly the same way as a test directory
|
||||
(Section~\ref{sec:test_subdirectory}).
|
||||
|
||||
The structure of an example directory should be as follows:
|
||||
\begin{verbatim}
|
||||
examples/<exampledir>
|
||||
+--- data/
|
||||
|
|
||||
+--- include/
|
||||
|
|
||||
|- README
|
||||
|
|
||||
|- cgal_test
|
||||
|
|
||||
|- CMakeLists.txt
|
||||
|
|
||||
|- *.cpp
|
||||
\end{verbatim}
|
||||
|
||||
\ccIndexSubitem{source files}{examples}
|
||||
The file {\tt README} should contain information about what the programs do
|
||||
and how to compile them.
|
||||
See the rules for a test directory for an explanation of the other files
|
||||
and subdirectories.
|
||||
\ccIndexSubitemEnd{example programs}{submitting}
|
||||
\index{examples directory@{\tt examples} directory|)}
|
||||
|
||||
|
||||
\section{{\tt demo} subdirectory}
|
||||
\label{sec:demo_subdirectory}
|
||||
\index{demo directory@{\tt demo} directory|(}
|
||||
\ccIndexMainItem{demo programs}
|
||||
\ccIndexSubitemBegin{demo programs}{submitting}
|
||||
|
||||
The {\tt demo} directory (Chapter~\ref{chap:examples_and_demos}) contains
|
||||
programs with graphical interfaces or programs requiring user input. These
|
||||
programs will be compiled but not run by the test suite.
|
||||
\ccIndexSubitem{test suite}{demos in}
|
||||
The structure of this directory should be as follows:
|
||||
\begin{verbatim}
|
||||
demo/<demodir>
|
||||
+--- data/
|
||||
|
|
||||
+--- include/
|
||||
|
|
||||
|- README
|
||||
|
|
||||
|- CMakeLists.txt
|
||||
|
|
||||
|- *.cpp
|
||||
\end{verbatim}
|
||||
where \verb|<demodir>| is a name that corresponds (at least in part) to
|
||||
the package for which it is a demo.
|
||||
\ccIndexSubitem{source files}{demos}
|
||||
|
||||
The file {\tt README} should contain information about what the program does,
|
||||
and how to compile it ({\it i.e.}, what graphical libraries are needed,
|
||||
{\it etc.}). Note that, in contrast to example and test programs,
|
||||
demo programs more often need to submit a {\tt CMakeLists.txt}
|
||||
\ccIndexSubitem{\tt CMakeLists.txt}{demo programs} since
|
||||
different demos will require different libraries and thus the {\tt CMakeLists.txt}
|
||||
for these programs will be somewhat dissimilar.
|
||||
\ccIndexMainItem{demo programs}
|
||||
\ccIndexSubitemEnd{demo programs}{submitting}
|
||||
\index{demo directory@{\tt demo} directory|)}
|
||||
|
||||
|
||||
\section{{\tt benchmark} subdirectory}
|
||||
\label{sec:benchmark_subdirectory}
|
||||
\index{benchmark directory@{\tt benchmark} directory|(}
|
||||
\ccIndexSubitemBegin{benchmark programs}{submitting}
|
||||
|
||||
Benchmark programs for a package should be placed in a subdirectory of the directory {\tt benchmark}.
|
||||
The subdirectory name, \verb|<benchmarkdir>|, will usually correspond to the
|
||||
package name, but this is not a requirement.
|
||||
|
||||
Benchmark programs are currently not subject to any automatic treatment in the
|
||||
test-suite, although they could evolve into an automatic benchmark-suite at
|
||||
some point. We suggest at directory organization similar to the one of
|
||||
\verb|<exampledir>|.
|
||||
|
||||
Some data sets can be placed under the {\tt data} subdirectory of \verb|<benchmarkdir>|,
|
||||
but we recommend that only a small number of small files go there. Extensive
|
||||
benchmarks data sets should probably be gathered elsewhere, so as not to bloat
|
||||
the SVN server.
|
||||
|
||||
\index{benchmark directory@{\tt benchmark} directory|)}
|
||||
|
||||
|
||||
\ccIndexSubitemEnd{submitting}{directory structure for}
|
||||
\ccIndexMainItemEnd{directory structure}
|
||||
|
||||
\InternalOnly{
|
||||
|
||||
\section{Requirements and recommendations\label{sec:directories_req_and_rec}}
|
||||
|
||||
\noindent
|
||||
Requirements:
|
||||
\begin{itemize}
|
||||
\item The directory structure outlined here must be followed exactly.
|
||||
\end{itemize}
|
||||
|
||||
\noindent
|
||||
Recommendations:
|
||||
\begin{itemize}
|
||||
\item Do not submit {\tt CMakeLists.txt}s for example programs and test suite
|
||||
programs.
|
||||
\item Do not submit the script {\tt cgal\_test} used to compile and test
|
||||
your test suite programs.
|
||||
\end{itemize}
|
||||
|
||||
}
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
\chapter{Example and Demo Programs\label{chap:examples_and_demos}}
|
||||
\ccIndexMainItemBegin{example programs}
|
||||
\ccIndexMainItemBegin{demo programs}
|
||||
|
||||
{\HUGE This page is no longer maintained. The content has been moved to
|
||||
|
||||
https://cgal.geometryfactory.com/CGAL/Members/wiki/Examples_and_Demo_Programs}
|
||||
|
||||
The best way to illustrate the functionality provided by the library
|
||||
is through programs that users can compile, run, copy and modify to
|
||||
their hearts' content. Thus every package should contain some of
|
||||
these programs. In \cgal\ we distinguish between two types of
|
||||
programs: those that provided graphical output (demos) and those that
|
||||
do not (examples).
|
||||
|
||||
In this chapter we provide guidelines for the development
|
||||
of these programs and their inclusion in the documentation. See
|
||||
Sections~\ref{sec:examples_subdirectory} and~\ref{sec:demo_subdirectory}
|
||||
for a description of the directory structure required for example and
|
||||
demo programs, respectively. Note in particular that each directory
|
||||
should contain a \texttt{README} file that explains what the programs do and
|
||||
how one interacts with them.
|
||||
|
||||
\section{Coding conventions\label{sec:ex_and_demo_coding}}
|
||||
\ccIndexSubitem{example programs}{coding conventions}
|
||||
\ccIndexSubitem{demo programs}{coding conventions}
|
||||
|
||||
Remember that these programs are likely to be a user's first introduction
|
||||
to the library, so you should be careful to follow our coding conventions
|
||||
(Chapter~\ref{chap:code_format}) and good programming practice in these
|
||||
programs. In particular:
|
||||
|
||||
\begin{itemize}
|
||||
\item Do \textbf{not} use the statements
|
||||
\begin{verbatim}
|
||||
using namespace CGAL;
|
||||
using namespace std;
|
||||
\end{verbatim}
|
||||
\ccIndexSubitem{\tt using}{in examples and demos}
|
||||
We discourage the use of these as they introduce more names than
|
||||
are necessary and may lead to more conflicts than are necessary.
|
||||
\item As of release 2.3, you can include only the kernel include file
|
||||
(\eg, \texttt{Cartesian.h} or \texttt{Homogeneous.h}) to get all
|
||||
kernel classes as well as the \texttt{basic.h} file. All example
|
||||
and demo programs should do this. For example, you should have
|
||||
simply:
|
||||
\begin{verbatim}
|
||||
#include <CGAL/Cartesian.h>
|
||||
\end{verbatim}
|
||||
instead of:
|
||||
\begin{verbatim}
|
||||
#include <basic.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/Triangle_2.h>
|
||||
#include <CGAL/Segment_3.h>
|
||||
// etc.
|
||||
\end{verbatim}
|
||||
\item Types should be declared using the following syntax:
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef Kernel::Point_2 Point_2;
|
||||
typedef Kernel::Triangle_3 Triangle_3;
|
||||
\end{verbatim}
|
||||
instead of this syntax:
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef Point_2<Kernel> Point_2;
|
||||
typedef Triangle_3<Kernel> Triangle_3;
|
||||
\end{verbatim}
|
||||
Although both will work, the former is to be preferred since
|
||||
it reflects that the types are actually part of the kernel and
|
||||
also reflects the new (as of release 2.3) kernel design that allows
|
||||
types to be easily exchanged and adapted.
|
||||
|
||||
Note also that the typedef used above is
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
\end{verbatim}
|
||||
instead of
|
||||
\begin{verbatim}
|
||||
typedef CGAL::Cartesian<double> R; // for representation
|
||||
\end{verbatim}
|
||||
This also reflects the new design, where the kernel classes are
|
||||
kernels containing objects and predicates not just representation
|
||||
classes for the objects.
|
||||
\end{itemize}
|
||||
|
||||
\section{The Programs\label{sec:ex_and_demo_content}}
|
||||
\ccIndexSubitem{example programs}{content}
|
||||
\ccIndexSubitem{demo programs}{content}
|
||||
|
||||
The following guidelines should be followed to the greatest extent possible
|
||||
when writing the example and demo programs.
|
||||
\begin{itemize}
|
||||
\item Provide simple programs with which a beginner can get started.
|
||||
\item Provide more involved programs that illustrate the power of the
|
||||
software.
|
||||
\item Provide programs that truly exercise the data structure. Though you
|
||||
may have some canned programs that work on fixed data sets to
|
||||
illustrate specific things, you should also have one (or more)
|
||||
programs that work on
|
||||
\ccAnchor{http://www.cgal.org/Manual/doc_html/support_lib/Generator/Chapter_generators.html}{randomly generated} or user-generated data.
|
||||
This illustrates confidence in the software (and can also build
|
||||
confidence by highlighting bugs).
|
||||
\item Take some care to design a good interface to the program;
|
||||
the packaging of a product does make a difference.
|
||||
\end{itemize}
|
||||
|
||||
\section{Including programs in documentation\label{sec:programs_in_doc}}
|
||||
\ccIndexSubitem{example programs}{in manuals}
|
||||
|
||||
All programs included in the documentation should be included in either
|
||||
the \texttt{examples} or the \texttt{demo} directory to ensure that:
|
||||
\begin{itemize}
|
||||
\item[(a)] the programs will be included in the test suite and
|
||||
\item[(b)] the user can more easily use the example program
|
||||
\end{itemize}
|
||||
The macro to do this inclusion is \verb|\ccIncludeExampleCode|.
|
||||
See Chapter~\ref{chap:specification} and the documentation of the
|
||||
\ccAnchor{http://www.cgal.org/Members/Manual_tools}{Manual tools} for more
|
||||
details.
|
||||
|
||||
The reverse statement, that all programs in the \texttt{examples}
|
||||
and \texttt{demo} directory should be included in the documentation,
|
||||
is not necessarily true. Ideally the programs included in the documentation
|
||||
will be a proper (non-empty) subset of the programs included in the
|
||||
distribution.
|
||||
|
||||
Please make sure that your example programs do not have too lengthy lines
|
||||
as they are copied verbatim in the manual, which can trigger overflows
|
||||
in the PDF manual.
|
||||
|
||||
\section{Demo programs on the web\label{sec:demos_web_page}}
|
||||
\ccIndexSubitem{demo programs}{on the web}
|
||||
|
||||
Demo programs for some packages are accessible from the
|
||||
\ccAnchor{http://www.cgal.org/Manual/latest/doc_html/cgal_manual/packages.html}{package overview}
|
||||
web page \lcTex{ (\path|http://www.cgal.org/Manual/latest/doc\_html/cgal\_manual/packages.html|)}.
|
||||
For each demo on the page, we have a precompiled executable for the
|
||||
Windows platform.
|
||||
|
||||
If you have other demos you would like to add to the page (and the more
|
||||
here the better), you should do the following:
|
||||
\begin{enumerate}
|
||||
\item Compile the demo and create a screen shot (as a \texttt{.gif} or
|
||||
\texttt{.jpg} file) and then create a smaller version of this
|
||||
(approx $235 \times 280$) that can be used as a ``thumbnail''
|
||||
(admittedly for a rather large thumb) on the page. These names of
|
||||
the image files should be as follows:
|
||||
\centerline{\ccc{<program>_}\texttt{[big|small].[gif|jpg]}},
|
||||
where \textit{$<$prog\_name$>$} is the name of the program from which
|
||||
the screen shots were made (an nice mnemonic name like
|
||||
\ccc{alpha_shapes_2} or \ccc{hull_of_int_points_2}).
|
||||
|
||||
\item Create the \texttt{.exe} file for use under Windows (probably with the
|
||||
compiler optimization flags turned on)
|
||||
\item \texttt{gzip} the \texttt{.exe} file
|
||||
\item Package these together with the source code using the following structure:
|
||||
\begin{verbatim}
|
||||
images/demo/<program>_big.[gif|jpg]
|
||||
demo/<program>.exe
|
||||
demo/<subdir>/<program>.cpp
|
||||
\end{verbatim}
|
||||
where \ccc{<subdir>} is the name of the subdirectory in which the program
|
||||
is (or will be) found in the distribution. \ccc{<program>} should be a
|
||||
name that is self-explanatory (\eg, \texttt{demo.cpp} is a bad name here).
|
||||
|
||||
\item Send the package to \ccAnchor{mailto:ameyer@mpi-sb.mpg.de}{the web page
|
||||
maintainer} together with a one-paragraph description similar to the
|
||||
ones on the page already.
|
||||
\end{enumerate}
|
||||
|
||||
\InternalOnly{
|
||||
|
||||
\section{Requirements and recommendations\label{sec:ex_and_demos_req_and_rec}}
|
||||
|
||||
\noindent
|
||||
Requirements:
|
||||
\begin{itemize}
|
||||
\item Follow the coding conventions outlined in
|
||||
Section~\ref{sec:ex_and_demo_coding}.
|
||||
\item Include all example and demo programs from the documentation in
|
||||
the \texttt{examples} or \texttt{demo} directories.
|
||||
\end{itemize}
|
||||
|
||||
\noindent
|
||||
Recommendations:
|
||||
\begin{itemize}
|
||||
\item Place a demo of your package on the web site.
|
||||
\end{itemize}
|
||||
|
||||
}
|
||||
|
||||
\ccIndexMainItemEnd{example programs}
|
||||
\ccIndexMainItemEnd{demo programs}
|
||||
|
|
@ -52,10 +52,6 @@ Work on \cgal\ has been supported in the past by {\sc esprit iv}
|
|||
projects 21957 (CGAL) and 28155 (GALIA).
|
||||
|
||||
|
||||
\InternalOnly{
|
||||
\input{Developers_manual/manual_organization}
|
||||
}
|
||||
|
||||
\input{Developers_manual/philosophy}
|
||||
|
||||
\input{Developers_manual/overall_design}
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
\section{Manual organization\label{sec:manual_org}}
|
||||
|
||||
This manual is meant to be a resource for developers who wish to contribute
|
||||
to the \cgal\ library either by designing new packages or maintaining
|
||||
or enhancing existing ones. The manual is organized roughly in the order in
|
||||
which a developer will need the information in order to produce a package
|
||||
for the library. We begin in this chapter with a description
|
||||
of the design goals of \cgal\ and the overall design, which should be kept
|
||||
in mind during all stages of development. The remaining chapters describe
|
||||
in more concrete terms the requirements and recommendations for documentation,
|
||||
code writing, and testing that are derived from these goals. We also describe
|
||||
a number of tools that have been created to help in the development process
|
||||
and give pointers to other sources of information.
|
||||
|
||||
A description of how the specification
|
||||
for a package should be documented is provided along with information about
|
||||
the tools available to help produce the documentation
|
||||
in Chapter~\ref{chap:specification}.
|
||||
Chapter~\ref{chap:svn} discusses the SVN server on which all \cgal\ source
|
||||
code is kept.
|
||||
Chapter~\ref{chap:directory_structure} describes the directory structure
|
||||
required for a package and Chapter~\ref{chap:tools} describes a set of tools
|
||||
that may be used to create or modify various files required within this
|
||||
directory structure. Chapters~\ref{chap:code_format}
|
||||
through~\ref{chap:robustness}
|
||||
discuss issues related to the writing of code that is in keeping with
|
||||
the goals of \cgal. Chapter~\ref{chap:portability} describes issues
|
||||
related to the configuration of \cgal\ and
|
||||
discusses portability issues for various platforms.
|
||||
Chapter~\ref{chap:debugging} consists of various hints for debugging.
|
||||
Information
|
||||
about how to submit a package's specification to the editorial board
|
||||
for approval and the implementation (and documentation) for inclusion in
|
||||
internal releases is presented in Chapter~\ref{chap:submission}.
|
||||
Chapter~\ref{chap:releases} gives information about the creation of the
|
||||
internal, public, and bug-fix releases.
|
||||
Chapters~\ref{chap:addresses} and Chapter~\ref{chap:info}
|
||||
provide information about mailing lists and other information
|
||||
resources developers might find useful.
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
\chapter{Making Releases\label{chap:releases}}
|
||||
|
||||
This chapter is going to be replaced by the technical feature of Eric et al.
|
||||
That is the branching stuff.
|
||||
|
||||
\section{Internal Releases\label{sec:internal_releases}}
|
||||
\ccIndexSubitem{releases}{internal}
|
||||
|
||||
Internal releases are currently created daily from a script run
|
||||
at GeometryFactory. This script packages together the current versions of all
|
||||
packages into a tar file and publish a tarball at
|
||||
\path'http://cgal.geometryfactory.com/CGAL/Members/Releases/'.
|
||||
People responsible for running the test suite can pick it up automatically
|
||||
using the {\tt autotest\_cgal} script (Section~\ref{sec:autotest_cgal}).
|
||||
|
||||
\section{Public Releases\label{sec:public_releases}}
|
||||
\ccIndexSubitem{releases}{public}
|
||||
|
||||
A public release can be created from an internal release by following the
|
||||
steps detailed in the
|
||||
\texttt{README} file in the package \texttt{Release} on the SVN server.
|
||||
\index{SVN server!Release package@\texttt{Release} package}
|
||||
This file describes how to create the code, the documentation and the
|
||||
updated web pages for a new release.
|
||||
|
||||
Each public release is tagged on the SVN server with a tag in the following
|
||||
format \texttt{CGAL\_N\_release}, where \texttt{N} is the release number
|
||||
with all `.'s replaced by `\_'s (\eg, for release 3.0, the tag is
|
||||
\texttt{CGAL\_3\_0\_release}. There is also a branch created for
|
||||
each release with the name \texttt{CGAL\_N\_branch}, where \texttt{N} is
|
||||
the release number as before. This facilitates the creation of bug fix
|
||||
releases.
|
||||
|
||||
%\section{Bug Fix Releases}
|
||||
%\label{sec:bug_fix_releases}
|
||||
%\ccIndexSubitem{releases}{bug fix}
|
||||
%\ccIndexMainItem{bug fixe}
|
||||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
\chapter{Specification Documentation\label{chap:specification}}
|
||||
|
||||
This chapter is going to be moved to the wiki by Luis and Laurent.
|
||||
|
||||
\ccChapterRelease{Chapter Version: 2.0}
|
||||
\ccChapterAuthor{Susan Hert ({\tt hert@mpi-sb.mpg.de})\\
|
||||
Lutz Kettner ({\tt kettner@mpi-sb.mpg.de}) }
|
||||
|
|
@ -57,7 +55,7 @@ is to make it so complicated that there are no obvious deficiencies.
|
|||
|
||||
\cgal\ is physically structured into
|
||||
packages\ccIndexMainItem{package}, which is reflected in the SVN
|
||||
repository structure, see Chapter~\ref{chap:svn}. Generally, each
|
||||
repository structure. Generally, each
|
||||
package in the library will contribute some chapters to the manuals,
|
||||
some might only contribute a section to some larger chapter.
|
||||
|
||||
|
|
@ -136,8 +134,7 @@ organization.
|
|||
|
||||
\ccIndexSubitem{directory structure}{for documentation}
|
||||
It is required that the documentation submitted with a package be organized
|
||||
according to a specific directory structure, which is described more
|
||||
completely in Section~\ref{sec:doc_tex_subdirectory}. In summary, all
|
||||
according to a specific directory structure. In summary, all
|
||||
{\tt .tex} source files and corresponding figures are kept in a
|
||||
\texttt{doc\_tex} subdirectory of the package. The following rules
|
||||
describe the details:
|
||||
|
|
@ -194,8 +191,7 @@ describe the details:
|
|||
contain a short introductory section, give an overview of the
|
||||
reference pages contained in this chapter, and mention
|
||||
optionally with a non-numbered section labeled \textbf{Assertions}
|
||||
the string used in the package-specific assertion macros
|
||||
(Section~\ref{sec:checks_controlling}).
|
||||
the string used in the package-specific assertion macros.
|
||||
\end{itemize}
|
||||
|
||||
This is all that is needed for a package manual and the
|
||||
|
|
@ -1498,8 +1494,7 @@ Requirements:
|
|||
\item There must be a {\tt main.tex} file for both the users' manual
|
||||
and reference manual parts of the documentation.
|
||||
\item Files must be organized according to the directory structure
|
||||
outlined in Section~\ref{sec:files_required} and further detailed
|
||||
in Section~~\ref{sec:doc_tex_subdirectory}.
|
||||
outlined in Section~\ref{sec:files_required}.
|
||||
\item Indexing commands must be placed in the text to achieve the
|
||||
goals listed in Section~\ref{sec:indexing}.
|
||||
\item Example programs included in the manual should also be distributed
|
||||
|
|
|
|||
|
|
@ -9,19 +9,7 @@
|
|||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
% \InternalOnly{
|
||||
% \chapter{Submitting Packages\label{chap:submission}}
|
||||
% \ccChapterRelease{Chapter Version: 1.0}
|
||||
% \ccChapterAuthor{Geert-Jan Giezeman\\ %({\tt geert@cs.uu.nl})\\
|
||||
% Susan Hert\\ %({\tt hert@mpi-sb.mpg.de})\\
|
||||
% Monique Teillaud ({\tt Monique.Teillaud@inria.fr})}
|
||||
|
||||
% \section{Editorial board\label{sec:editorial_board}}
|
||||
% }
|
||||
|
||||
%\ExternalOnly{
|
||||
\chapter{Editorial Board\label{chap:submission}\label{sec:editorial_board}}
|
||||
%}
|
||||
\ccIndexMainItemBegin{editorial board}
|
||||
|
||||
|
||||
|
|
@ -69,8 +57,7 @@ due to the recommendations of the board.
|
|||
% However, since it can take some time for the board to process
|
||||
% submissions, packages that are to become part of the library
|
||||
% can be submitted
|
||||
% \InternalOnly{as detailed in
|
||||
% Section~\ref{sec:electronic_submission}} before approval.
|
||||
% before approval.
|
||||
% Inclusion in an internal release does not ensure inclusion in a public
|
||||
% release.
|
||||
Only after approval by the board will packages be included in new
|
||||
|
|
@ -78,65 +65,3 @@ public releases and then only if they pass the test suite, of course.
|
|||
|
||||
The current list of members of the editorial board can be found on the
|
||||
\ccAnchor{http://www.cgal.org/people.html}{web site}.
|
||||
|
||||
% \InternalOnly{
|
||||
% \section{Electronic submission\label{sec:electronic_submission}}
|
||||
% \ccIndexMainItemBegin{submitting}
|
||||
|
||||
% Whether you produce library code, demos, documentation or something else,
|
||||
% if you want it to become part of \cgal, you'll have to submit it in
|
||||
% the form of a wiki page on the
|
||||
% \ccAnchor{https://cgal.geometryfactory.com/CGAL/Members/wiki/Features}{Feature page}
|
||||
% or on the
|
||||
% \ccAnchor{https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features}{Small Features page},
|
||||
% and announce it by email to the
|
||||
% \ccAnchor{mailto:cgal-editorial-board@lists-sop.inria.fr}{board}
|
||||
% \lcTex{(\texttt{cgal-editorial-board@lists-sop.inria.fr})}.
|
||||
|
||||
% The package itself has to be a folder under SVN experimental
|
||||
% packages.
|
||||
% The directory structure required for a package is described in
|
||||
% Chapter~\ref{chap:directory_structure}.
|
||||
|
||||
%Here we focus on how to submit a package.
|
||||
|
||||
% \ccIndexSubitem{naming scheme}{package}
|
||||
% A package has a name, which identifies it. This name should obey the same
|
||||
% rules as for C identifiers: it consists of letters, digits and underscores and
|
||||
% it does not start with a digit. Choose a name that is descriptive, yet not
|
||||
% too long (under 25 characters). If a package deals with objects of a
|
||||
% particular dimension, then use the suffixes \_2, \_3, and \_d, especially if
|
||||
% there exists (or may exist in the future) a package with similar
|
||||
% functionality in different dimensions. Examples of good package names are
|
||||
% \texttt{Triangulation\_2} for a package dealing with triangulations of points
|
||||
% in the plane and \texttt{Min\_ellipse\_2}, which contains an algorithm that
|
||||
% finds the minimal enclosing ellipse of a set of points in the plane. The
|
||||
% package names \texttt{pm} and \texttt{arr} are a bit too terse.
|
||||
% \texttt{Planar\_map} and \texttt{Arrangement} (or
|
||||
% \texttt{Arrangement\_2}) are better.
|
||||
|
||||
% Make sure your package does not have any file clashing with any other packages.
|
||||
% Please also make sure the information such as the maintainer email adress is
|
||||
% up to date under the \texttt{package\_info} directory.
|
||||
% \ccIndexSubitem{submitting}{file for}
|
||||
|
||||
% \ccIndexMainItemEnd{submitting}
|
||||
|
||||
|
||||
% Monique: I would just remove this section
|
||||
% \section{Requirements and recommendations\label{sec:submission_req_and_rec}}
|
||||
|
||||
% \noindent
|
||||
% Requirements:
|
||||
% \begin{itemize}
|
||||
% \item Submit specifications to the editorial board.
|
||||
% \item Obey the directory structure outlined in Chapter~\ref{chap:directory_structure}.
|
||||
% \end{itemize}
|
||||
|
||||
% \noindent
|
||||
% Recommendations:
|
||||
% \begin{itemize}
|
||||
% \item Wait for approval from the editorial board before submitting packages
|
||||
% for internal releases.
|
||||
% \end{itemize}
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -1,403 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Testing
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : testing.tex
|
||||
% authors: Mathair Baeskin <baeskin@infsn2.informatik.uni-halle.de>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Testing\label{chap:testing}}
|
||||
\ccChapterRelease{Chapter Version: 1.2}
|
||||
\ccChapterAuthor{Matthias B\"asken}
|
||||
\ccChapterAuthor{Yves Brise ({\tt ybrise@inf.ethz.ch})}
|
||||
\ccIndexMainItemBegin{test suite}
|
||||
|
||||
%\section{Introduction}
|
||||
{\HUGE This page is no longer maintained. The content has been moved to
|
||||
|
||||
https://cgal.geometryfactory.com/CGAL/Members/wiki/Testing}
|
||||
|
||||
The \cgal\ test suite is a way to test the compilation and execution of \cgal\
|
||||
programs automatically (\ie, without user interaction) on a number of
|
||||
different platforms. Developers should, of course, thoroughly test their
|
||||
code on their own development platform(s) \textbf{before} submitting it.
|
||||
The test suite serves as a way to test on additional platforms not available
|
||||
to the developer.
|
||||
|
||||
\section{What a test suite for a package should contain\label{sec:whats_in_test_suite}}
|
||||
|
||||
The test suite helps the developer(s) of a package to
|
||||
\begin{itemize}
|
||||
\item detect compilation problems on the various platforms
|
||||
\item detect runtime problems
|
||||
\item check the correctness of the algorithms in the package
|
||||
\end{itemize}
|
||||
|
||||
That does not mean that the test suite is a platform for initial testing of
|
||||
code. New code should be tested on different platforms by the developer
|
||||
before submission.
|
||||
|
||||
It is strongly recommended for a test suite of a package to
|
||||
\begin {itemize}
|
||||
\item Cover the complete code of the package; every (member) function
|
||||
should be called at least once. (See Section~\ref{sec:gcov} for
|
||||
a description of a tool you can use to test for code coverage.)
|
||||
\item Use more than one instantiation of templated functions or classes.
|
||||
\item A lot of classes in \cgal\ can be parametrized by traits classes, so
|
||||
that they are usable with different kernels. In such cases more than one
|
||||
kernel should be used for testing.
|
||||
\item Use pre- and postcondition checkers wherever it is possible in the
|
||||
main code. In the test-suite code itself, the macro \ccc{assert}
|
||||
should be used in place of \ccc{CGAL_assertion} to check
|
||||
all conditions, since \ccc{assert} is not disabled by \ccc{CGAL_NDEBUG}.
|
||||
\end {itemize}
|
||||
|
||||
\section{Using the code coverage tool \texttt{gcov}}
|
||||
\label{sec:gcov}
|
||||
|
||||
The tool {\tt gcov} can be used together with the GNU C++ compiler to test
|
||||
for code coverage in your programs and may be helpful when you create your
|
||||
\cgal\ test suite programs. You can find a complete guide to this tool
|
||||
in the GNU on-line documentation at
|
||||
\path|http://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_6.html|.
|
||||
If you want to use the code coverage tool {\tt gcov}, you have to compile
|
||||
your programs with the options \texttt{-fprofile-arcs} and
|
||||
\texttt{-ftest-coverage}. This generates a file called
|
||||
\texttt{your\_program.gcda}. Then you run the program, which generates a file
|
||||
\texttt{your\_program.gcno}. Finally, you can run \texttt{gcov your\_program.cpp}.
|
||||
This will generate a number of files with the ending \texttt{.gcov} which contain
|
||||
human readable information. View it in a text editor.
|
||||
Here is a simple example:\\
|
||||
\begin{verbatim}
|
||||
#include<iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void fu(int val)
|
||||
{
|
||||
int w,v=0;
|
||||
if (val==0) {
|
||||
cout << "val == 0!\n";
|
||||
for(w=0;w<100;w++) v=v+w;
|
||||
}
|
||||
else {
|
||||
cout << "val != 0!\n";
|
||||
for(w=0;w<10;w++) v=v+w;
|
||||
}
|
||||
|
||||
cout << "v:" << v << "\n";
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
fu(0);
|
||||
return 0;
|
||||
}
|
||||
\end{verbatim}
|
||||
First you have to compile the example program \texttt{test.cpp} with the special
|
||||
options. Then you have to execute it, and, after this, \texttt{gcov} can be
|
||||
used.
|
||||
\begin{verbatim}
|
||||
g++ -fprofile-arcs -ftest-coverage -o test test.cpp
|
||||
test
|
||||
gcov test.cpp
|
||||
\end{verbatim}
|
||||
\texttt{gcov} will create a file \texttt{test.cpp.gcov} containing output
|
||||
from \texttt{gcov}:
|
||||
\begin{verbatim}
|
||||
#include<iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void fu(int val)
|
||||
1 {
|
||||
1 int w,v=0;
|
||||
1 if (val==0) {
|
||||
1 cout << "val == 0!\n";
|
||||
1 for(w=0;w<100;w++) v=v+w;
|
||||
}
|
||||
###### else {
|
||||
###### cout << "val != 0!\n";
|
||||
###### for(w=0;w<10;w++) v=v+w;
|
||||
}
|
||||
|
||||
1 cout << "v:" << v << "\n";
|
||||
}
|
||||
|
||||
int main()
|
||||
1 {
|
||||
1 fu(0);
|
||||
1 return 0;
|
||||
}
|
||||
\end{verbatim}
|
||||
The lines that were not executed will be marked with \verb|######|,
|
||||
so you will see what should be added in the (\cgal) test suite programs.
|
||||
|
||||
There are a few pitfalls when using CMake and \texttt{gcov} together.
|
||||
First note, that with CMake you can add compiler flags using the \texttt{CGAL\_CXX\_FLAGS} variable. See the
|
||||
\ccAnchor{http://www.cgal.org/Manual/latest/doc_html/installation_manual/Chapter_installation_manual.html#Subsection_8.2}{\cgal Installation Manual} to get more information on that. Typing \texttt{make your\_program} to compile your program is straightforward, as is running it. But then, the \texttt{.gcda}
|
||||
and \texttt{.gcno} are created within the directory \texttt{CMakeFiles/your\_program.dir/} relative to your project path. You first have to copy them to the same folder where \texttt{your\_program.cpp} resides.
|
||||
If you don't do that, running \texttt{gcov your\_program.cpp} will give an error
|
||||
message.
|
||||
|
||||
|
||||
\section{Test suite directory\label{sec:test_suite_directory}}
|
||||
|
||||
The test suite is located in the directory {\tt test} of the internal
|
||||
releases of \cgal. This directory is not part of external releases. The
|
||||
directory {\tt test}\index{test directory@{\tt test} directory!for test suite}
|
||||
contains:
|
||||
\begin{itemize}
|
||||
\item a script {\tt run\_testsuite}
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script}
|
||||
that is (not surprisingly) used to run the test suite.
|
||||
\item a subdirectory for every package included in the internal release.
|
||||
These subdirectories are created from the {\tt test} directories
|
||||
of the packages by copying the source, include, and input files from
|
||||
these directories and adding makefiles and {\tt cgal\_test} scripts
|
||||
where needed. See Section~\ref{sec:test_subdirectory} for more
|
||||
information about the proper structure of the {\tt test} directory
|
||||
for a package.
|
||||
\index{test directory@{\tt test} directory!for packages}
|
||||
\item a subdirectory with a name that ends in {\tt \_Examples} for every
|
||||
package that was submitted with an {\tt examples} directory
|
||||
(Section~\ref{sec:examples_subdirectory})
|
||||
\index{examples directory@{\tt examples} directory}
|
||||
\ccIndexSubitem{test suite}{examples in}
|
||||
\ccIndexSubitem{example programs}{in test suite}
|
||||
\item a subdirectory with a name that ends in {\tt \_Demo} for every
|
||||
package that was submitted with a {\tt demo} directory
|
||||
(Section~\ref{sec:demo_subdirectory})
|
||||
\index{demo directory@{\tt demo} directory}
|
||||
\ccIndexSubitem{test suite}{demos in}
|
||||
\ccIndexSubitem{demo programs}{in test suite}
|
||||
\end{itemize}
|
||||
|
||||
The test suite will attempt to compile all the programs in the
|
||||
subdirectories of {\tt test} and to run all except
|
||||
the demo programs (which usually require user interaction) by using the
|
||||
{\tt cgal\_test} scripts
|
||||
(Sections~\ref{sec:test_subdirectory} and~\ref{sec:create_cgal_test})
|
||||
\index{cgal_test script@{\tt cgal\_test} script}
|
||||
and will save the results in files in the package subdirectories
|
||||
(Section~\ref{sec:test_suite_output}).
|
||||
Even if a program fails to compile or run, the test suite will continue.
|
||||
|
||||
|
||||
\section{Test suite input\label{sec:test_suite_input}}
|
||||
\ccIndexSubitemBegin{test suite}{input}
|
||||
|
||||
Input to programs in the test suite can be supplied in three different
|
||||
ways:
|
||||
\begin{description}
|
||||
\item[data files in the {\tt data} directory]
|
||||
\index{data directory@{\tt data} directory}
|
||||
\ccIndexSubsubitem{test suite}{input}{from files}
|
||||
As described in Section~\ref{sec:test_subdirectory}, a package's
|
||||
{\tt test} directory may contain a subdirectory {\tt data} that
|
||||
contains input files for the test programs.
|
||||
\item[{\tt *.cin} files]
|
||||
\index{test\ suite!input!from {\tt cin}}
|
||||
If a test program \texttt{program.cpp} requires input from standard
|
||||
input (\ie, {\tt cin}), you should put a file called
|
||||
\texttt{program.cin} in the test directory.
|
||||
The test suite will then execute the program using the command
|
||||
\begin{verbatim}
|
||||
./program < program.cin
|
||||
\end{verbatim}
|
||||
\item[command-line arguments supplied in the {\tt cgal\_test} script]
|
||||
\ccIndexSubsubitem{test suite}{input}{from command-line}
|
||||
{\em You are discouraged from using this option to give input values
|
||||
to your programs} since it requires you to edit and submit a
|
||||
{\tt cgal\_test} script; see Section~\ref{sec:create_cgal_test}.
|
||||
|
||||
\index{cgal_test script@{\tt cgal\_test} script}
|
||||
However, if a test program \texttt{program.cpp} absolutely requires
|
||||
command-line parameters, you should do the following. Use
|
||||
\texttt{create\_cgal\_test} to create the script \texttt{cgal\_test}.
|
||||
This file contains an entry of the form
|
||||
\begin{verbatim}
|
||||
compile_and_run program
|
||||
\end{verbatim}
|
||||
Just put the command-line
|
||||
parameters for \texttt{program} at the end of this line:
|
||||
\begin{verbatim}
|
||||
compile_and_run program arg1 arg2 ..
|
||||
\end{verbatim}
|
||||
The test suite will then execute the program using the command
|
||||
|
||||
\begin{verbatim}
|
||||
./program <arg1> <arg2> ...
|
||||
\end{verbatim}
|
||||
\end{description}
|
||||
\ccIndexSubitemEnd{test suite}{input}
|
||||
|
||||
|
||||
\section{Running the test suite\label{sec:running_test_suite}}
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script|(}
|
||||
|
||||
The test suite is run using the {\tt run\_testsuite} script that is distributed
|
||||
with every internal release in the {\tt test} directory. There are several
|
||||
ways you can customize this script to meet you needs:
|
||||
|
||||
\begin{itemize}
|
||||
\item Add additional compiler and linker flags by setting the variables
|
||||
{\tt TESTSUITE\_CXXFLAGS}%
|
||||
\index{TESTSUITE_CXXFLAGS variable@{\tt TESTSUITE\_CXXFLAGS} variable}
|
||||
and {\tt TESTSUITE\_LDFLAGS}
|
||||
\index{TESTSUITE_LDFLAGS variable@{\tt TESTSUITE\_LDFLAGS} variable}
|
||||
\ccIndexSubitem{header files}{overriding}
|
||||
at the top of the
|
||||
script. These variables are prepended to {\tt CXX\_FLAGS} and
|
||||
{\tt LDFLAGS}, respectively, in the test suite makefiles. So, for
|
||||
example, if you have a directory \verb|experimental/include/CGAL|
|
||||
containing new or experimental \cgal\ files, you can do the following:
|
||||
\begin{center}
|
||||
\verb|TESTSUITE_CXXFLAGS="-Iexperimental/include"|
|
||||
\end{center}
|
||||
and in this way test with your new files without overwriting
|
||||
the originals.
|
||||
|
||||
\item Export additional environment variables by adding lines to the
|
||||
\ccIndexSubitem{environment variables}{test suite}
|
||||
\ccIndexSubitem{test suite}{environment variables}
|
||||
{\tt run\_testsuite} script. As an example, it will be demonstrated
|
||||
how to export the {\tt LD\_LIBRARY\_PATH} by editing \texttt{run\_testsuite}.%
|
||||
\index{LD_LIBRARY_PATH variable@{\tt LD\_LIBRARY\_PATH} variable}
|
||||
\begin{enumerate}
|
||||
\item Add the line
|
||||
\begin{center}
|
||||
\verb|LD_LIBRARY_PATH=<your library path>|
|
||||
\end{center}
|
||||
to the script.
|
||||
\item Append {\tt LD\_LIBRARY\_PATH} to the line
|
||||
\begin{center}
|
||||
\verb|export PLATFORM CGAL_MAKEFILE TESTSUITE_CXXFLAGS TESTSUITE_LDFLAGS|
|
||||
\end{center}
|
||||
in the script.
|
||||
\end{enumerate}
|
||||
|
||||
After this, the programs from the test suite will be run using the
|
||||
{\tt LD\_LIBRARY\_PATH} that was specified in step 1.
|
||||
|
||||
\item Run the test suite on more than one platform by adding a line at the
|
||||
bottom of the script of the form
|
||||
\begin{verbatim}
|
||||
run_testsuite <include makefile>
|
||||
\end{verbatim}
|
||||
for every platform that you wish to test. Just substitute for
|
||||
\verb|<include makefile>| the appropriate include makefiles that
|
||||
were generated during installation. (Don't forgot to use the
|
||||
full path name for the makefile!) By default, the last line in the
|
||||
file is
|
||||
\begin{verbatim}
|
||||
run_testsuite $CGAL_MAKEFILE
|
||||
\end{verbatim}
|
||||
so you need not make any changes if you run the testsuite on only one
|
||||
platform and have set the {\tt CGAL\_MAKEFILE} environment variable
|
||||
properly.%
|
||||
\index{CGAL_MAKEFILE variable@{\tt CGAL\_MAKEFILE} variable!and test suite}
|
||||
\end{itemize}
|
||||
|
||||
After these steps you are ready to run the test suite. It can be run in two
|
||||
different ways:
|
||||
\begin{verbatim}
|
||||
./run_testsuite
|
||||
\end{verbatim}
|
||||
|
||||
The test suite will run the tests from all test directories. This may take a
|
||||
considerable amount of time.
|
||||
|
||||
\begin{verbatim}
|
||||
./run_testsuite <dir1> <dir2> ...
|
||||
\end{verbatim}
|
||||
|
||||
The test suite will run only the test programs in the test directories
|
||||
\begin{verbatim}<dir1> <dir2> ... \end{verbatim}
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script|)}
|
||||
|
||||
To run an entire \cgal\ test suite automatically, including downloading of
|
||||
an internal release, configuration, and installation of the library, you
|
||||
can use the {\tt autotest\_cgal} script described in
|
||||
Section~\ref{sec:autotest_cgal}.
|
||||
|
||||
|
||||
\section{Files generated by the test suite\label{sec:test_suite_output}}
|
||||
\ccIndexSubitemBegin{test suite}{output files}
|
||||
|
||||
The testsuite will generate the following output files:
|
||||
|
||||
\begin{itemize}
|
||||
\item \verb|<testdir>/ErrorOutput_<platform>|
|
||||
\index{ErrorOutput files@{\tt ErrorOutput} files}
|
||||
|
||||
This file contains two lines for every program that was tested on
|
||||
platform \texttt{<platform>} in the test directory \texttt{<testdir>}.
|
||||
The first line
|
||||
tells if the compilation was successful and the second line tells if
|
||||
the execution was successful (\ie, the program returned the value 0).
|
||||
(See Section~\ref{sec:test_subdirectory} for more details.)
|
||||
|
||||
\item \verb|<testdir>/ProgramOutput.<program>.<platform>|
|
||||
\index{ProgramOutput files@{\tt ProgramOutput} files}
|
||||
|
||||
This file contains the console output from the test program
|
||||
\texttt{<program.cpp>} run on platform \texttt{<platform>}.
|
||||
|
||||
\item \verb|<testdir>/CompilerOutput_<platform>|
|
||||
\index{CompilerOutput files@{\tt CompilerOutput} files}
|
||||
|
||||
This file contains the compiler output from platform
|
||||
\texttt{<platform>} for all programs.
|
||||
|
||||
\item \verb|error.txt|
|
||||
\index{error.txt@{\tt error.txt}}
|
||||
|
||||
This is just a concatenation of all the \texttt{ErrorOutput} files that were
|
||||
generated during the last run of the test suite.
|
||||
\end{itemize}
|
||||
\ccIndexSubitemEnd{test suite}{output files}
|
||||
|
||||
|
||||
\section{Test suite results\label{sec:test_suite_results}}
|
||||
\ccIndexSubitemBegin{test suite}{results}
|
||||
The results of test suites run on the various supported or soon-to-be-supported
|
||||
platforms are posted on the
|
||||
\ccAnchor{http://cgal.geometryfactory.com/CGAL/Members/testsuite/}%
|
||||
{test suite results}
|
||||
page
|
||||
\lcTex{(\path|http://cgal.geometryfactory.com/CGAL/Members/testsuite/|)}.
|
||||
\ccIndexSubitemEnd{test suite}{results}
|
||||
|
||||
\section{Requirements and recommendations\label{sec:testing_req_and_rec}}
|
||||
|
||||
\noindent
|
||||
Requirements:
|
||||
\begin{itemize}
|
||||
\item Test your code thoroughly \textbf{before} submitting it.
|
||||
\item Obey the directory structure detailed in Section~\ref{sec:test_subdirectory}
|
||||
\item Check the test suite results for your package regularly.
|
||||
\end{itemize}
|
||||
|
||||
\noindent
|
||||
Recommendations:
|
||||
\begin{itemize}
|
||||
\item Write test suite programs that use more than one instantiation of
|
||||
templated functions and classes, call every member function at least
|
||||
once, and use more than one kernel.
|
||||
\item Use pre- and postcondition checkers.
|
||||
\item Use \texttt{gcov} to test your code for coverage.
|
||||
\item Don't submit a makefile for your test suite unless you need to do
|
||||
something very special to compile or link your program. If you find
|
||||
you want to do something very special in your makefile, think long
|
||||
and hard about whether it's really necessary or not.
|
||||
\item Don't submit the script \texttt{cgal\_test} with your package.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\ccIndexMainItemEnd{test suite}
|
||||
|
||||
|
||||
|
|
@ -1,851 +0,0 @@
|
|||
% =============================================================================
|
||||
% The CGAL Developers' Manual
|
||||
% Chapter: Tools
|
||||
% -----------------------------------------------------------------------------
|
||||
% file : tools.tex
|
||||
% authors: Geert-Jan Giezeman <geert@cs.uu.nl>
|
||||
% -----------------------------------------------------------------------------
|
||||
% $Id$
|
||||
% $Date$
|
||||
% =============================================================================
|
||||
|
||||
\chapter{Scripts and Other Tools\label{chap:tools}}
|
||||
|
||||
\ccIndexMainItemBegin{tools}
|
||||
\ccChapterRelease{Chapter Version: 1.0}
|
||||
\ccChapterAuthor{Geert-Jan Giezeman ({\tt geert@cs.uu.nl})}
|
||||
|
||||
This chapter is going to be moved to the wiki by Eric Berberich.
|
||||
|
||||
Eric: Be aware that cgal\_create\_assertions.sh (commented out in the sources)
|
||||
is now public; there are a few words about it in Section~\ref{sec:checks_controlling}.
|
||||
|
||||
There are a number of tools that automate some of the tedious and
|
||||
error-prone tasks that are unavoidable when developing for \cgal.
|
||||
Most of these scripts can be in at least two places.
|
||||
\begin{itemize}
|
||||
\item in every internal release (directory {\tt developer\_scripts} or
|
||||
{\tt scripts})
|
||||
\item in the package
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/?root=cgal}
|
||||
{Scripts} on the SVN server%
|
||||
\index{SVN server!Scripts package@\texttt{Scripts} package}%
|
||||
\begin{ccTexOnly}
|
||||
(\path|https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/?root=cgal|)
|
||||
\end{ccTexOnly}.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\section{{\tt create\_new\_release}}
|
||||
\label{sec:create_new_release}
|
||||
\index{create_new_release script@{\tt create\_new\_release} script|(}
|
||||
\ccIndexMainItem{release building}
|
||||
|
||||
The script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/developer_scripts/create_new_release?root=cgal&view=markup}
|
||||
{{\tt create\_new\_release}} builds a tarball of \cgal\ from an SVN working
|
||||
copy of the trunk (or a branch).
|
||||
The command
|
||||
\begin{verse}
|
||||
{\tt create\_new\_release}
|
||||
\end{verse}
|
||||
creates a directory {\tt tmp} which contains the tarball, as well as its
|
||||
public and SRPM versions.
|
||||
|
||||
This script takes as argument the name of an SVN working copy of a branch,
|
||||
and it default to {\tt trunk}. It also supports the following options:
|
||||
\begin{description}
|
||||
\item[--rpm] create SRPM files as well
|
||||
\item[--public] create a public version as well
|
||||
\item[--do-it] (reserved to the release manager) moves it on the web server,
|
||||
tags...
|
||||
\item[--do-not-tag] option that allows to create a new release with
|
||||
\texttt{--do-it} without creating the tag.
|
||||
\end{description}
|
||||
\index{create_new_release script@{\tt create\_new\_release} script|)}
|
||||
|
||||
%% \section{{\tt cgal\_create\_assertions.sh}}
|
||||
%% \label{sec:cgal_create_assertions}
|
||||
%% \index{cgal_create_assertions.sh script@{\tt cgal\_create\_assertions.sh} script|(}
|
||||
%% \ccIndexMainItem{assertions}
|
||||
|
||||
%% The shell script
|
||||
%% %\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/scripts/cgal_create_assertions.sh?root=cgal&view=markup}
|
||||
%% {{\tt cgal\_create\_assertions.sh}} generates assertion header files.
|
||||
%% The command
|
||||
%% \begin{verse}
|
||||
%% {\tt cgal\_create\_assertions.sh minkowski}
|
||||
%% \end{verse}
|
||||
%% creates a file {\tt minkowski\_assertions.h}.
|
||||
%% This file is usually placed in directory {\tt include/CGAL} and included in
|
||||
%% files that implement the minkowski package.
|
||||
%% The file contains several macros for adding checks (preconditions,
|
||||
%% postconditions, {\em etc.}) that can be switched on or off with compile
|
||||
%% flags.
|
||||
%% You can read more about the use of these package-level checks in
|
||||
%% Section~\ref{sec:checks_controlling}.
|
||||
%% \index{cgal_create_assertions.sh script@{\tt cgal\_create\_assertions.sh} script|)}
|
||||
|
||||
\section{{\tt cgal\_create\_makefile}}
|
||||
\label{sec:cgal_create_makefile}
|
||||
\index{cgal_create_makefile script@{\tt cgal\_create\_makefile} script|(}
|
||||
\ccIndexSubitemBegin{\tt makefile}{creating}
|
||||
|
||||
The shell script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/scripts/cgal_create_makefile?root=cgal&view=markup}
|
||||
{{\tt cgal\_create\_makefile}} creates a \cgal\ makefile
|
||||
in the current working directory.
|
||||
The makefile will have rules to make an executable from every {\tt .C}
|
||||
and {\tt .cpp} file which contains the word {\tt main} in the directory.
|
||||
The following options are available to indicate the kind of makefile
|
||||
to create:
|
||||
\begin{description}
|
||||
\item[-d] create a default CGAL makefile
|
||||
\item[-t] create a CGAL makefile for the test suite
|
||||
\item[-q] create a CGAL makefile with Qt support
|
||||
\end{description}
|
||||
|
||||
You should use this script to create makefiles for testing before submitting
|
||||
your packages, but you should {\bf avoid} customizing the makefile for your
|
||||
package and then submitting the makefiles for your test suite and example
|
||||
programs.\ccIndexSubitem{\tt makefile}{submitting}
|
||||
Makefiles get created automatically when a release is made. This ensures
|
||||
that the most up-to-date makefiles are created. Experience has shown
|
||||
that makefiles need to be updated from time to time, especially if new
|
||||
compilers are supported. When makefiles are submitted as part of a package,
|
||||
they tend to get outdated.
|
||||
Moreover, creating a makefile that works for a diverse range of compilers
|
||||
is difficult.
|
||||
|
||||
The makefiles created by this script have two hooks for customization.
|
||||
If the directory
|
||||
where the makefile is created contains a directory named {\tt include},%
|
||||
\index{include directory@{\tt include} directory!local}
|
||||
that
|
||||
directory will be on the header search path before any other files. This
|
||||
provides a means to override header files%
|
||||
\ccIndexSubitem{header files}{overriding}.
|
||||
Furthermore, the makefiles in the
|
||||
test suite (created with the {\tt -t} option), contain the variable
|
||||
{\tt EXTRA\_FLAGS}.\ccIndexSubitem{\tt makefile}{test suite}%
|
||||
\index{extra_flags variable@{\tt EXTRA\_FLAGS} variable}
|
||||
This variable can be set, {\em e.g.}, as an environment variable in
|
||||
{\tt cgal\_test}, to add {\tt -I} or {\tt -D} options.
|
||||
\ccIndexSubitemEnd{\tt makefile}{creating}
|
||||
\index{cgal_create_makefile script@{\tt cgal\_create\_makefile} script|)}
|
||||
|
||||
\section{{\tt cgal\_create\_cmake\_script}}
|
||||
\label{sec:cgal_create_cmake_script}
|
||||
\index{cgal_create_cmake_script script@{\tt cgal\_create\_cmake\_script} script|(}
|
||||
\ccIndexSubitemBegin{\tt cmake script}{creating}
|
||||
|
||||
The shell script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/scripts/cgal_create_cmake_script?root=cgal&view=markup}
|
||||
{{\tt cgal\_create\_cmake\_script}} creates a \cgal\ cmake script, that is, a {\tt CMakeLists.txt} file,
|
||||
in the current working directory for configuring a particular \cgal\ application (such as an example, demo or test).
|
||||
|
||||
The cmake script will have commands to make an executable from every {\tt .C}
|
||||
and {\tt .cpp} file which contains the word {\tt main} in the directory.
|
||||
The following options are available to indicate the kind of cmake script
|
||||
to create:
|
||||
\begin{description}
|
||||
\item[-q] create a CMake script with Qt support
|
||||
\end{description}
|
||||
|
||||
|
||||
You should use this script to create a {\tt 'CMakeLists.txt'} for testing before submitting
|
||||
your packages, but you should {\bf avoid} customizing the {\tt CMakeLists.txt} for your
|
||||
package and then submitting it. \ccIndexSubitem{\tt 'CMakeLists.txt'}{submitting}
|
||||
CMake scripts get created automatically when a release is made. This ensures
|
||||
that the most up-to-date {\tt 'CMakeLists.txt'} is created. Experience has shown
|
||||
that cmake scripts need to be updated from time to time.
|
||||
When cmake scripts are submitted as part of a package, they tend to get outdated.
|
||||
|
||||
|
||||
The {\tt 'CMakeLists.txt'} created by this script has the following properties:
|
||||
|
||||
If the directory where the cmake script is created contains a directory named {\tt include},%
|
||||
\index{include directory@{\tt include} directory!local}
|
||||
that directory will be on the header search path before any other files. This
|
||||
provides a means to override header files%
|
||||
\ccIndexSubitem{header files}{overriding}.
|
||||
|
||||
The \cgal\ library is required (must have been already configured) and
|
||||
cmake must be called with {\tt '-DCGAL\_DIR={\em <path>}'},
|
||||
where {\em <path>} corresponds to the binary directory of the \cgal\ installation
|
||||
(where the file 'CGALConfig.cmake' is).
|
||||
|
||||
While cmake itself takes care automatically of most compiler and linker flags based
|
||||
on the target compiler and debug/release configuration, additional flags
|
||||
might have been specified when building \cgal\ and will be used here
|
||||
(as defined in 'CGALConfig.cmake'). However, if you
|
||||
need {\em additional} compiler or linker flags specifically here,
|
||||
you can define any of the following cmake variables at the command line
|
||||
when running cmake (via the -D option):
|
||||
|
||||
\begin{verbatim}
|
||||
CGAL_CXX_FLAGS
|
||||
CGAL_CXX_FLAGS_RELEASE
|
||||
CGAL_CXX_FLAGS_DEBUG
|
||||
CGAL_EXE_LINKER_FLAGS
|
||||
CGAL_EXE_LINKER_FLAGS_RELEASE
|
||||
CGAL_EXE_LINKER_FLAGS_DEBUG
|
||||
\end{verbatim}
|
||||
|
||||
The \_RELEASE and \_DEBUG variables are {\em appended} to the general variable, so for each
|
||||
build type, two sets of flags are used. For example: CGAL\_CXX\_FLAGS {\em then} CGAL\_CXX\_FLAGS\_DEBUG
|
||||
|
||||
\ccIndexSubitemEnd{\tt cmake script}{creating}
|
||||
\index{cgal_create_cmake_script script@{\tt cgal\_create\_cmake\_script} script|)}
|
||||
|
||||
|
||||
\section{{\tt create\_cgal\_test}}
|
||||
\label{sec:create_cgal_test}
|
||||
\index{create_cgal_test script@{\tt create\_cgal\_test} script|(}
|
||||
\index{cgal_test script@{\tt cgal\_test} script|(}
|
||||
|
||||
In every subdirectory of {\tt test} there must be a shell script called
|
||||
{\tt cgal\_test}. This script is called from the {\tt run\_testsuite}%
|
||||
\index{run_testsuite script@{\tt run\_testsuite} script}
|
||||
script when the test suite is run. The script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/developer_scripts/create_cgal_test?root=cgal&view=markup}
|
||||
{{\tt create\_cgal\_test}}
|
||||
will create the shell script {\tt cgal\_test} in the current directory.
|
||||
|
||||
As is the case with makefiles, this file will be generated automatically for
|
||||
each subdirectory of {\tt test} if
|
||||
it is not supplied by the package. This is also the preferred way.
|
||||
So you should use {\tt create\_cgal\_test} to test your package before
|
||||
submitting but generally should avoid submitting the file {\tt cgal\_test}.
|
||||
But sometimes you may want to do something extra in this script ({\em e.g.}, set
|
||||
the {\tt EXTRA\_FLAGS}\index{extra_flags variable@{\tt EXTRA\_FLAGS} variable}
|
||||
environment variable that is used in the makefile).
|
||||
In this case, you can run {\tt create\_cgal\_test} yourself and edit the result.
|
||||
The generated file contains a header that lists the requirements a
|
||||
{\tt cgal\_test} program should fulfill. These are also listed in
|
||||
Section~\ref{sec:test_subdirectory} with the description of the
|
||||
{\tt cgal\_test} script.
|
||||
|
||||
Files which are considered by {{\tt create\_cgal\_test}} are those with
|
||||
{\tt .C} or {\tt .cpp} extension, and which content match the word {\tt main}.
|
||||
This way, no attempt is made at linking programs which are made of several
|
||||
object files.
|
||||
|
||||
%\begin{itemize}
|
||||
%\item For every target two one-line messages are written to the file
|
||||
% {\tt error.txt}\in
|
||||
% The first one indicates if the compilation was successful,
|
||||
%the second one indicates if the execution was successful.
|
||||
%If one of the two was not successful, the line should start with 'ERROR:'
|
||||
%\item
|
||||
%Running the script should not require any user interaction
|
||||
%\item
|
||||
%The script should clean up object files and executables
|
||||
%\end{itemize}
|
||||
\index{cgal_test script@{\tt cgal\_test} script|)}
|
||||
\index{create_cgal_test script@{\tt create\_cgal\_test} script|)}
|
||||
|
||||
\section{{\tt create\_cgal\_test\_with\_cmake}}
|
||||
\label{sec:create_cgal_test_with_cmake}
|
||||
\index{create_cgal_test_with_cmake script@{\tt create\_cgal\_test\_with\_cmake} script|(}
|
||||
\index{cgal_test_with_cmake script@{\tt cgal\_test\_with\_cmake} script|(}
|
||||
|
||||
In every subdirectory of {\tt test} there must be a shell script called
|
||||
{\tt cgal\_test\_with\_cmake}. This script is called from the {\tt run\_testsuite\_with\_cmake}%
|
||||
\index{run_testsuite script@{\tt run\_testsuite\_with\_cmake} script}
|
||||
script when the test suite is run. The script
|
||||
\ccAnchor{https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/Scripts/developer_scripts/create_cgal_test_with_cmake?root=cgal&view=markup}
|
||||
{{\tt create\_cgal\_test\_with\_cmake}}
|
||||
will create the shell script {\tt cgal\_test\_with\_cmake} in the current directory.
|
||||
|
||||
As is the case with cmake scripts, this file will be generated automatically
|
||||
for each subdirectory of {\tt test} if
|
||||
it is not supplied by the package. This is also the preferred way, so you should
|
||||
use {\tt create\_cgal\_test\_with\_cmake} to test your package before
|
||||
submitting but generally should avoid submitting the file {\tt cgal\_test\_with\_cmake}.
|
||||
The generated file contains a header that lists the requirements a
|
||||
{\tt cgal\_test\_with\_cmake} program should fulfill. These are also listed in
|
||||
Section~\ref{sec:test_subdirectory} with the description of the
|
||||
{\tt cgal\_test\_with\_cmake} script.
|
||||
|
||||
Files which are considered by {{\tt create\_cgal\_test\_with\_cmake}} are those with
|
||||
{\tt .c} or {\tt .cpp} extension, and which content match the word {\tt main}.
|
||||
This way, no attempt is made at linking programs which are made of several
|
||||
object files.
|
||||
|
||||
The generated script calls {\tt cmake} with the following definitions
|
||||
\begin{verbatim}
|
||||
-DCGAL_DIR=${CGAL_DIR}
|
||||
-DCGAL_CXX_FLAGS=${TESTSUITE_CXXFLAGS}
|
||||
-DCGAL_EXE_LINKER_FLAGS=${TESTSUITE_LDFLAGS}
|
||||
-DCMAKE_BUILD_TYPE=NOTFOUND
|
||||
\end{verbatim}
|
||||
|
||||
The environment variable {\tt CGAL\_DIR } is {\em required} and must contain the path
|
||||
to the binary directory of the \cgal\ installation to use (the testsuite defines
|
||||
this automatically), while the environment variables {\tt TESTSUITE\_CXXFLAGS and
|
||||
TESTSUITE\_LDFLAGS} are optional and are used to {\em add} flags which have not
|
||||
been used when building the library. These TESTSUITE variables are
|
||||
kept for backward compatibility with the non-cmake testsuite (the preferred way is to define all
|
||||
the flags when building \cgal\ rather than using these).
|
||||
|
||||
{\tt CMAKE\_BUILD\_TYPE} is set to {\tt NOTFOUND} in order to use the same
|
||||
build type specified when building \cgal\ (as defined in {\tt CGALConfig.cmake}).
|
||||
|
||||
\index{cgal_test_with_cmake script@{\tt cgal\_test\_with\_cmake} script|)}
|
||||
\index{create_cgal_test_with_cmake script@{\tt create\_cgal\_test\_with\_cmake} script|)}
|
||||
|
||||
\section{{\tt autotest\_cgal}}
|
||||
\label{sec:autotest_cgal}
|
||||
\index{autotest_cgal script@{\tt autotest\_cgal} script|(}
|
||||
\ccIndexSubitem{test suite}{internal release}
|
||||
|
||||
The shell script {\tt autotest\_cgal} is used to run automated test suites for
|
||||
the internal releases of the library. The script is configurable using a
|
||||
{\tt .autocgalrc} file stored in {\tt \$HOME}.
|
||||
It is meant to be run regularly by a cron job run by the testers.
|
||||
|
||||
This script allows you to run the testsuite on multiple hosts (remotely or
|
||||
locally) and multiple compiler-platforms. It is also possible to specify how
|
||||
many processors the host has and the script will use this information to run
|
||||
the testsuite process on several processors at the same time. By default, the
|
||||
number of processors assigned to every host is one.
|
||||
|
||||
In a couple of words, the script first downloads a file named {\tt LATEST}
|
||||
that contains the current release file name. It compares it with the file {\tt
|
||||
RELEASE\_NR} in the {\tt \$CGAL\_ROOT} directory and if it is different it
|
||||
starts the testsuite process : it downloads the internal release, unzips,
|
||||
untars, copies the configuration files, and starts the testsuite. When
|
||||
everything is done, it puts the results on some ftp server.
|
||||
|
||||
\subsection{How to set up your local testing} ~
|
||||
|
||||
The first step is to create a directory where you will store the releases.
|
||||
This directory is known in the script as {\tt \$CGAL\_ROOT}. By default
|
||||
{\tt \$CGAL\_ROOT} is the directory where you put the script {\tt
|
||||
autotest\_cgal}, but you may change it in {\tt .autocgalrc}.
|
||||
|
||||
The next step is to download an internal release of your choice, say {\tt
|
||||
CGAL-3.1-I-xx}, and install it on the various platforms you want it to be
|
||||
installed using the usual procedure with the {\tt install\_cgal} script.
|
||||
This will create the configuration files in the directory {\tt
|
||||
CGAL-3.1-I-xx/config/install/}.
|
||||
|
||||
Then, create a symbolic link to this release using {\tt ln -s CGAL-3.1-I-xx
|
||||
CGAL-I}. This link will be updated by {\tt autotest\_cgal} to point to the
|
||||
last installed release. You may remove older releases at some point.
|
||||
|
||||
The script uses {\tt wget} to download the release. The different options you
|
||||
may pass to {\tt wget} you should put in the {\tt WGET} variable in {\tt
|
||||
.autocgalrc}. By default, {\tt WGET=''wget''}. We noticed that you must use
|
||||
a recent version of {\tt wget} (1.9.1 is fine, but 1.8.2 is not). You must
|
||||
also create a file in your {\tt HOME} called {\tt .wgetrc} (alternatively,
|
||||
it is also possible to use another file by setting the {\tt WGETRC} variable),
|
||||
that contains the following lines:
|
||||
\begin{verbatim}
|
||||
--http-user=member1
|
||||
--http-passwd=xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
Alternatively, you can use {\tt curl} instead of {\tt wget}. In order to
|
||||
do so, you need to add {\tt USE\_CURL=''y''} to your {\tt .autocgalrc} file.
|
||||
{\tt curl} is then also used as a replacement for {\tt ftp} for uploading the
|
||||
test results.
|
||||
You also have to add the following line in a file called {\tt HOME/.curlrc}:
|
||||
\begin{verbatim}
|
||||
--user member1:xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
The next step is to specify the name of the hosts. To do that, you
|
||||
must define the variable \texttt{BUILD\_HOSTS} in the file {\tt
|
||||
.autocgalrc}. For every host $h$ listed in \texttt{BUILD\_HOSTS} you
|
||||
must also specify the variable \texttt{COMPILERS\_$h$} as a list of
|
||||
OS-compiler descriptors for which the testsuite is to be run on $h$.
|
||||
|
||||
Optionally, you can also specify a variable \texttt{BUILD\_ON\_$h$} as
|
||||
a list of OS-compiler descriptors for which the \cgal\ libraries are
|
||||
to be built on $h$. If \texttt{BUILD\_ON\_$h$} is not defined, it
|
||||
defaults to the value of \texttt{COMPILERS\_$h$}. For obvious reasons,
|
||||
it is a good idea to keep the compilers in \texttt{COMPILERS\_$h$} a
|
||||
subset of the compilers listed in \texttt{BUILD\_ON\_$h$}. Setting
|
||||
\texttt{BUILD\_ON\_$h$} to \texttt{all}, invokes the install script
|
||||
with \texttt{--rebuild-all} and, therefore, builds \cgal\ using all
|
||||
compilers for which a matching \texttt{config/install} file is found.
|
||||
|
||||
\noindent Here is an example:
|
||||
\begingroup\small
|
||||
\begin{verbatim}
|
||||
BUILD_HOSTS="papillon electra winmachine localhost"
|
||||
COMPILERS_papillon="mips_IRIX64-6.5_CC-n32-7.30 mips_IRIX-6.5_g++-fsquangle-2.95.2"
|
||||
COMPILERS_electra="sparc_SunOS-5.6_g++-2.95.2"
|
||||
BUILD_ON_electra="sparc_SunOS-5.6_g++-2.95.2 sparc_SunOS-5.6_CC-5.80"
|
||||
COMPILERS_winmachine="i686_CYGWINNT-5.0-1.3.22_CL.EXE-1300"
|
||||
COMPILERS_localhost="i686_Linux-2.4.17_g++-3.4.0"
|
||||
PROCESSORS_papillon="3"
|
||||
BUILD_ON_papillon="all"
|
||||
\end{verbatim}\endgroup
|
||||
You should take those names from the configuration files mentioned
|
||||
earlier. The {\tt PROCESSORS\_hostname} must be set if you have more
|
||||
than one processor on that host and of course if you want to give all
|
||||
of them to the testsuite. If you want to run the testsuite locally and
|
||||
not remotely, name the host as {\tt localhost} and the script will run
|
||||
the testsuite locally for that host.
|
||||
|
||||
\subsection{List of configurable variables} ~
|
||||
|
||||
{\tt MYSHELL} is a variable that must be defined in {\tt .autocgalrc},
|
||||
otherwise the script will not run. You can use it to pass environment
|
||||
variables along to remote hosts. Here is an example of {\tt MYSHELL}
|
||||
variable :
|
||||
\begin{verbatim}
|
||||
MYSHELL="TERM=vt100 PATH=$PATH:/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/bin \
|
||||
QTDIR=/usr/local/qt2 PARASOFT=/usr/local/parasoft /usr/local/bin/zsh -c\"
|
||||
\end{verbatim}
|
||||
|
||||
{\tt CGAL\_URL} is the URL where internal releases are available.
|
||||
The {\tt LATEST} file is comming from the same location. If this will change,
|
||||
you may change either {\tt CGAL\_URL}, or {\tt LATEST\_LOCATION}
|
||||
in {\tt .autocgalrc}.
|
||||
|
||||
{\tt TAR}, {\tt GZIP}, {\tt GUNZIP} are the variables for compression and
|
||||
decompression tools. They are defaulted to {\tt tar}, {\tt gzip}, {\tt
|
||||
gunzip} found in {\tt \$PATH}.
|
||||
|
||||
{\tt SENDMAIL} has the default value {\tt ''mail''}.
|
||||
|
||||
{\tt CGAL\_TESTER} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify a kind of login name for this
|
||||
variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_NAME} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify your full name for this variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_ADDRESS} has the default value {\tt `whoami`}. It is used
|
||||
to identify the tester. You should specify your email address for this
|
||||
variable.
|
||||
|
||||
{\tt MAIL\_ADDRESS} has no value by default. In case you want to
|
||||
set it in {\tt .autocgalrc}, the script will send an additional email to
|
||||
everyone mentioned in this variable.
|
||||
|
||||
{\tt LOGS\_DIR} has the default value {\tt \$CGAL\_ROOT/AUTOTEST\_LOGS}. This
|
||||
is used to keep local log files.
|
||||
|
||||
{\tt CONSOLE\_OUTPUT} has the default value ``y''. If you want that the script
|
||||
also shows messages to the console, the value is ``y'' otherwise the value
|
||||
should be ``''.
|
||||
|
||||
{\tt TEST\_DIR\_ROOT} specifies where the test-suite will be copied before
|
||||
being run. For example, this can be set to \ccc{/tmp}, instead of the default
|
||||
which is {\tt \$CGAL}. This directory can be local to the testing machine.
|
||||
|
||||
{\tt USE\_CURL} specifies if {\tt curl} should be used as a replacement for
|
||||
{\tt wget} and {\tt ftp}. Set it to {\tt ''y''} to use {\tt curl}.
|
||||
|
||||
{\tt FTP\_OPTS} specifies the options for {\tt ftp} On Linux systems
|
||||
it should be {\tt ''-p -v -n''} (the default), on cygwin it should be {\tt ''-v -n''}.
|
||||
|
||||
{\tt NICE\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt nice} command, which is used to prevent the test-suite from keeping
|
||||
all CPU time for itself. The default value is {\tt ''-19''}.
|
||||
|
||||
{\tt ULIMIT\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt ulimit} command, which is used to prevent the test-suite from using
|
||||
various system resources. It can be used to help killing looping programs.
|
||||
For example, specifying {\tt ''-c 0 -t 10800 -v 2000000''} will prevent
|
||||
the creation of dumped core files, will stop processes after 3 hours,
|
||||
and will kill them if they reach 2GB of memory.
|
||||
The default value is empty (no limit).
|
||||
|
||||
\index{.autocgalrc configuration file@{\tt .autocgalrc} configuration file|)}
|
||||
\index{autotest_cgal script@{\tt autotest\_cgal} script|)}
|
||||
|
||||
\section{{\tt autotest\_cgal\_with\_cmake}}
|
||||
\label{sec:autotest_cgal_with_cmake}
|
||||
\index{autotest_cgal_with_cmake script@{\tt autotest\_cgal\_with\_cmake} script|(}
|
||||
\ccIndexSubitem{test suite}{internal release}
|
||||
|
||||
The shell script {\tt autotest\_cgal\_with\_cmake} is used to run automated test suites for
|
||||
the internal releases of the library. The script need no command-line
|
||||
arguments, and it is configurable using a {\tt .autocgalrc} file stored
|
||||
in {\tt \$HOME}.
|
||||
It is meant to be run regularly by a cron job run by the testers.
|
||||
|
||||
This script allows you to run the testsuite on multiple hosts (remotely or
|
||||
locally) and multiple compilers/platforms. It is also possible to specify how
|
||||
many processors the host has and the script will use this information to run
|
||||
the testsuite process on several processors at the same time. By default, the
|
||||
number of processors assigned to every host is one.
|
||||
|
||||
In a couple of words, the script first downloads a file named {\tt LATEST}
|
||||
that contains the current release file name. It compares it with the file {\tt
|
||||
RELEASE\_NR} in the {\tt \$CGAL\_ROOT} directory and if it is different it
|
||||
starts the testsuite process : it downloads the internal release, unzips,
|
||||
untars, copies the configuration files, and starts the testsuite. When
|
||||
everything is done, it puts the results on some ftp server.
|
||||
|
||||
\subsection{How to set up your local testing} ~
|
||||
|
||||
The first step is to create a directory where you will store the releases.
|
||||
This directory is known in the script as {\tt \$CGAL\_ROOT}. By default
|
||||
{\tt \$CGAL\_ROOT} is the directory where you put the script {\tt
|
||||
autotest\_cgal\_with\_cmake}, but you may change it in {\tt .autocgalrc}.
|
||||
|
||||
The next step is to download an internal release of your choice, say {\tt
|
||||
CGAL-3.1-I-xx}, and unzip then untar it under {\tt \$CGAL\_ROOT}.
|
||||
This release will serve as a {\em fixed reference release} for configuring
|
||||
and building each current release to test from now on.
|
||||
|
||||
This internal release is used as a reference
|
||||
which defines the configurations to test (it is not itself tested),
|
||||
thus is better to rename it accordingly, say as {\tt CGAL-I-REF}.
|
||||
|
||||
The next step is to create a new directory for each wanted configuration
|
||||
(architecture+platform+compiler)
|
||||
to test under the directory {\tt \$CGAL\_ROOT/CGAL-I-REF/cmake/platforms}.
|
||||
Each directory in there, called {\em configuration folder}, will contain the testsuite
|
||||
for that configuration and its name will identify the configuration
|
||||
in the test results.
|
||||
|
||||
Now cd into each such configuration folder and configure \cgal\ using cmake
|
||||
(either the command line or the GUI). With the command-line cmake,
|
||||
use the -D option to define cmake variables and -G
|
||||
to define a generator if the default is not right for you.
|
||||
|
||||
|
||||
The cmake variables {\tt WITH\_CGALCORE, WITH\_CGALimageIO and WITH\_CGALQt}
|
||||
are used to enable or disable those \cgal\ components. These are all ON by default.
|
||||
You should you define them with OFF if any of those components do not work in your platform.
|
||||
For {\tt these and only these} cmake variables you can define them as environment variables
|
||||
rather than cmake variables.
|
||||
|
||||
The cmake variable {\tt CMAKE\_BUILD\_TYPE} is used to specify a {\tt 'Debug'} or {\tt 'Release'}
|
||||
configuration. For the testsuite, you should always define this variable
|
||||
since the default varies on different generators (and use only Debug or Release
|
||||
since other values are not currently supported)
|
||||
|
||||
CMake itself takes care automatically of most compiler and linker flags
|
||||
via the following cmake variables:
|
||||
|
||||
\begin{verbatim}
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
\end{verbatim}
|
||||
|
||||
The \_RELEASE and \_DEBUG variables are {\em appended} to the general variable, so for each
|
||||
build type, two sets of flags are used. For example: CMAKE\_CXX\_FLAGS {\em then} CMAKE\_CXX\_FLAGS\_DEBUG
|
||||
|
||||
You can define any of these variables on the command-line (with the -D switch) or the GUI (CMakeSetup|ccmake),
|
||||
but doing so {\em overrides} the values that cmake would automatically compute.
|
||||
|
||||
If you just want to {\em add} flags, you can define any of the following variables instead:
|
||||
|
||||
\begin{verbatim}
|
||||
CGAL_CXX_FLAGS
|
||||
CGAL_CXX_FLAGS_RELEASE
|
||||
CGAL_CXX_FLAGS_DEBUG
|
||||
CGAL_EXE_LINKER_FLAGS
|
||||
CGAL_EXE_LINKER_FLAGS_RELEASE
|
||||
CGAL_EXE_LINKER_FLAGS_DEBUG
|
||||
\end{verbatim}
|
||||
|
||||
which are named with CGAL rather than CMAKE.
|
||||
|
||||
CMake has trouble parsing in the command line variable definitions that contain the '=' sign in the value, thus,
|
||||
you cannot add a flag like: {\tt -DCGAL\_CXX\_FLAGS\_RELEASE='-std=c++0x'} . On the other hand, cmake uses
|
||||
the {\em environment} variable CXXFLAGS to initialize CMAKE\_CXX\_FLAGS, so you can use that in this case.
|
||||
|
||||
The cmake variable {\tt CMAKE\_CXX\_COMPILER} can be used to specify the full path of the C++ compiler to use.
|
||||
Unlike most cmake variables, this one is handled specially by cmake, thus, while manually defining it
|
||||
works fine when building the reference release for the testsuite, its value is not propagated
|
||||
to the releases being tested (recall that at this point we are manually building the reference release
|
||||
which the testsuite uses to automatically build and test the others). Therefore, if you need
|
||||
to specify the compiler (because cmake autodetects the wrong one), you need to define the
|
||||
{\em environment} variable CXX.
|
||||
|
||||
|
||||
The following example illustrates how to configure and build the reference release.
|
||||
Notice the ../../.. path to the \cgal\ sources from the platform directory (where cmake is invoked).
|
||||
|
||||
\begin{verbatim}
|
||||
export CXX=<some compiler not detected by cmake>
|
||||
export CXXFLAGS='-std=c++0x'
|
||||
export WITH_CGALimageIO=OFF
|
||||
|
||||
cmake -DWITH_CGALCORE=OFF -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
|
||||
make
|
||||
\end{verbatim}
|
||||
|
||||
You can create here a shell script {\em specifically} named {\tt 'setup'} in case you need the test script
|
||||
to automatically do anything for this particular configuration, such as setting up
|
||||
environment variables as in the example above. The contents of such a file, if it exists, are copied verbatim
|
||||
into the start of the temporary build and test scripts created on each configuration folder. This allows
|
||||
you to bootstrap the process as needed.
|
||||
|
||||
Make sure to fix any problems configuring or building this reference release before starting the automated testsuite.
|
||||
|
||||
Once the reference release is ready, define a variable named
|
||||
{\tt REFERENCE\_PLATFORMS\_DIR} with the full path to the {\tt /cmake/platforms/}
|
||||
directory of the reference release, for example:
|
||||
{\tt \$CGAL\_ROOT/CGAL-I-REF/cmake/platforms}
|
||||
in the file {\tt .autocgalrc}.
|
||||
|
||||
The next step is to specify the name of the hosts. To do that, you
|
||||
must define the variable \texttt{BUILD\_HOSTS} in {\tt .autocgalrc}.
|
||||
|
||||
For every host $h$ listed in \texttt{BUILD\_HOSTS} you
|
||||
must also specify the variable \texttt{BUILD\_ON\_$h$} as a list of
|
||||
configuration names for which the \cgal\ libraries are
|
||||
to be built on $h$. For each name listed in here, the testsuite script
|
||||
will create a directory under the current platforms directory
|
||||
(i.e. {\tt \$CGAL\_ROOT/CGAL-3.1-I-abc/cmake/platforms} ), unless it already exists.
|
||||
|
||||
If any of the variables \texttt{BUILD\_ON\_$h$}
|
||||
has the value 'all' then the platforms directory structure of the reference
|
||||
release ({\tt \$REFERENCE\_PLATFORMS\_DIR}) is replicated
|
||||
under the current platforms directory. \footnote{This 'all' value should only be used when
|
||||
the testsuite is run on a single localhost, otherwise, the testsuite script won't be able to
|
||||
properly distribute each platform folder to its corresponding host.}
|
||||
|
||||
Similarly, for every host $h$ listed in \texttt{BUILD\_HOSTS} you
|
||||
must also specify the variable \texttt{COMPILERS\_$h$} as a list of
|
||||
configuration names for which the testsuite is to be run on $h$
|
||||
(this must be a subset of the names specified in \texttt{BUILD\_ON\_$h$}).
|
||||
You can specify only \texttt{COMPILERS\_$h$} instead of both \texttt{BUILD\_ON\_$h$}
|
||||
and \texttt{COMPILERS\_$h$} if they share the same value.
|
||||
|
||||
\noindent Here is an example setting in {\tt .autocgalrc}:
|
||||
|
||||
\begingroup\small
|
||||
\begin{verbatim}
|
||||
REFERENCE_PLATFORMS_DIR="~/CGAL_autotest/CGAL-I-REF/cmake/platforms"
|
||||
BUILD_HOSTS="papillon electra winmachine localhost"
|
||||
COMPILERS_papillon="mips_IRIX64-6.5_CC-n32-7.30 mips_IRIX-6.5_g++-fsquangle-2.95.2"
|
||||
COMPILERS_electra="sparc_SunOS-5.6_g++-2.95.2"
|
||||
BUILD_ON_electra="sparc_SunOS-5.6_g++-2.95.2 sparc_SunOS-5.6_CC-5.80"
|
||||
COMPILERS_winmachine="i686_CYGWINNT-5.0-1.3.22_CL.EXE-1300"
|
||||
COMPILERS_localhost="i686_Linux-2.4.17_g++-3.4.0"
|
||||
PROCESSORS_papillon="3"
|
||||
\end{verbatim}\endgroup
|
||||
|
||||
The {\tt PROCESSORS\_hostname} must be set if you have more
|
||||
than one processor on that host and of course if you want to give all
|
||||
of them to the testsuite. If you want to run the testsuite locally and
|
||||
not remotely, name the host as {\tt localhost} and the script will run
|
||||
the testsuite locally for that host.
|
||||
|
||||
The script copies the entire {\tt /test } subdirectory of the release being tested
|
||||
into each configuration folder to test at, thus, all executables, temporaries
|
||||
and results are local to that configuration. When the scripts finishes testing
|
||||
a configuration, the local {\tt /test } subdirectory is deleted.
|
||||
|
||||
The script uses {\tt wget} to download the release to test. The different options you
|
||||
may pass to {\tt wget} you should put in the {\tt WGET} variable in {\tt
|
||||
.autocgalrc}. By default, {\tt WGET=''wget''}. We noticed that you must use
|
||||
a recent version of {\tt wget} (1.9.1 is fine, but 1.8.2 is not). You must
|
||||
also create a file in your {\tt HOME} called {\tt .wgetrc} (alternatively,
|
||||
it is also possible to use another file by setting the {\tt WGETRC} variable),
|
||||
that contains the following lines:
|
||||
\begin{verbatim}
|
||||
--http-user=member1
|
||||
--http-passwd=xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
Alternatively, you can use {\tt curl} instead of {\tt wget}. In order to
|
||||
do so, you need to add {\tt USE\_CURL=''y''} to your {\tt .autocgalrc} file.
|
||||
{\tt curl} is then also used as a replacement for {\tt ftp} for uploading the
|
||||
test results.
|
||||
You also have to add the following line in a file called {\tt HOME/.curlrc}:
|
||||
\begin{verbatim}
|
||||
--user member1:xxxxxxx
|
||||
\end{verbatim}
|
||||
|
||||
Once the latest release has been downloaded, unzipped and untared,
|
||||
say under {\tt \$CGAL\_ROOT/CGAL-3.4-I-abc}, the testsuites creates
|
||||
a symbolic link to it named {\tt \$CGAL\_ROOT/CGAL-I}. From now on,
|
||||
the release being tested is located under {\tt CGAL-I}.
|
||||
|
||||
For each directory under {\tt \$CGAL\_ROOT/CGAL-I/cmake/platforms},
|
||||
if a directory of the name name exist in the reference release
|
||||
(i.e. under {\tt \$CGAL\_ROOT/CGAL-I-REF/cmake/platforms}),
|
||||
the files {\tt CMakeCache.txt} and {\tt setup} are copied
|
||||
from the reference release (if they exist).
|
||||
|
||||
\subsection{Command line options for the initial set up} ~
|
||||
|
||||
{\tt autotest\_cgal\_with\_cmake} is meant to be run unattended by a cron job.
|
||||
However, in order to simplify the initial set up some command line options are available:
|
||||
|
||||
\begin{itemize}
|
||||
\item {\tt -c} Uses an already untared internal release under the
|
||||
symbolic link {\tt 'CGAL-I'} instead of
|
||||
downloading and untaring a new one. You can use this option
|
||||
to {\em resume} immediately the test suite process in case it
|
||||
failed before.
|
||||
|
||||
\item {\tt -n} Skips the testing phase, finishing after the libraries has been built.
|
||||
You can use this option to verify that the mechanism that uses the
|
||||
reference release to build the current release with the exact same
|
||||
settings works fine.
|
||||
|
||||
\item {\tt -l} Do not upload the results to the server.
|
||||
You can use this option to avoid uploading incomplete results until
|
||||
the testsuite process works correctly in your system.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Sending results}
|
||||
Unless you use the {\tt -l} option, the script will attempt to send result
|
||||
using {\tt scp} (secured-copy, a tool from the SSH suite) to the
|
||||
GeometryFactory server {\tt cgal.geometryfactory.com}. You must declare
|
||||
yourself as a tester to Laurent Rineau, and send him the public part of
|
||||
your ssh key. Usually, that is the file {\tt \$HOME/.ssh/id\_rsa.pub}, or
|
||||
{\tt \$HOME/.ssh/id\_dsa.pub}.
|
||||
|
||||
After that, you can test that the sending works, by typing:
|
||||
\begin{verbatim}
|
||||
ssh cgaltest@cgal.geometryfactory.com
|
||||
\end{verbatim}
|
||||
If the result is something like:
|
||||
\begin{verbatim}
|
||||
Last login: Thu July 14 12:03:18 1789 from 1.1.1.1
|
||||
CentOS release 5.3 (Final)
|
||||
Linux cgal.geometryfactory.com 2.6.28.4-xxxx-std-ipv6-32 #4 SMP Wed Sep 9 22:08:40 UTC 2009 i686 i686 i386 GNU/Linux
|
||||
|
||||
server : 39891
|
||||
ip : 91.121.110.28
|
||||
ip : 91.121.110.28
|
||||
hostname : cgal.geometryfactory.com
|
||||
\end{verbatim}
|
||||
then the test is successful (you will need to interrupt SSH with
|
||||
Ctrl+C). If instead you get something like:
|
||||
\begin{verbatim}
|
||||
Permission denied (publickey,gssapi-with-mic).
|
||||
\end{verbatim}
|
||||
then contact Laurent Rineau.
|
||||
|
||||
\subsection{List of miscellaneous configurable variables} ~
|
||||
|
||||
{\tt MYSHELL} is a variable that may be defined in {\tt .autocgalrc}
|
||||
to pass environment variables along to remote hosts. Here is an example of {\tt MYSHELL}
|
||||
variable :
|
||||
\begin{verbatim}
|
||||
MYSHELL="TERM=vt100 PATH=$PATH:/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/bin \
|
||||
QTDIR=/usr/local/qt2 PARASOFT=/usr/local/parasoft /usr/local/bin/zsh -c\"
|
||||
\end{verbatim}
|
||||
|
||||
{\tt CGAL\_URL} is the URL where internal releases are available.
|
||||
The {\tt LATEST} file is coming from the same location. If this will change,
|
||||
you may change either {\tt CGAL\_URL}, or {\tt LATEST\_LOCATION}
|
||||
in {\tt .autocgalrc}.
|
||||
|
||||
{\tt TAR}, {\tt GZIP}, {\tt GUNZIP} are the variables for compression and
|
||||
decompression tools. They are defaulted to {\tt tar}, {\tt gzip}, {\tt
|
||||
gunzip} found in {\tt \$PATH}.
|
||||
|
||||
{\tt SENDMAIL} has the default value {\tt ''mail''}.
|
||||
|
||||
{\tt CGAL\_TESTER} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify a kind of login name for this
|
||||
variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_NAME} has the default value {\tt `whoami`}. It is used to
|
||||
identify the tester. You should specify your full name for this variable.
|
||||
|
||||
{\tt CGAL\_TESTER\_ADDRESS} has the default value {\tt `whoami`}. It is used
|
||||
to identify the tester. You should specify your email address for this
|
||||
variable.
|
||||
|
||||
{\tt MAIL\_ADDRESS} has no value by default. In case you want to
|
||||
set it in {\tt .autocgalrc}, the script will send an additional email to
|
||||
everyone mentioned in this variable.
|
||||
|
||||
{\tt LOGS\_DIR} has the default value {\tt \$CGAL\_ROOT/AUTOTEST\_LOGS}. This
|
||||
is used to keep local log files.
|
||||
|
||||
{\tt CONSOLE\_OUTPUT} has the default value ``y''. If you want that the script
|
||||
also shows messages to the console, the value is ``y'' otherwise the value
|
||||
should be ``''.
|
||||
|
||||
{\tt USE\_CURL} specifies if {\tt curl} should be used as a replacement for
|
||||
{\tt wget} and {\tt ftp}. Set it to {\tt ''y''} to use {\tt curl}.
|
||||
|
||||
{\tt FTP\_OPTS} specifies the options for {\tt ftp} On Linux systems
|
||||
it should be {\tt ''-p -v -n''} (the default), on cygwin it should be {\tt ''-v -n''}.
|
||||
|
||||
{\tt NICE\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt nice} command, which is used to prevent the test-suite from keeping
|
||||
all CPU time for itself. The default value is {\tt ''-19''}.
|
||||
|
||||
{\tt ULIMIT\_OPTIONS} specifies the command line options to pass to the
|
||||
{\tt ulimit} command, which is used to prevent the test-suite from using
|
||||
various system ressources. It can be used to help killing looping programs.
|
||||
For example, specifying {\tt ''-c 0 -t 10800 -v 2000000''} will prevent
|
||||
the creation of dumped core files, will stop processes after 3 hours,
|
||||
and will kill them if they reach 2GB of memory.
|
||||
The default value is empty (no limit).
|
||||
|
||||
\subsection{Testing with Visual Studio on cygwin} ~
|
||||
|
||||
In order to test with Visual Studio you need to use cygwin and set up
|
||||
the environment for the command line compiler. This can be done
|
||||
by setting up the VC command line tools in the {\tt 'setup'} script
|
||||
that is used to bootstrap the build and test process, as explained before.
|
||||
Merely executing the {\tt 'vcvars32.bat'} that comes with VC does not work
|
||||
since the variables in there will be defined only in the environment for the batch
|
||||
file and not in the environment of the building/testing script (this is why
|
||||
the contents of the 'setup' script are copied into the build/test script
|
||||
instead of 'setup' being just executed from there)
|
||||
|
||||
Furthermore, within the {\tt 'setup'} script, the following must be
|
||||
considered:
|
||||
|
||||
The variables {\tt INCLUDE, LIB and LIBPATH} will be used by the Visual C++ compiler
|
||||
{\em directly}, that is, without the path translation that cygwin usually performs.
|
||||
Thus, the values for these variables must be a verbatim copy of the values defined in
|
||||
the {\tt 'vcvars32.bat'} of your Visual Studio installation.
|
||||
|
||||
On the other hand, the {\tt PATH} variable will be used by cygwin itself to locate the
|
||||
components of the command line tools (cl.exe, link.exe, etc.), thus, each Windows
|
||||
path specified in the PATH definition on {\tt 'vcvars32.bat'} must be converted to a
|
||||
POSIX path and properly appended to the cygwin PATH variable.
|
||||
|
||||
Below is a sample 'setup' script for Visual C++ 9.0:
|
||||
|
||||
\begin{verbatim}
|
||||
export INCLUDE='C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include;c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\'
|
||||
|
||||
export LIB='C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\'
|
||||
|
||||
export LIBPATH='C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB'
|
||||
|
||||
export PATH='/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE':'/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/BIN':'/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/Tools':'/cygdrive/c
|
||||
/Program Files/Microsoft Visual Studio 9.0/Common7/Tools/bin':'/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/VCPackages':'/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/bin':'/cygdrive/c/Program Files/Microsoft Visual Studio 8/SDK/v2.0/bin':$PATH
|
||||
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\index{.autocgalrc configuration file@{\tt .autocgalrc} configuration file|)}
|
||||
\index{autotest_cgal_with_cmake script@{\tt autotest\_cgal\_with\_cmake} script|)}
|
||||
|
||||
\section{{\tt check\_licenses}}
|
||||
\label{sec:check_licenses}
|
||||
\index{check_licenses script@{\tt check\_licenses} script|(}
|
||||
|
||||
This script can be used to check all files in an internal or external release
|
||||
for proper license notices. It reports all files without a proper notice.
|
||||
Observe that the check is fairly simple, we just grep through the files
|
||||
looking for a fixed string. Additionally, there might be provisions in the
|
||||
top-level LICENSE file that are not taken into account by this script.
|
||||
|
||||
Note that there might be license errors that are not detected by this script.
|
||||
For example, we do not check that files under LGPL and GPL are not mixed in
|
||||
one library.
|
||||
|
||||
\index{check_licenses script@{\tt check\_licenses} script|)}
|
||||
|
||||
\ccIndexMainItemEnd{tools}
|
||||
|
|
@ -5,15 +5,11 @@
|
|||
|
||||
\documentclass{book}
|
||||
\usepackage{Manual/cgal_manual}
|
||||
\gdef\lciManualTitle{CGAL Developers Manual}
|
||||
\gdef\lciManualTitle{Writing your CGAL Manual}
|
||||
\lcHtml{\lcOneColumnToc}
|
||||
\lcTex{\usepackage{color}}
|
||||
\usepackage{nonlinkedpath}
|
||||
|
||||
% This will be the internal edition of the developers manual.
|
||||
\newcommand{\InternalOnly}[1]{#1}
|
||||
\newcommand{\ExternalOnly}[1]{}
|
||||
|
||||
\makeindex
|
||||
|
||||
\begin{document}
|
||||
|
|
@ -29,7 +25,7 @@
|
|||
\pagenumbering{arabic}
|
||||
\cgalColumnLayout
|
||||
|
||||
\input{Developers_manual/chapters}
|
||||
\input{Developers_manual/specification}
|
||||
|
||||
\bibliographystyle{alpha}
|
||||
\bibliography{Manual/cgal_manual,Manual/geom}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
TODO_static_filters
|
||||
Makefile
|
||||
lazykernel.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,117 +0,0 @@
|
|||
#define CGAL_INTERSECT_WITH_ITERATORS_2 1
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Gmpq.h>
|
||||
#include <CGAL/Lazy_kernel.h>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
#include "Cartesian_I.h"
|
||||
|
||||
|
||||
typedef CGAL::Cartesian_I<CGAL::Gmpq> SC;
|
||||
typedef CGAL::Lazy_kernel<SC, CGAL::Cartesian_I<CGAL::Interval_nt_advanced > > K;
|
||||
|
||||
typedef K::FT FT;
|
||||
typedef K::Point_2 Point_2;
|
||||
typedef K::Vector_2 Vector_2;
|
||||
typedef K::Segment_2 Segment_2;
|
||||
typedef K::Circle_2 Circle_2;
|
||||
|
||||
typedef CGAL::Bbox_2 Bbox_2;
|
||||
typedef CGAL::Object Object;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
CGAL::Lazy_exact_nt<CGAL::Gmpq> nt = 1;
|
||||
nt = nt + nt * nt;
|
||||
|
||||
K::Intersect_with_iterators_2 iwi;
|
||||
|
||||
CGAL::set_pretty_mode(std::cout);
|
||||
K::Intersect_with_iterators_2 intersect;
|
||||
|
||||
Segment_2 s1(Point_2(0,1), Point_2(2,1));
|
||||
Segment_2 s2(Point_2(1,0), Point_2(1,2));
|
||||
|
||||
std::list<Object> intersections;
|
||||
intersect(s1, s2, std::back_inserter(intersections));
|
||||
for(std::list<CGAL::Object>::iterator it = intersections.begin(); it != intersections.end(); it++){
|
||||
if(const Point_2 *ip = CGAL::object_cast<Point_2>(&*it)){
|
||||
std::cout << "intersection at " << *ip << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
FT ft = 3.1415;
|
||||
std::cout << "ft = " << ft << std::endl;
|
||||
|
||||
ft *= ft;
|
||||
std::cout << "ft^2 = " << ft << std::endl;
|
||||
std::cout << "ft^2.depth() = " << ft.depth() << std::endl;
|
||||
std::cout << "ft^2.exact() = " << ft.exact() << std::endl;
|
||||
Point_2 p(ft, 2.22);
|
||||
Point_2 q(9,9);
|
||||
|
||||
CGAL::Bbox_2 bb = p.bbox();
|
||||
|
||||
Segment_2 s(p,q);
|
||||
|
||||
Segment_2 s3(Point_2(0,1), Point_2(2,1));
|
||||
Segment_2 s4(Point_2(1,0), Point_2(1,2));
|
||||
|
||||
CGAL::Object o = intersection(s3,s4);
|
||||
|
||||
if(const Point_2 *rp = CGAL::object_cast<Point_2>(&o)){
|
||||
std::cout << "Intersection is a point:" << std::endl;
|
||||
std::cout << *rp;
|
||||
}
|
||||
|
||||
|
||||
Point_2 r = K::Construct_vertex_2()(s,0);
|
||||
assert(r == s.source());
|
||||
std::cout << r << std::endl;
|
||||
|
||||
|
||||
Point_2 mp = midpoint(p,q);
|
||||
|
||||
|
||||
FT rx = r.x();
|
||||
|
||||
std::cout << rx << std::endl;
|
||||
|
||||
|
||||
Vector_2 v1(1,1), v2(1,1);
|
||||
|
||||
v1 = p - q;
|
||||
|
||||
v1 = mp - CGAL::ORIGIN;
|
||||
|
||||
q = CGAL::ORIGIN + v1;
|
||||
|
||||
std::cout << q << std::endl;
|
||||
|
||||
if(v1 == v2){}
|
||||
|
||||
if(K::Compare_distance_2()(p,q,r)== CGAL::SMALLER)
|
||||
{
|
||||
std::cout << "smaller" << std::endl;
|
||||
}
|
||||
|
||||
Circle_2 circ(CGAL::ORIGIN, p, q);
|
||||
std::cout << "\nCircle:\n " << circ << std::endl;
|
||||
|
||||
Point_2 center = circ.center();
|
||||
FT sr = circ.squared_radius();
|
||||
std::cout << "\nCenter = " << center << "\nSquared radius = " << sr << std::endl;
|
||||
|
||||
sr += 7812;
|
||||
std::cout << "squared radius + 7812 = " << sr << std::endl;
|
||||
|
||||
|
||||
circ.exact();
|
||||
std::cout << "\nCircle after circ.exaxt():\n " << circ << std::endl;
|
||||
std::cout << "\nCenter = " << center << "\nSquared radius = " << sr << std::endl;
|
||||
|
||||
std::cout << "Done" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ int main()
|
|||
#include <fstream>
|
||||
#include <unistd.h> // for sleep()
|
||||
|
||||
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Delaunay_triangulation_3.h>
|
||||
|
|
@ -50,7 +50,7 @@ int main()
|
|||
typedef CGAL::Cartesian<double> K;
|
||||
|
||||
typedef K::Point_2 Point2;
|
||||
typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt3;
|
||||
typedef CGAL::Projection_traits_xy_3<K> Gt3;
|
||||
typedef Gt3::Point Point3;
|
||||
|
||||
typedef CGAL::Delaunay_triangulation_2<K> Delaunay;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
*this << "(echo \"CGAL-3D\")";
|
||||
|
||||
char inbuf[10];
|
||||
(void)::read(in, inbuf, 7);
|
||||
std::size_t retread=::read(in, inbuf, 7);
|
||||
(void)retread;
|
||||
|
||||
if (std::strncmp(inbuf, "started", 7) == 0)
|
||||
{
|
||||
|
|
@ -154,7 +155,8 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
// << "compulsory anymore, since CGAL 2.3" << std::endl;
|
||||
|
||||
// Then the next one is supposed to be CGAL-3D.
|
||||
(void)::read(in, inbuf, 7);
|
||||
retread=::read(in, inbuf, 7);
|
||||
(void)retread;
|
||||
if (std::strncmp(inbuf, "CGAL-3D", 7) != 0)
|
||||
std::cerr << "Unexpected string from Geomview !" << std::endl;
|
||||
}
|
||||
|
|
@ -172,7 +174,8 @@ void Geomview_stream::setup_geomview(const char *machine, const char *login)
|
|||
// Old original version
|
||||
char inbuf[10];
|
||||
// Waits for "started" from the .geomview file.
|
||||
(void)::read(in, inbuf, 7);
|
||||
retread=::read(in, inbuf, 7);
|
||||
(void)retread;
|
||||
#endif
|
||||
|
||||
std::cout << "done." << std::endl;
|
||||
|
|
@ -230,7 +233,8 @@ Geomview_stream::operator<<(int i)
|
|||
// we write raw binary data to the stream.
|
||||
int num = i;
|
||||
I_swap_to_big_endian(num);
|
||||
(void)::write(out, (char*)&num, sizeof(num));
|
||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
||||
(void)retwrite;
|
||||
trace(i);
|
||||
} else {
|
||||
// transform the int in a character sequence and put whitespace around
|
||||
|
|
@ -250,7 +254,8 @@ Geomview_stream::operator<<(unsigned int i)
|
|||
// we write raw binary data to the stream.
|
||||
unsigned int num = i;
|
||||
I_swap_to_big_endian(num);
|
||||
(void)::write(out, (char*)&num, sizeof(num));
|
||||
std::size_t retwrite=::write(out, (char*)&num, sizeof(num));
|
||||
(void)retwrite;
|
||||
trace(i);
|
||||
} else {
|
||||
// transform the int in a character sequence and put whitespace around
|
||||
|
|
@ -281,7 +286,8 @@ Geomview_stream::operator<<(double d)
|
|||
if (get_binary_mode()) {
|
||||
float num = d;
|
||||
I_swap_to_big_endian(num);
|
||||
(void)::write(out, (char*)&num, sizeof(num));
|
||||
std::size_t retwrite= ::write(out, (char*)&num, sizeof(num));
|
||||
(void)retwrite;
|
||||
trace(f);
|
||||
} else {
|
||||
// 'copy' the float in a string and append a blank
|
||||
|
|
@ -468,13 +474,15 @@ Geomview_stream::operator>>(char *expr)
|
|||
{
|
||||
// Skip whitespaces
|
||||
do {
|
||||
(void)::read(in, expr, 1);
|
||||
std::size_t retread=::read(in, expr, 1);
|
||||
(void)retread;
|
||||
} while (expr[0] != '(');
|
||||
|
||||
int pcount = 1;
|
||||
int i = 1;
|
||||
while (1) {
|
||||
(void)::read(in, &expr[i], 1);
|
||||
std::size_t retread=::read(in, &expr[i], 1);
|
||||
(void)retread;
|
||||
if (expr[i] == ')'){
|
||||
pcount--;
|
||||
} else if (expr[i] == '('){
|
||||
|
|
|
|||
|
|
@ -1,4 +1,105 @@
|
|||
|
||||
-------------------------------- Release 4.1 --------------------------------
|
||||
|
||||
Release date:
|
||||
|
||||
|
||||
* 2D Convex Hulls and Extreme Points
|
||||
|
||||
- Speed up the preprocessing stage of the Akl-Toussaint implementation (used
|
||||
by the free function convex_hull_2 when forward iterators are provided as
|
||||
input).
|
||||
|
||||
|
||||
* Combinatorial Maps
|
||||
|
||||
- Minor bugfix; replace some functors by methods.
|
||||
|
||||
|
||||
* Installation
|
||||
|
||||
- Availability tests for C++11 features are now performed with the help of
|
||||
Boost.Config. A Boost version of 1.40.0 or higher is needed to use C++11
|
||||
features.
|
||||
|
||||
|
||||
* Linear Cell Complex
|
||||
|
||||
- Improve the demo: add a widget showing all the volumes and an operation to
|
||||
create a Menger sponge.
|
||||
|
||||
|
||||
* Kernels
|
||||
|
||||
- All Kernel functors now support the result_of protocol.
|
||||
|
||||
|
||||
* STL_Extensions for CGAL
|
||||
|
||||
- The namespace cpp0x has been renamed cpp11. The old name is still available
|
||||
for backward compatibility.
|
||||
|
||||
|
||||
-------------------------------- Release 4.0.1 --------------------------------
|
||||
|
||||
Release date: June 2012
|
||||
|
||||
This is a bug fix release. Apart various minor fixes in the documentation, the
|
||||
following has been changed since CGAL-4.0:
|
||||
|
||||
|
||||
* 2D Voronoi Diagram Adaptor (re-added)
|
||||
|
||||
- The package 2D Voronoi Diagram Adaptor was temporarily removed from the
|
||||
CGAL distribution because of license issues. That package is now back into
|
||||
CGAL.
|
||||
|
||||
|
||||
* 2D and 3D Geometry Kernel
|
||||
|
||||
- Fix a bug in the Segment_3-Triangle_3 intersection function in the case the
|
||||
segment is collinear with a triangle edge..
|
||||
|
||||
|
||||
* Algebraic Kernel
|
||||
|
||||
- Avoids linking error "duplicate symbols" when two compilation units using
|
||||
the algebraic kernel are linked.
|
||||
|
||||
|
||||
* 2D Mesh Generation
|
||||
|
||||
- Fix a compilation error in the header <CGAL/Mesh_2/Do_not_refine_edges.h>
|
||||
when g++ version 4.7 is used.
|
||||
|
||||
|
||||
* Surface Mesh Generation and 3D Mesh Generation
|
||||
|
||||
- Fix an important bug in the CGAL_ImageIO library, that could lead to wrong
|
||||
result when meshing from a 3D image.
|
||||
|
||||
- Fix the compilation of the demo in demo/Surface_mesher, when Boost version
|
||||
1.48 or 1.49 is used.
|
||||
|
||||
|
||||
* 3D Boolean Operations on Nef Polygons Embedded on the Sphere
|
||||
|
||||
- Fix a memory leak due to the usage of an internal mechanism that has been
|
||||
replaced by boost::any. This also influences the packages 2D Boolean
|
||||
Operations on Nef Polygons, 3D Boolean Operations on Nef Polyhedra, Convex
|
||||
Decomposition of Polyhedra, and 3D Minkowski Sum of Polyhedra.
|
||||
|
||||
|
||||
* Surface Mesh Parameterization
|
||||
|
||||
- Fixed a memory leak.
|
||||
|
||||
|
||||
* 2D Arrangement
|
||||
|
||||
- Fixed several memory leaks.
|
||||
|
||||
|
||||
-------------------------------- Release 4.0 --------------------------------
|
||||
|
||||
Release date: March 2012
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@
|
|||
<td width="28%">
|
||||
|
||||
<table CELLSPACING=0>
|
||||
<tr><td><a href="#release4.1">4.1</a> <td> (September 2012)
|
||||
<tr><td><a href="#release4.0.1">4.0.1</a> <td> (June 2012)
|
||||
<tr><td><a href="#release4.0">4.0</a> <td> (March 2012)
|
||||
<tr><td><a href="#release3.9">3.9</a> <td> (September 2011)
|
||||
<tr><td><a href="#release3.8">3.8</a> <td> (April 2011)
|
||||
|
|
@ -106,9 +108,15 @@ David A. Wheeler's 'SLOCCount'</a>, restricted to the <code>include/CGAL/</code>
|
|||
|
||||
<h3>Installation</h3>
|
||||
<ul>
|
||||
<li>Improved configuration for essential and optional external third
|
||||
party software</li>
|
||||
<li>Improved configuration for essential and optional external third party software</li>
|
||||
<li>Added more general script to create CMakeLists.txt files: <tt>cgal_create_CMakeLists</tt></li>
|
||||
<li>Availability tests for C++11 features are now performed with the help of <a href="http://www.boost.org/libs/config">Boost.Config</a>. A Boost version of 1.40.0 or higher is needed to use C++11 features.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>2D Convex Hulls and Extreme Points </h3>
|
||||
<ul>
|
||||
<li>Speed up the preprocessing stage of the Akl-Toussaint implementation (used by the free function <code>convex_hull_2</code> when forward iterators are provided as input).</li>
|
||||
</ul>
|
||||
|
||||
<h3>Combinatorial Maps</h3>
|
||||
|
|
@ -126,15 +134,21 @@ David A. Wheeler's 'SLOCCount'</a>, restricted to the <code>include/CGAL/</code>
|
|||
<li>All Kernel functors now support the result_of protocol.</li>
|
||||
</ul>
|
||||
|
||||
<h3>STL_Extensions for CGAL</h3>
|
||||
<ul>
|
||||
<li>The namespace <code>cpp0x</code> has been renamed <code>cpp11</code>. The old name is still available for backward compatibility.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 id="release4.0.1">Release 4.0.1</h2>
|
||||
|
||||
<DIV>
|
||||
<p>Release date: April 2012</p>
|
||||
<p>Release date: June 2012</p>
|
||||
|
||||
<p>
|
||||
This is a bug fix release. The following has been changed
|
||||
since CGAL-4.0:</p>
|
||||
This is a bug fix release. Apart various minor fixes in the documentation,
|
||||
the following has been changed since CGAL-4.0:</p>
|
||||
|
||||
<h3> 2D Voronoi Diagram Adaptor (re-added)</h3>
|
||||
<ul>
|
||||
|
|
@ -155,17 +169,28 @@ since CGAL-4.0:</p>
|
|||
using the algebraic kernel are linked.</li>
|
||||
</ul>
|
||||
|
||||
<h3>2D Mesh Generation</h3>
|
||||
<ul>
|
||||
<li>Fix a compilation error in the
|
||||
header <code><CGAL/Mesh_2/Do_not_refine_edges.h></code> when g++
|
||||
version 4.7 is used.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Surface Mesh Generation and 3D Mesh Generation</h3>
|
||||
<ul>
|
||||
<li>Fix an important bug in the <code>CGAL_ImageIO</code> library, that
|
||||
could lead to wrong result when meshing from a 3D image.</li>
|
||||
<li>Fix the compilation of the demo in <code>demo/Surface_mesher</code>,
|
||||
when Boost version 1.48 or 1.49 is used.</li>
|
||||
</ul>
|
||||
|
||||
<h3>3D Boolean Operations on Nef Polygons Embedded on the Sphere</h3>
|
||||
<ul>
|
||||
<li>Fix a memory leak due to the usage of an internal mechanism that has been replaced by boost::any. This also influences the packages
|
||||
2D Boolean Operations on Nef Polygons, 3D Boolean Operations on Nef Polyhedra, Convex Decomposition of Polyhedra, and
|
||||
3D Minkowski Sum of Polyhedra.
|
||||
<li>Fix a memory leak due to the usage of an internal mechanism that has
|
||||
been replaced by <code>boost::any</code>. This also influences the
|
||||
packages 2D Boolean Operations on Nef Polygons, 3D Boolean Operations on
|
||||
Nef Polyhedra, Convex Decomposition of Polyhedra, and 3D Minkowski Sum of
|
||||
Polyhedra.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Surface Mesh Parameterization</h3>
|
||||
|
|
@ -177,7 +202,6 @@ since CGAL-4.0:</p>
|
|||
<ul>
|
||||
<li>Fixed several memory leaks.</li>
|
||||
</ul>
|
||||
</DIV>
|
||||
|
||||
</DIV>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
//| This flag is set if the compiler bugs when handling denormal values at
|
||||
//| compile time. At least PGCC 7.1-2 has the bug.
|
||||
//|
|
||||
//| Laurent Rineau, 2012/06/14: no supported platform has the bug now.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
// Copyright (c) 1999,2000
|
||||
// Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// and Tel-Aviv University (Israel). All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : various
|
||||
|
||||
//| If a compiler (or assembler or linker) has problems with long names
|
||||
//| CGAL_CFG_LONGNAME_BUG is set.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning( error : 4503)
|
||||
#endif
|
||||
|
||||
#define LONG_NAME \
|
||||
Wwwwwwwwwooooooooo_vvvvvvveeeeeerrrryyyy_llllooooonnnnnnggggg\
|
||||
_nnnnnaaaammmmmeeeeWwwwwwwwwooooooooo_vvvvvvveeeeeerrrryyyy_l\
|
||||
lllooooonnnnnnggggg_nnnnnaaaammmmmeeeeWwwwwwwwwooooooooo_vvvv\
|
||||
vvveeeeeerrrryyyy_llllooooonnnnnnggggg_nnnnnaaaammmmmeeeeWwww\
|
||||
wwwwwooooooooo_vvvvvvveeeeeerrrryyyy_llllooooonnnnnnggggg_nnn\
|
||||
nnaaaammmmmeeeeWwwwwwwwwooooooooo_vvvvvvveeeeeerrrryyyy_llllo\
|
||||
oooonnnnnnggggg_nnnnnaaaammmmmeeeeWwwwwwwwwooooooooo_vvvvvvve\
|
||||
eeeeerrrryyyy_llllooooonnnnnnggggg_nnnnnaaaammmmmeeee
|
||||
|
||||
template < class A >
|
||||
struct LONG_NAME
|
||||
{
|
||||
LONG_NAME (int i) : a(i) {}
|
||||
A a;
|
||||
};
|
||||
|
||||
int main ()
|
||||
{
|
||||
LONG_NAME< LONG_NAME< LONG_NAME< LONG_NAME< LONG_NAME< LONG_NAME<
|
||||
LONG_NAME< LONG_NAME< LONG_NAME< LONG_NAME< int > > > > > > > > > > a (1);
|
||||
(void) a;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support std::array<> (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_ARRAY is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <array>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::array<int, 3> a = { {0, 2, 4} };
|
||||
assert(a[1] == 2);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support C++0x auto
|
||||
//| CGAL_CFG_NO_CPP0X_AUTO is set.
|
||||
|
||||
struct A {};
|
||||
|
||||
void use(A) {}
|
||||
|
||||
A f()
|
||||
{
|
||||
return A();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
auto i = f();
|
||||
A j = i;
|
||||
use(j);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Phillip Möller
|
||||
|
||||
//| If a compiler does not support std::copy_n (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_COPY_N is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
|
||||
int main()
|
||||
{
|
||||
int arr[] = {1, 2, 3, 4, 5 };
|
||||
int arr2[] = {0, 0, 0, 0, 0 };
|
||||
std::copy_n(arr, 3, arr2);
|
||||
|
||||
assert(arr2[0] == 1);
|
||||
assert(arr2[1] == 2);
|
||||
assert(arr2[2] == 3);
|
||||
assert(arr2[3] == 0);
|
||||
assert(arr2[4] == 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support decltype() (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_DECLTYPE is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
|
||||
// It also tests if const refs are properly found.
|
||||
template <typename>
|
||||
struct Is_const_ref
|
||||
{ static const bool value = false; };
|
||||
|
||||
template <typename T>
|
||||
struct Is_const_ref <const T&>
|
||||
{ static const bool value = true; };
|
||||
|
||||
void use(int) {}
|
||||
|
||||
int f_copy(int i) { return i; }
|
||||
|
||||
const int& f_cref(const int & i) { return i; }
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = 2;
|
||||
decltype(i+i) j = 3;
|
||||
use(j);
|
||||
assert(! Is_const_ref<decltype(i)>::value);
|
||||
assert(! Is_const_ref<decltype(f_copy(i))>::value);
|
||||
assert( Is_const_ref<decltype(f_cref(i))>::value);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support default template arguments for function templates
|
||||
//| (from C++0x) CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES is set.
|
||||
|
||||
template <typename Obj>
|
||||
struct Kernel_traits
|
||||
{
|
||||
typedef typename Obj::type type;
|
||||
};
|
||||
|
||||
template < typename T, typename K = typename Kernel_traits<T>::type >
|
||||
K f(const T&, const K & k = K())
|
||||
{
|
||||
return k;
|
||||
}
|
||||
|
||||
struct Point
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = f(Point());
|
||||
i = f(Point(), i);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) 2007 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support delegating constructors (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_DELEGATING_CONSTRUCTORS is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
|
||||
struct A {
|
||||
A () : A(10) {}
|
||||
A (int ii) : i(ii) {}
|
||||
|
||||
int i;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
A b(1);
|
||||
assert(a.i == 10);
|
||||
assert(b.i == 1);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support "explicitly-defaulted" and "deleted" functions (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS is set.
|
||||
|
||||
struct A {
|
||||
A () = default;
|
||||
A (int) = delete;
|
||||
A (const A&) = delete;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support C++0x initializer lists
|
||||
//| CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS is set.
|
||||
|
||||
#include <initializer_list>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <complex>
|
||||
|
||||
template < typename T >
|
||||
void use(const T&) {}
|
||||
|
||||
struct S
|
||||
{
|
||||
S(std::initializer_list<double> l)
|
||||
{
|
||||
std::vector<double> v(l.begin(), l.end());
|
||||
use(v);
|
||||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
int a = {1};
|
||||
std::complex<double> z{1,2};
|
||||
std::vector<std::string> v{"once", "upon", "a", "time"}; // 4 string elements
|
||||
use(a); use(z); use(v);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk/Installation/config/testfiles/CGAL_CFG_NO_CPP0X_DECLTYPE.cpp $
|
||||
// $Id: CGAL_CFG_NO_CPP0X_DECLTYPE.cpp 43247 2008-05-21 15:34:36Z spion $
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support std::isfinite() (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_ISFINITE is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#ifdef isfinite
|
||||
# error isfinite cannot be a macro if one want to use C++0x std::isfinite
|
||||
// On Intel Compiler 12, isfinite is a macro in <cmath.h> :-(
|
||||
#endif
|
||||
|
||||
template < typename T >
|
||||
void use(T) {}
|
||||
|
||||
int main()
|
||||
{
|
||||
double d = 1.0;
|
||||
bool b = std::isfinite(d);
|
||||
assert(b);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support C++0x lambdas
|
||||
//| CGAL_CFG_NO_CPP0X_LAMBDAS is set.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
|
||||
int main()
|
||||
{
|
||||
float f[3] = {3, 1, -2};
|
||||
|
||||
std::sort(f, f+3, [](float a, float b) { return std::abs(a) < std::abs(b); });
|
||||
|
||||
assert(f[0] == 1);
|
||||
assert(f[1] == -2);
|
||||
assert(f[2] == 3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (c) 2002
|
||||
// Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// and Tel-Aviv University (Israel). All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| The long long built-in integral type is not part of the ISO C++ 98 standard,
|
||||
//| but many compilers support it nevertheless since it's part of the ISO
|
||||
//| C standard. It is part of C++0x.
|
||||
//| The following definition is set if it is supported.
|
||||
|
||||
template < typename T >
|
||||
void kill_unused_warning(const T&) {}
|
||||
|
||||
int main()
|
||||
{
|
||||
long long int i = 1;
|
||||
kill_unused_warning(i);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (c) 2011 GeometryFactory (France). All rights reserved.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Philipp Möller
|
||||
|
||||
//| If a compiler does not support std::next and std::prev (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_NEXT_PREV is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
|
||||
int main()
|
||||
{
|
||||
int i[] = {1, 2, 3, 4, 5};
|
||||
//single argument
|
||||
assert(*std::next(i) == 2);
|
||||
assert(*std::prev(i + 5) == 5);
|
||||
//two argument version
|
||||
assert(*std::next(i, 2) == 3);
|
||||
assert(*std::prev(i + 5, 2) == 4);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
// Copyright (c) 2007 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support rvalue references (from C++0x)
|
||||
//| CGAL_CFG_NO_RVALUE_REFERENCE is set.
|
||||
|
||||
struct A {
|
||||
A () {}
|
||||
|
||||
// copy semantics
|
||||
A (const A&) {}
|
||||
A& operator=(const A&) { return *this; }
|
||||
|
||||
// move semantics
|
||||
A (A&&) {}
|
||||
A& operator=(A&&) { return *this; }
|
||||
|
||||
~A () {}
|
||||
};
|
||||
|
||||
A f()
|
||||
{
|
||||
return A();
|
||||
}
|
||||
|
||||
#include <utility>
|
||||
|
||||
A&& f(A&& a)
|
||||
{
|
||||
return std::forward<A>(a);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
A a = f();
|
||||
A b;
|
||||
b = a;
|
||||
b = f();
|
||||
b = f(A());
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (c) 2011 INRIA Saclay (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Marc Glisse
|
||||
|
||||
//| If a compiler does not support static_assert (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_STATIC_ASSERT is set.
|
||||
|
||||
int main(){
|
||||
static_assert(true,"Everything is fine");
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support std::tuple<> (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_TUPLE is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <tuple>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::tuple<int, double> a (2, 1.0);
|
||||
assert(std::get<0>(a) == 2);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
// Copyright (c) 2007 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support variadic templates (from C++0x)
|
||||
//| CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
|
||||
// It is annoying that the test passes in non-std=c++0x mode, hence
|
||||
// triggering warnings all over the place.
|
||||
// If GCC's non-c++0x mode finally rejects variadic templates at some point
|
||||
// in some future release, we will be able to refine the version check.
|
||||
#if defined __GNUC__ && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) \
|
||||
&& !defined __GXX_EXPERIMENTAL_CXX0X__
|
||||
# error GCC needs -std=c++0x to enable variadic templates without warnings
|
||||
#endif
|
||||
|
||||
double total = 0.0;
|
||||
|
||||
template < typename T >
|
||||
T inc(const T& i)
|
||||
{
|
||||
total += i;
|
||||
return i+T(1);
|
||||
}
|
||||
|
||||
void print() {}
|
||||
|
||||
template < typename T, typename... Args >
|
||||
void print(const T&t, const Args&... args)
|
||||
{
|
||||
(void) t;
|
||||
print(args...);
|
||||
}
|
||||
|
||||
void f() {}
|
||||
|
||||
template < typename... Args >
|
||||
void f(const Args&... args)
|
||||
{
|
||||
print(inc(args)...);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
f();
|
||||
f(1);
|
||||
f(2,3.5);
|
||||
f(2,3.5,1u);
|
||||
assert(total == 13);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) 2009 GeometryFactory Sarl (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Laurent Rineau
|
||||
|
||||
//| If a compiler does not support the alternative tokens for logicial
|
||||
//| operators (section 2.5 Alternative tokens [lex.digraph] of the C++
|
||||
//| norm, 2003), then CGAL_CFG_NO_LOGICAL_OPERATORS_ALTERNATIVES is set.
|
||||
|
||||
int main()
|
||||
{
|
||||
if( true and (not false) )
|
||||
if(1 not_eq 2)
|
||||
if(false or true)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) 2010 GeometryFactory Sarl (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Laurent Rineau
|
||||
|
||||
//| If a compiler does not support the message pragma, and emit errors
|
||||
//| about unknown pragmas, then CGAL_CFG_NO_MESSAGE_PRAGMA_BUG is set.
|
||||
|
||||
#pragma message ( "Hello world" )
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support statement expressions (a GCC extension)
|
||||
//| CGAL_CFG_NO_STATEMENT_EXPRESSIONS is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
|
||||
struct A {
|
||||
int* p;
|
||||
|
||||
A(int i) : p(new int(i)) {}
|
||||
~A() { delete p; }
|
||||
int value() const { return *p;}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = __extension__ ({ int j = 2; j+j; });
|
||||
assert(i == 4);
|
||||
|
||||
// The Intel Compiler complains with the following error:
|
||||
// "error: destructible entities are not allowed inside of a statement
|
||||
// expression"
|
||||
// See http://software.intel.com/en-us/articles/cdiag1487/
|
||||
i = __extension__ ({ A a(2); A b(3); a.value() + b.value(); });
|
||||
|
||||
assert(i == 5);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) 2008 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support std::tr1::array<> (from TR1)
|
||||
//| CGAL_CFG_NO_TR1_ARRAY is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <tr1/array>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::tr1::array<int, 3> a = { {0, 2, 4} };
|
||||
assert(a[1] == 2);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
//| If a compiler does not support std::tr1::tuple<> (from TR1)
|
||||
//| CGAL_CFG_NO_TR1_TUPLE is set.
|
||||
|
||||
#undef NDEBUG
|
||||
#include <cassert>
|
||||
#include <tr1/tuple>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::tr1::tuple<int, double> a (2, 1.0);
|
||||
assert(std::tr1::get<0>(a) == 2);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -53,6 +53,7 @@
|
|||
|
||||
// The following header file defines among other things BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <CGAL/version.h>
|
||||
|
||||
|
|
@ -69,12 +70,61 @@
|
|||
#include <CGAL/export/CGAL.h>
|
||||
|
||||
//----------------------------------------------------------------------//
|
||||
// Enable C++0x features with GCC -std=c++0x (even when not specified at build time)
|
||||
//----------------------------------------------------------------------//
|
||||
// Detect features at compile-time. Some macros have only been
|
||||
// introduced as of Boost 1.40. In that case, we simply say that the
|
||||
// feature is not available, even if that is wrong.
|
||||
// ----------------------------------------------------------------------//
|
||||
|
||||
#if defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__
|
||||
# include <CGAL/internal/gcc_cpp0x.h>
|
||||
#if defined(BOOST_NO_0X_HDR_ARRAY) || BOOST_VERSION < 104000
|
||||
#define CGAL_CFG_NO_CPP0X_ARRAY 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_DECLTYPE)
|
||||
#define CGAL_CFG_NO_CPP0X_DECLTYPE 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_DELETED_FUNCTIONS) || defined(BOOST_NO_DEFAULTED_FUNCTIONS)
|
||||
#define CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
|
||||
#define CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_INITIALIZER_LISTS)
|
||||
#define CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS 1
|
||||
#endif
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1600
|
||||
#define CGAL_CFG_NO_CPP0X_ISFINITE 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_LONG_LONG)
|
||||
#define CGAL_CFG_NO_CPP0X_LONG_LONG 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_LAMBDAS) || BOOST_VERSION < 104000
|
||||
#define CGAL_CFG_NO_CPP0X_LAMBDAS 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_RVALUE_REFERENCES)
|
||||
#define CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define CGAL_CFG_NO_CPP0X_STATIC_ASSERT 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_0X_HDR_TUPLE) || (BOOST_VERSION < 104000)
|
||||
#define CGAL_CFG_NO_CPP0X_TUPLE 1
|
||||
#endif
|
||||
#if defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
#define CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES 1
|
||||
#endif
|
||||
#if !defined(BOOST_HAS_TR1_ARRAY)
|
||||
#define CGAL_CFG_NO_TR1_ARRAY 1
|
||||
#endif
|
||||
#if !defined(BOOST_HAS_TR1_TUPLE)
|
||||
#define CGAL_CFG_NO_TR1_TUPLE 1
|
||||
#endif
|
||||
#if !defined(__GNUC__)
|
||||
#define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1
|
||||
#endif
|
||||
#if __cplusplus < 201103L && !(_MSC_VER >= 1600)
|
||||
#define CGAL_CFG_NO_CPP0X_COPY_N 1
|
||||
#define CGAL_CFG_NO_CPP0X_NEXT_PREV 1
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------//
|
||||
// auto-link the CGAL library on platforms that support it
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
// Copyright (c) 2010 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; either version 3 of the License,
|
||||
// or (at your option) any later version.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion
|
||||
|
||||
#ifndef CGAL_INTERNAL_GCC_CPP0X_H
|
||||
#define CGAL_INTERNAL_GCC_CPP0X_H
|
||||
|
||||
// Enable C++0x features with GCC -std=c++0x (even when not specified at build time)
|
||||
// See http://gcc.gnu.org/projects/cxx0x.html .
|
||||
|
||||
#if defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) // GCC >= 4.3
|
||||
|
||||
// (tested with Fedora 10's g++ 4.3.2)
|
||||
|
||||
#undef CGAL_CFG_NO_CPP0X_ARRAY
|
||||
#undef CGAL_CFG_NO_CPP0X_DECLTYPE
|
||||
#undef CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES
|
||||
#undef CGAL_CFG_NO_CPP0X_ISFINITE
|
||||
#undef CGAL_CFG_NO_CPP0X_LONG_LONG
|
||||
#undef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
|
||||
#undef CGAL_CFG_NO_CPP0X_STATIC_ASSERT
|
||||
#undef CGAL_CFG_NO_CPP0X_TUPLE
|
||||
#undef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
|
||||
|
||||
#endif // GCC >= 4.3
|
||||
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) // GCC >= 4.4
|
||||
|
||||
#undef CGAL_CFG_NO_CPP0X_AUTO
|
||||
#undef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
|
||||
#undef CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS
|
||||
|
||||
#endif // GCC >= 4.4
|
||||
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) // GCC >= 4.5
|
||||
|
||||
#undef CGAL_CFG_NO_CPP0X_LAMBDAS
|
||||
|
||||
#endif // GCC >= 4.5
|
||||
|
||||
// Still not available in 4.5 :
|
||||
// CGAL_CFG_NO_CPP0X_DELEGATING_CONSTRUCTORS
|
||||
|
||||
#endif // __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#endif // CGAL_INTERNAL_GCC_CPP0X_H
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
#include <CGAL/Interval_skip_list.h>
|
||||
#include <CGAL/Level_interval.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel EIK;
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel EIK;
|
||||
typedef EIK::Point_3 Point_3;
|
||||
typedef CGAL::Triangulation_euclidean_traits_xy_3<EIK> K;
|
||||
typedef CGAL::Projection_traits_xy_3<EIK> K;
|
||||
typedef CGAL::Delaunay_triangulation_2<K> Delaunay;
|
||||
typedef Delaunay::Face_handle Face_handle;
|
||||
typedef Delaunay::Finite_faces_iterator Finite_faces_iterator;
|
||||
|
|
|
|||
|
|
@ -198,6 +198,8 @@ If the result type is a number type, the prefix is \ccc{Compute_}:
|
|||
\ccNestedType{Compute_squared_radius_2}{a model of \ccc{Kernel::ComputeSquaredRadius_2}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_area_2}{a model of \ccc{Kernel::ComputeArea_2}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_determinant_2}{a model of \ccc{Kernel::ComputeDeterminant_2}}
|
||||
|
||||
\ccHeading{Generalized Predicates}
|
||||
|
||||
|
|
@ -225,7 +227,7 @@ If the result type is a number type, the prefix is \ccc{Compute_}:
|
|||
\ccGlue
|
||||
\ccNestedType{Compare_xy_2}{a model of \ccc{Kernel::CompareXY_2}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compare_xy_2}{a model of \ccc{Kernel::CompareYX_2}}
|
||||
\ccNestedType{Compare_yx_2}{a model of \ccc{Kernel::CompareYX_2}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compare_y_at_x_2}{a model of \ccc{Kernel::CompareYAtX_2}}
|
||||
\ccGlue
|
||||
|
|
@ -443,6 +445,8 @@ If the result type is a number type, the prefix is \ccc{Compute_}:
|
|||
\ccGlue
|
||||
\ccNestedType{Compute_approximate_area_3}{a model of \ccc{Kernel::ComputeApproximateArea_3}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_determinant_3}{a model of \ccc{Kernel::ComputeDeterminant_3}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_squared_distance_3}{a model of \ccc{Kernel::ComputeSquaredDistance_3}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_squared_length_3}{a model of \ccc{Kernel::ComputeSquaredLength_3}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CGAL_RESULT_OF_KERNEL_H
|
||||
#define CGAL_RESULT_OF_KERNEL_H
|
||||
|
||||
#include <CGAL/compiler_config.h>
|
||||
#include <CGAL/config.h>
|
||||
|
||||
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) && !defined(CGAL_CFG_NO_CPP0X_STATIC_ASSERT)
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ replacing operators, especially for equality testing.
|
|||
|
||||
\ccHeading{Constructions}
|
||||
|
||||
\ccNestedType{Barycentric_coordinates_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Center_of_sphere_d}{a model of \ccc{Kernel::Center_of_sphere_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_coordinate_d}{a model of \ccc{Kernel::Compute_coordinate_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Construct_point_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Construct_vector_d}{}
|
||||
|
|
@ -73,78 +79,72 @@ replacing operators, especially for equality testing.
|
|||
\ccGlue
|
||||
\ccNestedType{Construct_aff_transformation_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Construct_cartesian_const_iterator_d}{}
|
||||
\ccNestedType{Construct_cartesian_const_iterator_d}{a model of \ccc{Kernel::ConstructCartesianConstIterator_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Intersect_d}{a model of \ccc{Kernel::Intersect_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Lift_to_paraboloid_d}{a model of \ccc{Kernel::Lift_to_paraboloid_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Linear_base_d}{a model of \ccc{Kernel::Linear_base_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Midpoint_d}{a model of \ccc{Kernel::Midpoint_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Orthogonal_vector_d}{a model of \ccc{Kernel::Orthogonal_vector_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_of_sphere_d}{a model of \ccc{Kernel::Point_of_sphere_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_to_vector_d}{a model of \ccc{Kernel::Point_to_vector_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Project_along_d_axis_d}{a model of \ccc{Kernel::Project_along_d_axis_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Squared_distance_d}{a model of \ccc{Kernel::Squared_distance_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Value_at_d}{a model of \ccc{Kernel::Value_at_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_to_point_d}{a model of \ccc{Kernel::Vector_to_point_d}}
|
||||
\ccGlue
|
||||
|
||||
\ccHeading{Generalized Predicates}
|
||||
|
||||
\ccNestedType{Affine_rank_d}{}
|
||||
\ccNestedType{Affine_rank_d}{a model of \ccc{Kernel::Affine_rank_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Affinely_independent_d}{}
|
||||
\ccNestedType{Affinely_independent_d}{a model of \ccc{Kernel::Affinely_independent_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Barycentric_coordinates_d}{}
|
||||
\ccNestedType{Compare_lexicographically_d}{a model of \ccc{Kernel::Compare_lexicographically_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Center_of_sphere_d}{}
|
||||
\ccNestedType{Component_accessor_d}{a model of \ccc{Kernel::Component_accessor_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compare_lexicographically_d}{}
|
||||
\ccNestedType{Contained_in_affine_hull_d}{a model of \ccc{Kernel::Contained_in_affine_hull_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Component_accessor_d}{}
|
||||
\ccNestedType{Contained_in_linear_hull_d}{a model of \ccc{Kernel::Contained_in_linear_hull_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Compute_coordinate_d}{}
|
||||
\ccNestedType{Contained_in_simplex_d}{a model of \ccc{Kernel::Contained_in_simplex_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Contained_in_affine_hull_d}{}
|
||||
\ccNestedType{Equal_d}{a model of \ccc{Kernel::Equal_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Contained_in_linear_hull_d}{}
|
||||
\ccNestedType{Has_on_positive_side_d}{a model of \ccc{Kernel::Has_on_positive_side_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Contained_in_simplex_d}{}
|
||||
\ccNestedType{Less_coordinate_d}{a model of \ccc{Kernel::Less_coordinate_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Equal_d}{}
|
||||
\ccNestedType{Less_lexicographically_d}{a model of \ccc{Kernel::Less_lexicographically_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Has_on_positive_side_d}{}
|
||||
\ccNestedType{Less_or_equal_lexicographically_d}{a model of \ccc{Kernel::Less_or_equal_lexicographically_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Intersect_d}{}
|
||||
\ccNestedType{Linear_rank_d}{a model of \ccc{Kernel::Linear_rank_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Less_lexicographically_d}{}
|
||||
\ccNestedType{Linearly_independent_d}{a model of \ccc{Kernel::Linearly_independent_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Less_or_equal_lexicographically_d}{}
|
||||
\ccNestedType{Orientation_d}{a model of \ccc{Kernel::Orientation_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Less_coordinate_d}{}
|
||||
\ccNestedType{Oriented_side_d}{a model of \ccc{Kernel::Oriented_side_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Lift_to_paraboloid_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Linear_base_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Linear_rank_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Linearly_independent_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Midpoint_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Orientation_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Oriented_side_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Orthogonal_vector_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_dimension_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_of_sphere_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_to_vector_d}{}
|
||||
\ccNestedType{Point_dimension_d}{a model of \ccc{Kernel::Point_dimension_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Position_on_line_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Project_along_d_axis_d}{}
|
||||
\ccNestedType{Side_of_bounded_sphere_d}{a model of \ccc{Kernel::Side_of_bounded_sphere_d}}
|
||||
\ccGlue
|
||||
\ccNestedType{Side_of_bounded_sphere_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Side_of_oriented_sphere_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Squared_distance_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Value_at_d}{}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_to_point_d}{}
|
||||
\ccNestedType{Side_of_oriented_sphere_d}{a model of \ccc{Kernel::Side_of_oriented_sphere_d}}
|
||||
\ccGlue
|
||||
|
||||
\ccOperations
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ A model for this must provide:
|
|||
\ccCreationVariable{fo}
|
||||
|
||||
\ccMemberFunction{template <class ForwardIterator> Kernel::Point_d
|
||||
operator()(ForwardIterator first, ForwardIterator last);}{computes
|
||||
the affine rank of the points in \ccc{A = tuple [first,last)}.
|
||||
\ccPrecond The objects are of the same dimension. \ccRequire The
|
||||
value type of \ccc{ForwardIterator} is \ccc{Kernel::Point_d}.}
|
||||
operator()(ForwardIterator first, ForwardIterator last);}{returns the
|
||||
center of the sphere spanned by the points in \ccc{A = tuple
|
||||
[first,last)}. \ccPrecond $A$ contains $d+1$ affinely independent
|
||||
points of dimension $d$. \ccRequire The value type of
|
||||
\ccc{ForwardIterator} is \ccc{Kernel::Point_d}.}
|
||||
|
||||
\end{ccRefFunctionObjectConcept}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,27 @@
|
|||
abru = Antoine Bru <Antoine.Bru@sophia.inria.fr>
|
||||
afabri = Andreas Fabri <Andreas.Fabri@geometryfactory.com>
|
||||
ameyer = Andreas Meyer <ameyer@mpi-inf.mpg.de>
|
||||
andreasfabri = Andreas Fabri <Andreas.Fabri@geometryfactory.com>
|
||||
akobel = Alexander Kobel <akobel@mpi-inf.mpg.de>
|
||||
algerbya = Yacine Bouzidi <bouzidi.yacine@gmail.com>
|
||||
amebarki = Abdelkrim Mebarki <Abdelkrim.Mebarki@sophia.inria.fr>
|
||||
ameyer = Andreas Meyer <ameyer@mpi-inf.mpg.de>
|
||||
ameyer = Andreas Meyer <Andreas.Meyer@sophia.inria.fr>
|
||||
amitgupta = Amit Gupta <amitgupta@cse.iitb.ac.in>
|
||||
analekta = Costas Tsirogiannis <analekta@gmail.com>
|
||||
andreasfabri = Andreas Fabri <Andreas.Fabri@geometryfactory.com>
|
||||
andyslj = Le-Jeng Shiue <Andy.Shiue@gmail.com>
|
||||
asafpor = Asaf Porat <asafpor@gmail.com>
|
||||
asm = Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||
atsui = Alex Tsui <alextsui05@gmail.com>
|
||||
avaxman = Amir Vaxman <avaxman@cs.technion.ac.il>
|
||||
baesken = Matthias Bäsken <Matthias.Baesken@mpi-sb.mpg.de>
|
||||
balasmic = Michal Kleinbort <michal.balas@gmail.com>
|
||||
baruchzu = Baruch Zukerman <baruchzu@post.tau.ac.il>
|
||||
bgalehouse = Ben Galehouse <bgalehouse@spamcop.net>
|
||||
cbonetto = Carine Bonetto <Carine.Bonetto@sophia.inria.fr>
|
||||
cdelage = Christophe Delage <Christophe.Delage@sophia.inria.fr>
|
||||
cgal-web-admin = CGAL Web Admin <cgal-editorial-board@sophia.inria.fr>
|
||||
cggaurav = Gaurav Chandrashekar <gauravc@nus.edu.sg>
|
||||
cjamin = Clément Jamin <clement.jamin@inria.fr>
|
||||
cvs2svn = CVS2SVN tool <cgal-develop@sophia.inria.fr>
|
||||
cwormser = Camille Wormser <cwormser@inf.ethz.ch>
|
||||
danha = Dan Halperin <danha@post.tau.ac.il>
|
||||
|
|
@ -24,6 +29,7 @@ dave = David Millman <David.Millman@sophia.inria.fr>
|
|||
dboltcheva = Dobrina Boltcheva <Dobrina.Boltcheva@sophia.inria.fr>
|
||||
dima = Dmitrii V Pasechnik <dima@ntu.edu.sg>
|
||||
drussel = Daniel Russel <drussel@gmail.com>
|
||||
dtyagi = Devashish Tyagi <devashishrocker@gmail.com>
|
||||
efif = Efi Fogel <efif@post.tau.ac.il>
|
||||
elip = Eli Packer <elip@post.tau.ac.il>
|
||||
eric = Eric Berberich <eric@mpi-inf.mpg.de>
|
||||
|
|
@ -58,13 +64,16 @@ hert = Susan Hert <hert@mpi-sb.mpg.de>
|
|||
hervebronnimann = Hervé Brönnimann <Herve.Bronnimann@sophia.inria.fr>
|
||||
hoffmann = Michael Hoffmann <hoffmann@inf.ethz.ch>
|
||||
isuslov = Ilya Suslov <Ilya.Suslov@sophia.inria.fr>
|
||||
iyaz = Ílker Yaz <ilkeryaz@gmail.com>
|
||||
jeanmoug = Marc Jeanmougin <Marc.Jeanmougin@sophia.inria.fr>
|
||||
jflotott = Julia Flötotto <Julia.Flototto@sophia.inria.fr>
|
||||
jhazebro = Julien Hazebrouck <Julien.Hazebrouck@sophia.inria.fr>
|
||||
jlenorma = Jacques Le Normand <Jacques.Le.Normand@sophia.inria.fr>
|
||||
jtournoi = Jane Tournois <Jane.Tournois@sophia.inria.fr>
|
||||
jzhou = Jin Zhou <zhoujin10@gmail.com>
|
||||
kacper_rzepecki = Kacper Rzepecki <kacperrzepecki@kacperrzepecki.pl>
|
||||
kettner = Lutz Kettner <kettner@mpi-sb.mpg.de>
|
||||
klshi = Kanle Shi <Kanle.Shi@sophia.inria.fr>
|
||||
leiserow = Eran Leiserowitz <leiserow@post.tau.ac.il>
|
||||
lrineau = Laurent Rineau <Laurent.Rineau__CGAL@normalesup.org>
|
||||
lsaboret = Laurent Saboret <Laurent.Saboret@sophia.inria.fr>
|
||||
|
|
@ -87,7 +96,9 @@ osbild = Ralf Osbild <osbild@mpi-sb.mpg.de>
|
|||
ovgrig = Ovidiu Grigore <ovgrig@yahoo.com>
|
||||
palliez = Pierre Alliez <Pierre.Alliez@sophia.inria.fr>
|
||||
penarand = Luis Peñaranda <penarand@loria.fr>
|
||||
pivanov = Petar Ivanov <peter.ivanov89@gmail.com>
|
||||
pmachado = Pedro Machado Manhaes de Castro <Pedro.Machado@sophia.inria.fr>
|
||||
pmemari = Pooran Memari <memari@telecom-paristech.fr>
|
||||
pmoeller = Philipp Möller <Philipp.Moeller@geometryfactory.com>
|
||||
rahul = Rahul Ray <rahul@mpi-sb.mpg.de>
|
||||
rchaine = Raphaëlle Chaine <raphaelle.chaine@liris.cnrs.fr>
|
||||
|
|
@ -98,6 +109,7 @@ rursu = Radu Ursu <Radu.Ursu@sophia.inria.fr>
|
|||
sabath = Niv Sabath <sabath@post.tau.ac.il>
|
||||
sccode = Fei (Sophie) Che <che.sophie@gmail.com>
|
||||
seel = Michael Seel <seel@mpi-sb.mpg.de>
|
||||
sgiraudo = Simon Giraudot <simon.giraudot@inria.fr>
|
||||
shaihi = Shai Hirsch <shaihi@post.tau.ac.il>
|
||||
shornus = Samuel Hornus <Samuel.Hornus@sophia.inria.fr>
|
||||
singler = Johannes Singler <singler@ira.uka.de>
|
||||
|
|
@ -106,6 +118,7 @@ sloriot = Sébastien Loriot <sloriot.ml@gmail.com>
|
|||
soudot = Steve Oudot <Steve.Oudot@sophia.inria.fr>
|
||||
spion = Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
|
||||
spostoll = Stéphane Postollec <Stephane.Postollec@sophia.inria.fr>
|
||||
sradhak = Sandhyaa Radhakrishnan <sandhyaa1990@gmail.com>
|
||||
sschaeff = Sarah Schäffer <sschaeff@mpi-sb.mpg.de>
|
||||
stayeb = Stéphane Tayeb <Stephane.Tayeb@sophia.inria.fr>
|
||||
sven = Sven Schönherr <sven@inf.ethz.ch>
|
||||
|
|
@ -113,8 +126,12 @@ talizvi = Tali Zvi <talizvi@post.tau.ac.il>
|
|||
teillaud = Monique Teillaud <Monique.Teillaud@sophia.inria.fr>
|
||||
tgeorgiou = Teo Georgiou <georgiou.teo@gmail.com>
|
||||
trung = Trung Nguyen <ttnguyen@sophia.inria.fr>
|
||||
vfisikop = Vissarion Fisikopoulos <vfisikop@di.uoa.gr>
|
||||
vgagrani = Vinayak Gagrani <gagrani.vinayak@gmail.com>
|
||||
vlopez = Victor Lopez <valv29@gmail.com>
|
||||
wein = Ron Wein <wein@post.tau.ac.il>
|
||||
wenzlaff = Patrick Wenzlaff <wenzlaff@mpi-inf.mpg.de>
|
||||
ybrise = Yves Brise <ybrise@inf.ethz.ch>
|
||||
yuchen = Yuanmi Chen <chenymi@gmail.com>
|
||||
yvinec = Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
|
||||
yzju = Yin Xu <yinxu.zju@gmail.com>
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@
|
|||
0 21 * * Fri,Sat cd $HOME/CGAL/create_internal_release; $HOME/bin/create_release $HOME/CGAL/next --public --do-it
|
||||
|
||||
# "next" + candidates
|
||||
#0 21 * * Mon,Tue,Wed,Thu,Sun cd $HOME/CGAL/create_internal_release; $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it
|
||||
|
||||
#### Special day: test the Result_of branch instead of next:
|
||||
0 21 * * Mon,Tue,Wed,Thu,Sun cd $HOME/CGAL/create_internal_release; $HOME/bin/create_release $HOME/CGAL/Result_of-pmoeller $HOME/CGAL/candidate-packages --public --do-it
|
||||
0 21 * * Mon,Tue,Wed,Thu,Sun cd $HOME/CGAL/create_internal_release; $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it
|
||||
|
||||
# - on trunk
|
||||
#0 21 * * Sat cd $HOME/CGAL/create_internal_release; $HOME/bin/create_release $HOME/CGAL/trunk --public --do-it
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
user-config.jam
|
||||
Copy to tools/build/v2/
|
||||
|
||||
compile-boost
|
||||
Shell script to launch the compilation of Boost libraries with
|
||||
several configurations (different ABI).
|
||||
|
||||
|
||||
The configurations are:
|
||||
- in stage/ for all g++ compilers with default options, gcc>=4.5,
|
||||
- in stage-intel/ for the Intel compilers,
|
||||
- in stage-cxxdebug/ for the g++ compilers with the STL debug mode
|
||||
(different ABI), for gcc>=4.6.
|
||||
|
||||
In addition, there is a configuration in stage-4.1/ for the g++-4.1
|
||||
compiler (the one used on the Linux distribution RHEL 5).
|
||||
|
|
@ -8,6 +8,7 @@ if [ ! -x $BJAM ]; then
|
|||
BJAM=bjam
|
||||
fi
|
||||
|
||||
"$BJAM" --stagedir=stage-4.1 $OPTS toolset=gcc-4.1
|
||||
"$BJAM" $OPTS toolset=gcc-4.5.4
|
||||
"$BJAM" --stagedir=stage-cxxdebug $OPTS toolset=gcc-cxxdebug
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,12 @@ using gcc : : /usr/local/packages/gcc-4.5/bin/g++ ;
|
|||
|
||||
using gcc
|
||||
: cxxdebug
|
||||
: "/usr/lib64/ccache/g++" # your path to the C++0x compiler
|
||||
: "/usr/lib64/ccache/g++" # your path to the C++ compiler
|
||||
: <cxxflags>-D_GLIBCXX_DEBUG
|
||||
;
|
||||
|
||||
using gcc
|
||||
: 4.1
|
||||
: "/usr/local/bin/g++41"
|
||||
: <cxxflags>
|
||||
;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ CGAL_Boost_USE_STATIC_LIBS:BOOL=OFF
|
|||
CGAL_CORE_PACKAGE_DIR:PATH=/home/lrineau/CGAL/CGAL-I
|
||||
|
||||
//User-defined flags
|
||||
CGAL_CXX_FLAGS:STRING=--std=c++11 -fno-strict-aliasing -DCGAL_FPU_HAS_EXCESS_PRECISION -Wall
|
||||
CGAL_CXX_FLAGS:STRING=--std=c++11 -fno-strict-aliasing -Wall
|
||||
|
||||
//Value Computed by CMake
|
||||
CGAL_Core_BINARY_DIR:STATIC=/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/src/Core
|
||||
|
|
@ -54,7 +54,7 @@ CGAL_Core_BINARY_DIR:STATIC=/home/lrineau/infrastructure/reference-platforms/x86
|
|||
CGAL_Core_LIBRARY:STRING=/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL_Core.so
|
||||
|
||||
//Dependencies for the target
|
||||
CGAL_Core_LIB_DEPENDS:STATIC=general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;
|
||||
CGAL_Core_LIB_DEPENDS:STATIC=general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;
|
||||
|
||||
//Value Computed by CMake
|
||||
CGAL_Core_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-I/src/CGALCore
|
||||
|
|
@ -100,7 +100,7 @@ CGAL_ImageIO_BINARY_DIR:STATIC=/home/lrineau/infrastructure/reference-platforms/
|
|||
CGAL_ImageIO_LIBRARY:STRING=/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL_ImageIO.so
|
||||
|
||||
//Dependencies for the target
|
||||
CGAL_ImageIO_LIB_DEPENDS:STATIC=general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;general;/usr/lib64/libz.so;
|
||||
CGAL_ImageIO_LIB_DEPENDS:STATIC=general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;general;/usr/lib64/libz.so;
|
||||
|
||||
//Value Computed by CMake
|
||||
CGAL_ImageIO_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-I/src/CGALImageIO
|
||||
|
|
@ -133,7 +133,7 @@ CGAL_Qt3_BINARY_DIR:STATIC=/home/lrineau/infrastructure/reference-platforms/x86-
|
|||
CGAL_Qt3_LIBRARY:STRING=/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL_Qt3.so
|
||||
|
||||
//Dependencies for the target
|
||||
CGAL_Qt3_LIB_DEPENDS:STATIC=general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/usr/lib64/qt-3.3/lib/libqassistantclient.a;general;/usr/lib64/qt-3.3/lib/libqt-mt.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;general;dl;general;-lpthread;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;
|
||||
CGAL_Qt3_LIB_DEPENDS:STATIC=general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/usr/lib64/qt-3.3/lib/libqassistantclient.a;general;/usr/lib64/qt-3.3/lib/libqt-mt.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;general;dl;general;-lpthread;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;
|
||||
|
||||
//Value Computed by CMake
|
||||
CGAL_Qt3_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-I/src/CGALQt3
|
||||
|
|
@ -145,7 +145,7 @@ CGAL_Qt4_BINARY_DIR:STATIC=/home/lrineau/infrastructure/reference-platforms/x86-
|
|||
CGAL_Qt4_LIBRARY:STRING=/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL_Qt4.so
|
||||
|
||||
//Dependencies for the target
|
||||
CGAL_Qt4_LIB_DEPENDS:STATIC=general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/next/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;optimized;/usr/lib64/libQtOpenGL.so;debug;/usr/lib64/libQtOpenGL_debug.so;optimized;/usr/lib64/libQtGui.so;debug;/usr/lib64/libQtGui_debug.so;optimized;/usr/lib64/libQtCore.so;debug;/usr/lib64/libQtCore_debug.so;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;
|
||||
CGAL_Qt4_LIB_DEPENDS:STATIC=general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;general;/home/lrineau/infrastructure/reference-platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/home/lrineau/CGAL/boost/boost-release-branch/stage/lib/libboost_thread-mt.so;optimized;/usr/lib64/libQtOpenGL.so;debug;/usr/lib64/libQtOpenGL_debug.so;optimized;/usr/lib64/libQtGui.so;debug;/usr/lib64/libQtGui_debug.so;optimized;/usr/lib64/libQtCore.so;debug;/usr/lib64/libQtCore_debug.so;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;
|
||||
|
||||
//Value Computed by CMake
|
||||
CGAL_Qt4_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-I/src/CGALQt4
|
||||
|
|
@ -176,7 +176,7 @@ CMAKE_COLOR_MAKEFILE:BOOL=ON
|
|||
CMAKE_CXX_COMPILER:FILEPATH=/usr/local/packages/llvm-trunk/bin/clang++
|
||||
|
||||
//User-defined flags
|
||||
CMAKE_CXX_FLAGS:STRING=--std=c++11 -fno-strict-aliasing -DCGAL_FPU_HAS_EXCESS_PRECISION -Wall
|
||||
CMAKE_CXX_FLAGS:STRING=--std=c++11 -fno-strict-aliasing -Wall
|
||||
|
||||
//Flags used by the compiler during debug builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=
|
||||
|
|
@ -284,6 +284,10 @@ CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
|||
//Flags used by the linker during Release with Debug Info builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=OFF
|
||||
|
||||
|
|
@ -1178,6 +1182,12 @@ X11_Xkblib_INCLUDE_PATH:PATH=/usr/include
|
|||
//Path to a file.
|
||||
X11_Xlib_INCLUDE_PATH:PATH=/usr/include
|
||||
|
||||
//Path to a file.
|
||||
X11_Xmu_INCLUDE_PATH:PATH=/usr/include
|
||||
|
||||
//Path to a library.
|
||||
X11_Xmu_LIB:FILEPATH=X11_Xmu_LIB-NOTFOUND
|
||||
|
||||
//Path to a file.
|
||||
X11_Xpm_INCLUDE_PATH:PATH=/usr/include
|
||||
|
||||
|
|
@ -1223,6 +1233,9 @@ X11_Xv_LIB:FILEPATH=/usr/lib64/libXv.so
|
|||
//Path to a library.
|
||||
X11_Xxf86misc_LIB:FILEPATH=/usr/lib64/libXxf86misc.so
|
||||
|
||||
//Path to a library.
|
||||
X11_Xxf86vm_LIB:FILEPATH=X11_Xxf86vm_LIB-NOTFOUND
|
||||
|
||||
//Path to a file.
|
||||
X11_dpms_INCLUDE_PATH:PATH=/usr/include
|
||||
|
||||
|
|
@ -1457,7 +1470,7 @@ CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
|
|||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=7
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=8
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_RELEASE_VERSION:INTERNAL=patch 4
|
||||
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
||||
|
|
@ -1520,6 +1533,8 @@ CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
|||
CMAKE_HAVE_CONNECT:INTERNAL=1
|
||||
//Have function gethostbyname
|
||||
CMAKE_HAVE_GETHOSTBYNAME:INTERNAL=1
|
||||
//Have symbol pthread_create
|
||||
CMAKE_HAVE_LIBC_CREATE:INTERNAL=
|
||||
//Have library pthreads
|
||||
CMAKE_HAVE_PTHREADS_CREATE:INTERNAL=
|
||||
//Have library pthread
|
||||
|
|
@ -1573,6 +1588,8 @@ CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
|||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
|
|
@ -1586,7 +1603,7 @@ CMAKE_UNAME:INTERNAL=/bin/uname
|
|||
CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
CONFIG_CXX_FLAGS:INTERNAL=--std=c++11 -fno-strict-aliasing -DCGAL_FPU_HAS_EXCESS_PRECISION -Wall
|
||||
CONFIG_CXX_FLAGS:INTERNAL=--std=c++11 -fno-strict-aliasing -Wall
|
||||
//Variable hidden from user
|
||||
EXECUTABLE_OUTPUT_PATH:INTERNAL=
|
||||
//Details about finding OpenGL
|
||||
|
|
@ -1594,7 +1611,7 @@ FIND_PACKAGE_MESSAGE_DETAILS_OpenGL:INTERNAL=[/usr/lib64/libGL.so][v()]
|
|||
//Details about finding Threads
|
||||
FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
|
||||
//Details about finding X11
|
||||
FIND_PACKAGE_MESSAGE_DETAILS_X11:INTERNAL=[/usr/lib64/libX11.so][/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include]
|
||||
FIND_PACKAGE_MESSAGE_DETAILS_X11:INTERNAL=[/usr/lib64/libX11.so][/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include]
|
||||
//Details about finding ZLIB
|
||||
FIND_PACKAGE_MESSAGE_DETAILS_ZLIB:INTERNAL=[/usr/lib64/libz.so][/usr/include][v1.2.5()]
|
||||
//Result of TRY_COMPILE
|
||||
|
|
@ -2198,6 +2215,10 @@ X11_Xkbfile_LIB-ADVANCED:INTERNAL=1
|
|||
X11_Xkblib_INCLUDE_PATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xlib_INCLUDE_PATH
|
||||
X11_Xlib_INCLUDE_PATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xmu_INCLUDE_PATH
|
||||
X11_Xmu_INCLUDE_PATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xmu_LIB
|
||||
X11_Xmu_LIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xpm_INCLUDE_PATH
|
||||
X11_Xpm_INCLUDE_PATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xpm_LIB
|
||||
|
|
@ -2228,6 +2249,8 @@ X11_Xv_INCLUDE_PATH-ADVANCED:INTERNAL=1
|
|||
X11_Xv_LIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xxf86misc_LIB
|
||||
X11_Xxf86misc_LIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_Xxf86vm_LIB
|
||||
X11_Xxf86vm_LIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_dpms_INCLUDE_PATH
|
||||
X11_dpms_INCLUDE_PATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: X11_xf86misc_INCLUDE_PATH
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ REPOS="$1"
|
|||
USER="$2"
|
||||
CAPABILITIES="$3"
|
||||
|
||||
SVNLOOK=/usr/bin/svnlook
|
||||
|
||||
#if [ "$USER" = "lrineau" ]; then
|
||||
# exec >&2
|
||||
# if ! echo "$CAPABILITIES" | grep -q mergeinfo; then
|
||||
|
|
@ -62,6 +64,25 @@ CAPABILITIES="$3"
|
|||
# fi
|
||||
#fi
|
||||
|
||||
if "$SVNLOOK" cat "$REPOS" branches/next/Maintenance/git/authors-file.txt | grep -qE "^$USER =" >&2; then
|
||||
echo >/dev/null
|
||||
# Commit will be accepted
|
||||
else
|
||||
echo "---------------------------------------------------------------------------" >&2
|
||||
echo "CGAL commit rejected!" >&2
|
||||
echo "" >&2
|
||||
echo "Your username $USER cannot be found in the following file:" >&2
|
||||
echo " branches/next/Maintenance/git/authors-file.txt" >&2
|
||||
echo "For that reason your commit has been rejected." >&2
|
||||
echo "Ask another CGAL developer to fill the file for you (in the 'next' branch)." >&2
|
||||
echo "" >&2
|
||||
echo " (check added by Laurent Rineau at the Tel Aviv CGAL developers meeting," >&2
|
||||
echo " 22 May 2012)" >&2
|
||||
echo "---------------------------------------------------------------------------" >&2
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#/home/groups/cgal/hooks/check-capabilities.pl "$REPOS" "$USER" "$CAPABILITIES"
|
||||
|
||||
# All checks passed, so allow the commit.
|
||||
|
|
|
|||
|
|
@ -151798,3 +151798,11 @@ amplification and suppression of local contrast. Contains C code."
|
|||
, year = 1999
|
||||
}
|
||||
|
||||
@article{hh-esplp-08
|
||||
, author = "I. Haran and D. Halperin"
|
||||
, title = "An experimental study of point location in planar arrangements in CGAL"
|
||||
, journal = "ACM Journal of Experimental Algorithmics"
|
||||
, volume = "13"
|
||||
, year = 2008
|
||||
, pages = ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,8 @@ rectangular_3_center_2_type2(
|
|||
|
||||
// now s_b corresponds to the first moment in [s, m+1)
|
||||
// where q_t and q_r cover B
|
||||
|
||||
CGAL_optimisation_assertion_code(bool loopcheck = false;)
|
||||
CGAL_3CENTER_REPEAT_CHECK:
|
||||
// place q_t and q_r
|
||||
q_t = op.place_x_square(q_t_afap, r, op.delta()(*s_b));
|
||||
q_r = op.place_y_square(q_r_afap, r, op.delta()(*s_b));
|
||||
|
|
@ -1157,7 +1158,15 @@ rectangular_3_center_2_type2(
|
|||
(!Q_t_empty && op.compute_x_distance(q_t, Q_t) > op.delta()(*s_b)) ||
|
||||
(!Q_r_empty && op.compute_y_distance(q_r, Q_r) > op.delta()(*s_b))) {
|
||||
// no covering
|
||||
CGAL_optimisation_assertion(b1 - s >= cutoff);
|
||||
if (b1 - s < cutoff) {
|
||||
// in degenerate situations it can happen that the number of
|
||||
// points in R is too small => decrease radius and check again
|
||||
--s_b;
|
||||
CGAL_optimisation_assertion(!loopcheck);
|
||||
CGAL_optimisation_assertion(s != s_b);
|
||||
CGAL_optimisation_assertion_code(loopcheck = true;)
|
||||
goto CGAL_3CENTER_REPEAT_CHECK;
|
||||
}
|
||||
s = b1;
|
||||
rho_min = op.delta()(*s_b);
|
||||
q_t_at_rho_min = q_t, q_r_at_rho_min = q_r;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public:
|
|||
const Face_handle& fh = eit->first;
|
||||
const int& i = eit->second;
|
||||
|
||||
if(fh->is_constrained(i) && !is_locally_conform(this->tr, fh, i, p))
|
||||
if(fh->is_constrained(i) && !this->is_locally_conform(this->tr, fh, i, p))
|
||||
{
|
||||
return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <CGAL/Delaunay_mesh_face_base_2.h>
|
||||
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
|
||||
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
|
||||
#include <CGAL/Delaunay_mesher_no_edge_refinement_2.h>
|
||||
|
||||
#include <CGAL/IO/File_poly.h>
|
||||
|
||||
|
|
@ -190,6 +191,15 @@ struct Tester2 {
|
|||
|
||||
assert( number_of_vertices4 == number_of_vertices2 );
|
||||
assert( number_of_vertices4 == step + inititial_number_of_vertices );
|
||||
|
||||
std::cerr << "Test the undocumented function:"
|
||||
<< " refine_Delaunay_mesh_2_without_edge_refinement\n"
|
||||
<< "with size 0.1...";
|
||||
cdt = cdt2;
|
||||
CGAL::refine_Delaunay_mesh_2_without_edge_refinement(cdt, Criteria(0.125, 0.1));
|
||||
std::cerr << " done.\nNumber of vertices: " << cdt.number_of_vertices()
|
||||
<< "\n";
|
||||
assert(cdt.number_of_vertices() == 36);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -350,11 +350,11 @@ A 3D mesh generation process is launched through a call
|
|||
class MeshCriteria>
|
||||
C3T3 make_mesh_3(MeshDomain_3 domain,
|
||||
MeshCriteria criteria,
|
||||
Features features = parameters::features(domain),
|
||||
Lloyd lloyd = parameters::no_lloyd(),
|
||||
Odt odt = parameters::no_odt(),
|
||||
Perturb perturb = parameters::perturb(),
|
||||
Exude exude = parameters::exude()); }{}
|
||||
parameters::internal::Features_options features = parameters::features(domain),
|
||||
parameters::internal::Lloyd_options lloyd = parameters::no_lloyd(),
|
||||
parameters::internal::Odt_options odt = parameters::no_odt(),
|
||||
parameters::internal::Perturb_options perturb = parameters::perturb(),
|
||||
parameters::internal::Exude_options exude = parameters::exude()); }{}
|
||||
|
||||
|
||||
\ccGlobalFunction{
|
||||
|
|
@ -364,10 +364,10 @@ A 3D mesh generation process is launched through a call
|
|||
void refine_mesh_3(C3T3& c3t3,
|
||||
MeshDomain_3 domain,
|
||||
MeshCriteria criteria,
|
||||
Lloyd lloyd = parameters::no_lloyd(),
|
||||
Odt odt = parameters::no_odt(),
|
||||
Perturb perturb = parameters::perturb(),
|
||||
Exude exude = parameters::exude()); }{}
|
||||
parameters::internal::Lloyd_options lloyd = parameters::no_lloyd(),
|
||||
parameters::internal::Odt_options odt = parameters::no_odt(),
|
||||
parameters::internal::Perturb_options perturb = parameters::perturb(),
|
||||
parameters::internal::Exude_options exude = parameters::exude()); }{}
|
||||
|
||||
|
||||
The function \ccc{make_mesh_3} generates from scratch a mesh
|
||||
|
|
|
|||
|
|
@ -58,11 +58,11 @@ traverse the resulting mesh data structure or can be written to a file
|
|||
class MeshCriteria>
|
||||
C3T3 make_mesh_3(MeshDomain_3 domain,
|
||||
MeshCriteria criteria,
|
||||
Features features = parameters::features(domain),
|
||||
Lloyd lloyd = parameters::no_lloyd(),
|
||||
Odt odt = parameters::no_odt(),
|
||||
Perturb perturb = parameters::perturb(),
|
||||
Exude exude = parameters::exude()); }{}
|
||||
parameters::internal::Features_options features = parameters::features(domain),
|
||||
parameters::internal::Lloyd_options lloyd = parameters::no_lloyd(),
|
||||
parameters::internal::Odt_options odt = parameters::no_odt(),
|
||||
parameters::internal::Perturb_options perturb = parameters::perturb(),
|
||||
parameters::internal::Exude_options exude = parameters::exude()); }{}
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ to the optimization function \ccc{exude_mesh_3} through these mesh generation fu
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Exude parameters::exude(
|
||||
\ccGlobalFunction{parameters::internal::Exude_options parameters::exude(
|
||||
double parameters::time_limit = 0,
|
||||
double parameters::sliver_bound = 0);}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ parameters to the optimization function
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Lloyd parameters::lloyd(
|
||||
\ccGlobalFunction{parameters::internal::Lloyd_options parameters::lloyd(
|
||||
double parameters::time_limit = 0,
|
||||
std::size_t parameters::max_iteration_number = 0,
|
||||
double parameters::convergence = 0.02,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ The function \ccRefName\ allows the user to tell the mesh generation functions
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Exude parameters::no_exude();}
|
||||
\ccGlobalFunction{parameters::internal::Exude_options parameters::no_exude();}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ The function \ccRefName\ allows the user to tell the mesh generation functions
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Lloyd parameters::no_lloyd();}
|
||||
\ccGlobalFunction{parameters::internal::Lloyd_options parameters::no_lloyd();}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ The function \ccRefName\ allows the user to tell the mesh generation functions
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Odt parameters::no_odt();}
|
||||
\ccGlobalFunction{parameters::internal::Odt_options parameters::no_odt();}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ The function \ccRefName\ allows the user to tell mesh generation global function
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Perturb parameters::no_perturb();}
|
||||
\ccGlobalFunction{parameters::internal::Perturb_options parameters::no_perturb();}
|
||||
|
||||
\ccParameters
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ allows the user to pass parameters to the optimization function
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Odt parameters::odt(
|
||||
\ccGlobalFunction{parameters::internal::Odt_options parameters::odt(
|
||||
double parameters::time_limit = 0,
|
||||
std::size_t parameters::max_iteration_number = 0,
|
||||
double parameters::convergence = 0.02,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ to the optimization function \ccc{perturb_mesh_3} through these mesh generation
|
|||
|
||||
\ccInclude{CGAL/refine_mesh_3.h}
|
||||
|
||||
\ccGlobalFunction{parameters::internal::Perturb parameters::perturb(
|
||||
\ccGlobalFunction{parameters::internal::Perturb_options parameters::perturb(
|
||||
double parameters::time_limit = 0,
|
||||
double parameters::sliver_bound = 0);}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ is further refined afterward.
|
|||
void refine_mesh_3(C3T3& c3t3,
|
||||
MeshDomain_3 mesh_domain,
|
||||
MeshCriteria mesh_criteria,
|
||||
Lloyd lloyd = parameters::no_lloyd(),
|
||||
Odt odt = parameters::no_odt(),
|
||||
Perturb perturb = parameters::perturb(),
|
||||
Exude exude = parameters::exude()); }{}
|
||||
parameters::internal::Lloyd_options lloyd = parameters::no_lloyd(),
|
||||
parameters::internal::Odt_options odt = parameters::no_odt(),
|
||||
parameters::internal::Perturb_options perturb = parameters::perturb(),
|
||||
parameters::internal::Exude_options exude = parameters::exude()); }{}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
geometry\footnote{It is called extended geometry for simplicity,
|
||||
though it is not a real geometry in the classical sense.}. Let \ccc{K}
|
||||
be an instance of the data type \ccc{ExtendedKernelTraits_2}. The
|
||||
central notion of extended geomtry are extended points. An extended
|
||||
central notion of extended geometry are extended points. An extended
|
||||
point represents either a standard affine point of the Cartesian plane
|
||||
or a non-standard point representing the equivalence class of rays
|
||||
where two rays are equivalent if one is contained in the other.
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class Extended_homogeneous : public
|
|||
geometry\footnote{It is called extended geometry for simplicity,
|
||||
though it is not a real geometry in the classical sense.}. Let |\Mvar|
|
||||
be an instance of the data type |\Mname|. The central notion of
|
||||
extended geomtry are extended points. An extended point represents
|
||||
extended geometry are extended points. An extended point represents
|
||||
either a standard affine point of the Cartesian plane or a
|
||||
non-standard point representing the equivalence class of rays where
|
||||
two rays are equivalent if one is contained in the other.
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ was constructed is guaranteed to be included in the constructed interval.
|
|||
that \([\ccc{left},\ccc{right}]\) is included in \ccVar .}
|
||||
|
||||
\ccConstructor{template<class L, class R>
|
||||
Gmpfi(std::pair<const L&,const R&> endpoints,
|
||||
Gmpfi(const std::pair<L,R> &endpoints,
|
||||
Precision_type p=get_default_precision());}
|
||||
{creates a \ccc{Gmpfi} initialized with endpoints
|
||||
\ccc{endpoints.first} and \ccc{endpoints.second}. \ccc{L} and
|
||||
|
|
@ -290,13 +290,14 @@ of comparisons:
|
|||
\ccHeading{Input/Output}
|
||||
|
||||
\ccFunction{std::istream& operator>>(std::istream &is,Gmpfi i);}
|
||||
{Reads \ccc{i} from \ccc{is}. \ccc{is} has the form
|
||||
{Reads \ccc{i} from \ccc{is}. \ccc{is} must have the form
|
||||
\ccc{[inf,sup]}, where \ccc{inf} and \ccc{sup} have valid
|
||||
\ccc{Gmpfr} formats.}
|
||||
\ccc{Gmpfr} input formats.}
|
||||
% TODO: add the possibility of reading a number in non-interval form
|
||||
|
||||
\ccFunction{std::ostream& operator<<(std::ostream &os,const Gmpfi &i);}
|
||||
{Writes \ccc{i} to \ccc{os}, in the form \ccc{[i.inf(),i.sup()]}.}
|
||||
{Writes \ccc{i} to \ccc{os}, in the form \ccc{[i.inf(),i.sup()]}.
|
||||
The endpoints are written according to the \ccc{Gmpfr} formatting.}
|
||||
|
||||
|
||||
\ccImplementation
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ This type is \ccc{ImplicitInteroperable} with \ccc{Gmpz}, \verb-long-,
|
|||
\ccConstructor{Gmpfr(const Gmpzf &zf);}
|
||||
{Creates a \ccc{Gmpfr}, initialized with the value of \ccc{zf}.}
|
||||
|
||||
\ccConstructor{Gmpfr(std::pair<Gmpz,long> ie);}
|
||||
\ccConstructor{Gmpfr(const std::pair<Gmpz,long> &ie);}
|
||||
{Creates a \ccc{Gmpfr}, initialized with the value of
|
||||
\( ie.first \times 2^{ie.second} \) .}
|
||||
|
||||
|
|
@ -331,8 +331,8 @@ the compared numbers is \ccc{NaN}, the \ccc{erange} flag is set.
|
|||
|
||||
\ccMethod{bool is_square(const Gmpfr &y);}
|
||||
{Returns \ccc{true} iff \ccVar~is the square of a number
|
||||
representable by an object of this type, calculating it and storing
|
||||
it in \ccc{y}.}
|
||||
representable by an object of this type, computing and storing it
|
||||
in \ccc{y}.}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
@ -347,9 +347,10 @@ the compared numbers is \ccc{NaN}, the \ccc{erange} flag is set.
|
|||
\(M\) and the exponent \(E\) are integers in base 10.}
|
||||
|
||||
\ccFunction{std::ostream& operator<<(std::ostream& out, const Gmpfr& f);}
|
||||
{Writes \ccc{f} to the ostream \ccc{out}, in the form
|
||||
\(MeE\), where \(M\) is its mantissa and \(E\) is its exponent,
|
||||
both in base 10.}
|
||||
{If the ostream \ccc{out} is in pretty-print mode, writes a decimal
|
||||
approximation of \ccc{f} to \ccc{out}. Otherwise, writes \ccc{f} to
|
||||
\ccc{out} in the form \(MeE\), where \(M\) is its mantissa and
|
||||
\(E\) is its exponent, both in base 10.}
|
||||
|
||||
|
||||
\ccImplementation
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ The related class \ccc{Set_ieee_double_precision} allows to similarly protect
|
|||
a block of code from excess precision on some machines (x86 typically with
|
||||
the traditional FPU, not the more recent SSE2). Note that
|
||||
\ccc{Protect_FPU_rounding_mode}, when changing rounding modes, also sets the precision
|
||||
to the correct 46 bit precision, hence providing a similar effect to
|
||||
to the correct 64 bit precision, hence providing a similar effect to
|
||||
\ccc{Set_ieee_double_precision}. This notably affects the \ccc{Residue} class.
|
||||
|
||||
Note for Visual C++ 64-bit users: due to a compiler bug, the stack unwinding
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(Gmpz);
|
|||
CGAL_assertion(_right>=l||(_right.is_nan()&&r.is_nan()));
|
||||
}
|
||||
|
||||
Gmpfi(std::pair<const Gmpfr,const Gmpfr> bounds,
|
||||
Gmpfi(const std::pair<Gmpfr,Gmpfr> &bounds,
|
||||
Gmpfi::Precision_type p=Gmpfi::get_default_precision()){
|
||||
CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
|
||||
_left=Gmpfr(bounds.first,std::round_toward_neg_infinity,p);
|
||||
|
|
@ -254,7 +254,7 @@ CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(Gmpz);
|
|||
}
|
||||
|
||||
template<class L,class R>
|
||||
Gmpfi(std::pair<const L&,const R&> bounds,
|
||||
Gmpfi(const std::pair<L,R> &bounds,
|
||||
Gmpfi::Precision_type p=get_default_precision()){
|
||||
CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
|
||||
_left=Gmpfr(bounds.first,std::round_toward_neg_infinity,p);
|
||||
|
|
@ -850,10 +850,16 @@ std::istream& operator>>(std::istream& is,Gmpfi &f){
|
|||
c=is.get();
|
||||
if(c!=']')
|
||||
goto invalid_number;
|
||||
Gmpfr::Precision_type p=left.get_precision()>right.get_precision()?
|
||||
left.get_precision():
|
||||
right.get_precision();
|
||||
f=Gmpfi(std::make_pair(left,right),(Gmpfi::Precision_type)p);
|
||||
// Why is this done the following way? Because left and right can
|
||||
// have different precision. Doing this with a constructor would
|
||||
// force to create a Gmpfi where both endpoints have the same
|
||||
// precision, what can give a wrong reconstruction of a previously
|
||||
// outputted number. (This function will give a good reconstruction
|
||||
// iff Gmpfr gives a good reconstruction.)
|
||||
Gmpfi temp(0,(Gmpfi::Precision_type)MPFR_PREC_MIN);
|
||||
mpfr_swap(left.fr(), temp.inf().fr());
|
||||
mpfr_swap(right.fr(),temp.sup().fr());
|
||||
f=temp;
|
||||
return is;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ class Gmpfr:
|
|||
}
|
||||
}
|
||||
|
||||
Gmpfr(Gmpzf f,
|
||||
Gmpfr(const Gmpzf &f,
|
||||
std::float_round_style r,
|
||||
Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
|
||||
CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
|
||||
|
|
@ -264,7 +264,7 @@ class Gmpfr:
|
|||
mpfr_mul_2si(fr(),fr(),f.exp(),_gmp_rnd(r));
|
||||
}
|
||||
|
||||
Gmpfr(Gmpzf f,Gmpfr::Precision_type p){
|
||||
Gmpfr(const Gmpzf &f,Gmpfr::Precision_type p){
|
||||
CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
|
||||
mpfr_init2(fr(),p);
|
||||
mpfr_set_z(fr(),f.man(),mpfr_get_default_rounding_mode());
|
||||
|
|
@ -274,7 +274,7 @@ class Gmpfr:
|
|||
mpfr_get_default_rounding_mode());
|
||||
}
|
||||
|
||||
Gmpfr(Gmpzf f){
|
||||
Gmpfr(const Gmpzf &f){
|
||||
mpfr_init2(fr(),
|
||||
static_cast<Gmpfr::Precision_type>(
|
||||
mpz_sizeinbase(f.man(),2)<MPFR_PREC_MIN?
|
||||
|
|
@ -288,7 +288,7 @@ class Gmpfr:
|
|||
CGAL_assertion_msg(inexact==0,"inexact conversion from Gmpzf");
|
||||
}
|
||||
|
||||
Gmpfr(std::pair<Gmpz,long> intexp,
|
||||
Gmpfr(const std::pair<Gmpz,long> &intexp,
|
||||
std::float_round_style r=Gmpfr::get_default_rndmode(),
|
||||
Gmpfr::Precision_type p=Gmpfr::get_default_precision()){
|
||||
CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
|
||||
|
|
@ -297,7 +297,7 @@ class Gmpfr:
|
|||
mpfr_mul_2si(fr(),fr(),intexp.second,_gmp_rnd(r));
|
||||
}
|
||||
|
||||
Gmpfr(std::pair<Gmpz,long> intexp,Gmpfr::Precision_type p){
|
||||
Gmpfr(const std::pair<Gmpz,long> &intexp,Gmpfr::Precision_type p){
|
||||
CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX);
|
||||
mpfr_init2(fr(),p);
|
||||
mpfr_set_z(fr(),
|
||||
|
|
@ -1155,9 +1155,46 @@ std::ostream& operator<<(std::ostream& os,const Gmpfr &a){
|
|||
return os<<"nan";
|
||||
if(a.is_inf())
|
||||
return os<<(a<0?"-inf":"+inf");
|
||||
std::pair<Gmpz,long> ie=a.to_integer_exp();
|
||||
os<<ie.first<<'e'<<ie.second;
|
||||
return os;
|
||||
// The rest of the function was written by George Tzoumas.
|
||||
if (!is_pretty(os)) {
|
||||
std::pair<Gmpz,long> ie=a.to_integer_exp();
|
||||
os << ie.first << 'e' << ie.second;
|
||||
return os;
|
||||
} else {
|
||||
// human-readable format
|
||||
mp_exp_t expptr;
|
||||
char *str = mpfr_get_str(NULL, &expptr, 10, 0, a.fr(),
|
||||
mpfr_get_default_rounding_mode());
|
||||
if (str == NULL) return os << "@err@";
|
||||
std::string s(str);
|
||||
mpfr_free_str(str);
|
||||
int i = 0;
|
||||
int n = s.length();
|
||||
int k = 0;
|
||||
while (k < n && s[n-k-1] == '0') k++; // count trailing zeros
|
||||
if (k == n) return os << "0";
|
||||
else if (k) {
|
||||
s.erase(n-k, k); // remove trailing zeros
|
||||
n = s.length();
|
||||
}
|
||||
bool exp = false;
|
||||
if(s[0] == '-') { os << "-"; i++; n--; } // sign
|
||||
if (expptr < -5) { // .125e-99
|
||||
s.insert(i, 1, '.'); exp = true;
|
||||
} else if (expptr < 0) {
|
||||
s.insert(i, -expptr, '0'); // .00000125 -- .0125
|
||||
s.insert(i, 1, '.');
|
||||
} else if (expptr < n) { // .125 -- 12.5
|
||||
s.insert(i+expptr, 1, '.');
|
||||
} else if (expptr - n <= 5) { // 125 -- 12500000
|
||||
s.append(expptr - n, '0');
|
||||
} else { // .125e99
|
||||
s.insert(i, 1, '.'); exp = true;
|
||||
}
|
||||
os << s.substr(i);
|
||||
if (exp) os << "e" << expptr;
|
||||
return os;
|
||||
}
|
||||
}
|
||||
|
||||
// comparisons
|
||||
|
|
|
|||
|
|
@ -116,15 +116,26 @@ int test_to_integer_exp(CGAL::Gmpfr f){
|
|||
}
|
||||
}
|
||||
|
||||
// This function checks equality between an _NT x and a Gmpfr y.
|
||||
template<class _NT>
|
||||
int test_constructors(_NT x){
|
||||
int are_different(const _NT &x,const CGAL::Gmpfr &y){
|
||||
return x!=y;
|
||||
}
|
||||
|
||||
template<>
|
||||
int are_different(const std::pair<CGAL::Gmpz,long> &x,const CGAL::Gmpfr &y){
|
||||
return(mpfr_cmp_si_2exp(y.fr(),mpz_get_si(x.first.mpz()),x.second));
|
||||
}
|
||||
|
||||
template<class _NT>
|
||||
int test_constructors(const _NT &x){
|
||||
typedef CGAL::Gmpfr Gmpfr;
|
||||
typedef _NT NT;
|
||||
bool fail=false;
|
||||
Gmpfr::set_default_precision(70);
|
||||
Gmpfr f(x);
|
||||
// this conversion should be exact
|
||||
if(f!=x){
|
||||
if(are_different(x,f)){
|
||||
std::cerr<<"failed default construction! (inexact)"<<std::endl;
|
||||
fail=true;
|
||||
}
|
||||
|
|
@ -173,6 +184,9 @@ int main(){
|
|||
_TEST("constructors Gmpz",
|
||||
test_constructors<CGAL::Gmpz>((CGAL::Gmpz(1)<<1000)+CGAL::Gmpz(1));)
|
||||
_TEST("constructors Gmpzf",test_constructors<CGAL::Gmpzf>(1025);)
|
||||
typedef std::pair<CGAL::Gmpz,long> MantExp;
|
||||
_TEST("constructors pair<Gmpz,long>",
|
||||
test_constructors<MantExp>(std::make_pair(CGAL::Gmpz(4096),35));)
|
||||
|
||||
_TEST("operators Gmpfr",test_operators<NT>();)
|
||||
_TEST("operators Gmpzf",test_operators<CGAL::Gmpzf>();)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <CGAL/IO/Verbose_ostream.h>
|
||||
#include <CGAL/IO/File_scanner_OFF.h>
|
||||
#include <CGAL/IO/File_writer_OFF.h>
|
||||
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
|
||||
#include <CGAL/Projection_traits_xy_3.h>
|
||||
#include <CGAL/Triangulation_2.h>
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <cstddef>
|
||||
|
|
@ -34,7 +34,7 @@ typedef CGAL::Simple_cartesian<double> SC;
|
|||
typedef CGAL::Filtered_kernel<SC> Kernel;
|
||||
|
||||
typedef Indexed_point<Kernel> IPoint;
|
||||
typedef CGAL::Triangulation_euclidean_traits_xy_3<Kernel> Gtraits;
|
||||
typedef CGAL::Projection_traits_xy_3<Kernel> Gtraits;
|
||||
|
||||
struct Gt : public Gtraits {
|
||||
typedef IPoint Point;
|
||||
|
|
|
|||
|
|
@ -154,3 +154,13 @@ list. Specifying that one wishes to use the default is simply done by omitting
|
|||
it. This is however possible only at the end of the list. \ccc{CGAL::Default}
|
||||
provides a simple mechanism that performs something equivalent anywhere in the
|
||||
sequence.
|
||||
|
||||
\section{C++ 11 wrappers}
|
||||
|
||||
#Wrappers for the classes \ccc{array} and \ccc{tuple} which, based on
|
||||
availability, either use the version of {\em Boost} or the one
|
||||
provided by the standard library are provided in the namespace
|
||||
\ccc{CGAL::cpp11}. The namespace alias \ccc{CGAL::cpp0x} is provided
|
||||
for backward compatibility. Those are documented for completeness and
|
||||
implementers. They are not intended to be used by users of the
|
||||
library.
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
%% +=========================================================================+
|
||||
|
||||
\begin{ccRefClass}{cpp0x::array<T, int>}
|
||||
\begin{ccRefClass}{cpp11::array<T, int>}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
An object of the class \ccClassTemplateName\ represents an array of elements
|
||||
of type \ccc{T}, the number of which is specified by the second template argument.
|
||||
|
||||
There is actually no class in namespace \ccc{CGAL::cpp0x} with this name, but a using declaration which
|
||||
There is actually no class in namespace \ccc{CGAL::cpp11} with this name, but a using declaration which
|
||||
imports a class from another namespace. By order of priority: the one in namespace
|
||||
\ccc{std} is used (provided by C++0x), if not found, then the one in namespace
|
||||
\ccc{std::tr1} is used (provided by TR1), and finally, the fallback solution
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
%% +=========================================================================+
|
||||
|
||||
\begin{ccRefClass}{cpp0x::tuple<...>}
|
||||
\begin{ccRefClass}{cpp11::tuple<...>}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
An object of the class \ccClassTemplateName\ represents a heterogeneous tuple of elements
|
||||
of the types specified in parameters, which are in variadic number.
|
||||
|
||||
There is actually no class in namespace \ccc{CGAL::cpp0x} with this name, but a using declaration which
|
||||
There is actually no class in namespace \ccc{CGAL::cpp11} with this name, but a using declaration which
|
||||
imports a class from another namespace. By order of priority: the one in namespace
|
||||
\ccc{std} is used (provided by C++0x), if not found, then the one in namespace
|
||||
\ccc{std::tr1} is used (provided by TR1), and finally, the fallback solution
|
||||
|
|
@ -32,7 +32,7 @@ is taken from Boost.
|
|||
\ccHeading{Free functions and helper classes}
|
||||
|
||||
Some free functions part of the standard interface of \ccc{tuple} are also
|
||||
brought in namespace \ccc{CGAL::cpp0x} with using declarations, these are \ccc{make_tuple},
|
||||
brought in namespace \ccc{CGAL::cpp11} with using declarations, these are \ccc{make_tuple},
|
||||
\ccc{get}, \ccc{tie}. Like in C++0x, the \ccc{get} function template is
|
||||
specialized so that it can take \ccc{std::pair} as argument.
|
||||
Two standard helper classes are also provided for convenience (\ccc{tuple_size} and \ccc{tuple_element}).
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
namespace cpp0x {
|
||||
namespace cpp11 {
|
||||
#ifndef CGAL_CFG_NO_CPP0X_NEXT_PREV
|
||||
using std::next;
|
||||
using std::prev;
|
||||
|
|
@ -54,7 +54,9 @@ namespace cpp0x {
|
|||
return boost::prior(x, n);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} // namespace cpp11
|
||||
|
||||
namespace cpp0x = cpp11;
|
||||
|
||||
// copy_n is usually in the STL as well, but not in the official
|
||||
// standard. We provide our own copy_n. It is planned for C++0x.
|
||||
|
|
@ -91,13 +93,16 @@ OutputIterator copy_n( InputIterator first, Size n, OutputIterator result )
|
|||
}
|
||||
#endif // CGAL_CFG_NO_CPP0X_COPY_N
|
||||
|
||||
namespace cpp0x {
|
||||
namespace cpp11 {
|
||||
#ifndef CGAL_CFG_NO_CPP0X_COPY_N
|
||||
using std::copy_n;
|
||||
#else
|
||||
using CGAL::copy_n;
|
||||
#endif
|
||||
} // cpp0x
|
||||
} // cpp11
|
||||
|
||||
namespace cpp0x = cpp11;
|
||||
|
||||
|
||||
// Not documented
|
||||
template <class T> inline
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
namespace cpp0x {
|
||||
namespace cpp11 {
|
||||
|
||||
#ifndef CGAL_CFG_NO_CPP0X_ARRAY
|
||||
using std::array;
|
||||
|
|
@ -41,12 +41,13 @@ using std::tr1::array;
|
|||
using boost::array;
|
||||
#endif
|
||||
|
||||
} // cpp0x
|
||||
} // cpp11
|
||||
|
||||
namespace cpp0x = cpp11;
|
||||
|
||||
// This using is just for short-term backward-compat, people should take the
|
||||
// habit to use CGAL::cpp0x::array.
|
||||
using cpp0x::array;
|
||||
using cpp11::array;
|
||||
|
||||
|
||||
// The make_array() function simply constructs an std::array.
|
||||
|
|
@ -80,61 +81,61 @@ using cpp0x::array;
|
|||
|
||||
template< typename T, typename... Args >
|
||||
inline
|
||||
cpp0x::array< T, 1 + sizeof...(Args) >
|
||||
cpp11::array< T, 1 + sizeof...(Args) >
|
||||
make_array(const T & t, const Args & ... args)
|
||||
{
|
||||
cpp0x::array< T, 1 + sizeof...(Args) > a = { { t, static_cast<T>(args)... } };
|
||||
cpp11::array< T, 1 + sizeof...(Args) > a = { { t, static_cast<T>(args)... } };
|
||||
return a;
|
||||
}
|
||||
|
||||
#else // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
|
||||
|
||||
template < typename T > inline
|
||||
cpp0x::array<T, 1>
|
||||
cpp11::array<T, 1>
|
||||
make_array(const T& b1)
|
||||
{
|
||||
cpp0x::array<T, 1> a = { { b1 } };
|
||||
cpp11::array<T, 1> a = { { b1 } };
|
||||
return a;
|
||||
}
|
||||
|
||||
template < typename T > inline
|
||||
cpp0x::array<T, 2>
|
||||
cpp11::array<T, 2>
|
||||
make_array(const T& b1, const T& b2)
|
||||
{
|
||||
cpp0x::array<T, 2> a = { { b1, b2 } };
|
||||
cpp11::array<T, 2> a = { { b1, b2 } };
|
||||
return a;
|
||||
}
|
||||
|
||||
template < typename T > inline
|
||||
cpp0x::array<T, 3>
|
||||
cpp11::array<T, 3>
|
||||
make_array(const T& b1, const T& b2, const T& b3)
|
||||
{
|
||||
cpp0x::array<T, 3> a = { { b1, b2, b3 } };
|
||||
cpp11::array<T, 3> a = { { b1, b2, b3 } };
|
||||
return a;
|
||||
}
|
||||
|
||||
template < typename T > inline
|
||||
cpp0x::array<T, 4>
|
||||
cpp11::array<T, 4>
|
||||
make_array(const T& b1, const T& b2, const T& b3, const T& b4)
|
||||
{
|
||||
cpp0x::array<T, 4> a = { { b1, b2, b3, b4 } };
|
||||
cpp11::array<T, 4> a = { { b1, b2, b3, b4 } };
|
||||
return a;
|
||||
}
|
||||
|
||||
template < typename T > inline
|
||||
cpp0x::array<T, 5>
|
||||
cpp11::array<T, 5>
|
||||
make_array(const T& b1, const T& b2, const T& b3, const T& b4, const T& b5)
|
||||
{
|
||||
cpp0x::array<T, 5> a = { { b1, b2, b3, b4, b5 } };
|
||||
cpp11::array<T, 5> a = { { b1, b2, b3, b4, b5 } };
|
||||
return a;
|
||||
}
|
||||
|
||||
template < typename T > inline
|
||||
cpp0x::array<T, 6>
|
||||
cpp11::array<T, 6>
|
||||
make_array(const T& b1, const T& b2, const T& b3, const T& b4, const T& b5,
|
||||
const T& b6)
|
||||
{
|
||||
cpp0x::array<T, 6> a = { { b1, b2, b3, b4, b5, b6 } };
|
||||
cpp11::array<T, 6> a = { { b1, b2, b3, b4, b5, b6 } };
|
||||
return a;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
namespace cpp0x {
|
||||
namespace cpp11 {
|
||||
|
||||
#ifndef CGAL_CFG_NO_CPP0X_TUPLE
|
||||
using std::tuple;
|
||||
|
|
@ -112,7 +112,9 @@ get(const std::pair<T1, T2>& pair) {
|
|||
#endif // end if not C++11 tuple
|
||||
|
||||
|
||||
} // cpp0x
|
||||
} // cpp11
|
||||
|
||||
namespace cpp0x = cpp11;
|
||||
|
||||
#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
#include <CGAL/array.h>
|
||||
#include <CGAL/tuple.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
CGAL::cpp0x::array<int, 3> arr;
|
||||
CGAL::cpp11::array<int, 3> arr2;
|
||||
|
||||
CGAL::cpp0x::tuple<double, int> tuple;
|
||||
CGAL::cpp11::tuple<double, int> tuple2;
|
||||
|
||||
CGAL::copy_n(arr.begin(), 3, arr2.begin());
|
||||
CGAL::cpp0x::copy_n(arr.begin(), 3, arr2.begin());
|
||||
CGAL::cpp11::copy_n(arr.begin(), 3, arr2.begin());
|
||||
|
||||
CGAL::cpp0x::prev(arr.end());
|
||||
CGAL::cpp11::prev(arr.end());
|
||||
CGAL::cpp0x::next(arr.begin());
|
||||
CGAL::cpp11::next(arr.begin());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
#include <CGAL/basic.h>
|
||||
|
||||
#include "volume.h"
|
||||
|
||||
#include <algorithm> // std::sort
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <fstream>
|
||||
|
|
@ -7,7 +9,6 @@
|
|||
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
||||
#include "volume.h"
|
||||
#include "viewer.h"
|
||||
#include "mainwindow.h"
|
||||
#include "values_list.h"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue