Skip to content

Commit

Permalink
Adress errors/warnings in testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Jan 1, 2025
1 parent 6f86527 commit fa8bec9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using Point = Traits::Point_d;
using Curve = std::vector<Point>;
using Curves = std::vector<Curve>;

int main(int argc, char* argv[])
int main()
{

Curves curves;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class Frechet_distance_traits
Bbox<Dimension, double> bb;
for (int i=0;i<dimension; ++i)
{
bb.min(i)=to_interval(p[i]).first;
bb.max(i)=to_interval(p[i]).second;
(bb.min)(i)=to_interval(p[i]).first;
(bb.max)(i)=to_interval(p[i]).second;
}

return bb;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ bool Filter<K>::bichromaticFarthestDistance()
// This can be computed coordinate wise due to the symmetry of the boxes.
typename Curve::IFT squared_max_dist = 0;
for (int i = 0; i < K::dimension; ++i) {
auto d1 = CGAL::square(typename Curve::IFT(bbox1.max(i)) - typename Curve::IFT(bbox2.min(i)));
auto d2 = CGAL::square(typename Curve::IFT(bbox2.max(i)) - typename Curve::IFT(bbox1.min(i)));
squared_max_dist += CGAL::max(d1, d2);
auto d1 = CGAL::square(typename Curve::IFT((bbox1.max)(i)) - typename Curve::IFT((bbox2.min)(i)));
auto d2 = CGAL::square(typename Curve::IFT((bbox2.max(i))) - typename Curve::IFT((bbox1.min)(i)));
squared_max_dist += (CGAL::max)(d1, d2);
}

if (certainly(sqrt(squared_max_dist) <= distance)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <CGAL/Frechet_distance.h>
#include <CGAL/Frechet_distance_traits_2.h>
#include <CGAL/Frechet_distance_near_neighbors_ds.h>
#include <CGAL/Frechet_distance/Neighbor_search.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
Expand Down Expand Up @@ -131,7 +131,7 @@ static FrechetDistanceNearNeighborsDSQueries readFrechetDistanceNearNeighborsDSQ
std::stringstream ss(line);
ss >> query.id >> query.distance;

CGAL::Frechet_distance_::internal::CurveID result_id;
CGAL::Frechet_distance::internal::CurveID result_id;
while (ss >> result_id) {
query.expected_result.push_back(result_id);
}
Expand Down Expand Up @@ -207,7 +207,7 @@ static double testFrechetDistanceNearNeighborsDS()
readFrechetDistanceNearNeighborsDSQueries(query_directory + dataset +
".txt");

CGAL::FrechetDistanceNearNeighborsDS<TestCurve, TestTraits> ds;
CGAL::Frechet_distance::Neighbor_search<TestCurve, TestTraits> ds;
ds.insert(curves);

for (auto const& query: queries) {
Expand Down

0 comments on commit fa8bec9

Please sign in to comment.