mirror of https://github.com/CGAL/cgal
switch to Exact_predicate...kernel
This commit is contained in:
parent
4be5142672
commit
48507b5886
|
|
@ -1,7 +1,8 @@
|
|||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/ch_graham_andrew.h>
|
||||
|
||||
typedef CGAL::Point_2<CGAL::Cartesian<double> > Point_2;
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef K::Point_2 Point_2;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/convex_hull_traits_2.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
#include <CGAL/ch_akl_toussaint.h>
|
||||
#include <CGAL/ch_graham_andrew.h>
|
||||
#include <CGAL/ch_eddy.h>
|
||||
#include <CGAL/ch_bykat.h>
|
||||
#include <CGAL/ch_jarvis.h>
|
||||
|
||||
#include <CGAL/ch_timing_2.h>
|
||||
|
||||
typedef double nu_type;
|
||||
typedef CGAL::Cartesian< nu_type > TraitsCls;
|
||||
typedef TraitsCls::Point_2 Point2;
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef K::Point_2 Point_2;
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
|
|
@ -24,12 +22,12 @@ int main( int argc, char* argv[] )
|
|||
std::cerr << "[number_of_iterations]" << std::endl;
|
||||
std::exit(1);
|
||||
}
|
||||
std::vector< Point2 > V;
|
||||
std::vector< Point2 > VE;
|
||||
std::vector< Point_2 > V;
|
||||
std::vector< Point_2 > VE;
|
||||
std::ifstream F(argv[1]);
|
||||
CGAL::set_ascii_mode( F );
|
||||
std::istream_iterator< Point2> in_start( F );
|
||||
std::istream_iterator< Point2> in_end;
|
||||
std::istream_iterator< Point_2> in_start( F );
|
||||
std::istream_iterator< Point_2> in_end;
|
||||
std::copy( in_start, in_end , std::back_inserter(V) );
|
||||
std::copy( V.begin(), V.end(), std::back_inserter(VE) );
|
||||
int iterations;
|
||||
|
|
@ -37,6 +35,6 @@ int main( int argc, char* argv[] )
|
|||
iterations = std::atoi( argv[2] );
|
||||
else
|
||||
iterations = 1;
|
||||
CGAL::ch_timing(V.begin(), V.end(), VE.begin(), iterations, TraitsCls() );
|
||||
CGAL::ch_timing(V.begin(), V.end(), VE.begin(), iterations, K() );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/ch_graham_andrew.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
typedef CGAL::Point_2<CGAL::Cartesian<double> > Point_2;
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef K::Point_2 Point_2;
|
||||
|
||||
template <class InputIterator, class OutputIterator, class Traits>
|
||||
OutputIterator
|
||||
|
|
@ -38,6 +40,6 @@ int main()
|
|||
std::istream_iterator< Point_2 > in_start( std::cin );
|
||||
std::istream_iterator< Point_2 > in_end;
|
||||
std::ostream_iterator< Point_2 > out( std::cout, "\n" );
|
||||
ch_graham_anderson(in_start, in_end, out, CGAL::Cartesian<double>());
|
||||
ch_graham_anderson(in_start, in_end, out, K());
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue