Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add hausdorff lower bound
  • Loading branch information
amlankar committed Oct 1, 2018
commit f2bc574b2871b96dc5443c1ddcb9c16ab2549bbd
3 changes: 3 additions & 0 deletions include/hausdorff_lower_bound.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef HAUSDORFF_LOWER_BOUND_H
#define HAUSDORFF_LOWER_BOUND_H
#include <Eigen/Core>
#include <point_mesh_distance.h>
#include <random_points_on_mesh.h>

// Compute a lower bound on the _directed_ Hausdorff distance from a given mesh
// (VX,FX) to another mesh (VY,FY).
//
Expand Down
11 changes: 8 additions & 3 deletions src/hausdorff_lower_bound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ double hausdorff_lower_bound(
const Eigen::MatrixXi & FY,
const int n)
{
// Replace with your code
return 0;
}
Eigen::MatrixXd pointsX, P, N;
Eigen::VectorXd D;

random_points_on_mesh(n, VX, FX, pointsX);
point_mesh_distance(pointsX, VY, FY, D, P, N);

return D.maxCoeff();
}
2 changes: 1 addition & 1 deletion src/point_mesh_distance.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "point_mesh_distance.h"
#include <iostream>
// #include <iostream>

void point_mesh_distance(
const Eigen::MatrixXd & X,
Expand Down