mirror of https://github.com/CGAL/cgal
Add two curves to dD examples (we get an assertion)
This commit is contained in:
parent
23af1048ba
commit
ff079642b6
|
|
@ -10,9 +10,12 @@ using Kernel = CGAL::Epick_d<CGAL::Dimension_tag<4>>;
|
|||
using Traits = CGAL::Frechet_distance_traits_d<Kernel>;
|
||||
using Point = Traits::Point_d;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
int main(int , char*)
|
||||
{
|
||||
std::vector<Point> A, B;
|
||||
bool res = CGAL::is_Frechet_distance_larger<Traits>(A, B, 0.001);
|
||||
std::array<Point,4> A = { Point(0,0,0,0), Point(1,0,0,0), Point(1,1,0,1),Point(1,1,1,0)};
|
||||
std::array<Point,4> B = { Point(0,0,0,0), Point(1,0,0,1), Point(1,1,0,0),Point(1,1,1,1)};
|
||||
|
||||
std::pair<double, double> res = CGAL::approximate_Frechet_distance<Traits>(A, B, 0.000001);
|
||||
std::cout << "The Frechet distance between the polylines is between " << res.first << " and " << res.second << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,6 +175,13 @@ std::istream& operator>>(std::istream& in, Impl::Bbox<Container, Derived>& bbox)
|
|||
return in;
|
||||
}
|
||||
|
||||
template<int N, typename T>
|
||||
Bbox<Dimension_tag<N>, T> operator+(Bbox<Dimension_tag<N>, T> bbox, const Bbox<Dimension_tag<N>, T>& other)
|
||||
{
|
||||
bbox += other;
|
||||
return bbox;
|
||||
}
|
||||
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue