mirror of https://github.com/CGAL/cgal
Add data for 2D example
This commit is contained in:
parent
e7686bee60
commit
aaae4ad370
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,8 +1,10 @@
|
|||
#include <CGAL/Frechet_distance.h>
|
||||
#include <CGAL/Frechet_distance_traits_2.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/IO/WKT.h>
|
||||
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
|
||||
using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
|
||||
using Traits = CGAL::Frechet_distance_traits_2<Kernel>;
|
||||
|
|
@ -11,6 +13,14 @@ using Point = Traits::Point_d;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
std::vector<Point> A, B;
|
||||
{
|
||||
std::ifstream in(CGAL::data_file_path("wkt/LetterA.wkt"));
|
||||
CGAL::IO::read_linestring_WKT(in, A);
|
||||
}
|
||||
{
|
||||
std::ifstream in(CGAL::data_file_path("wkt/LetterAbis.wkt"));
|
||||
CGAL::IO::read_linestring_WKT(in, B);
|
||||
}
|
||||
bool res = CGAL::is_Frechet_distance_larger<Traits>(A, B, 0.001);
|
||||
std::cout << std::boolalpha << res << std::endl;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue