Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BGL - add CGAL::shortest_path(vs, vt, mesh) #8724

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

janetournois
Copy link
Member

@janetournois janetournois commented Jan 31, 2025

Summary of Changes

computes the shortest path between two vertices, using Dijkstra algorithm

Todo

  • write doc and integrate to
  • add np
  • add measure to define what "shortest" means
  • add to ref manual top page
  • use in demo code

Release Management

  • Affected package(s): BGL
  • Feature/Small Feature (if any):
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: unchanged

@janetournois janetournois added this to the 6.1-beta milestone Jan 31, 2025
@sloriot
Copy link
Member

sloriot commented Feb 6, 2025

Compilation error here

@MaelRL MaelRL added Not yet approved The feature or pull-request has not yet been approved. Small feature CHANGES.md not updated labels Feb 6, 2025
@afabri
Copy link
Member

afabri commented Feb 11, 2025

Compilation error here

What error ?


/*!
* \ingroup PkgBGLTraversal
* Computes the shortest path between two vertices in a graph `g`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to add that the vertices must be in the same connected component

for (auto path_it = path.begin(); path_it != path.end() - 1; ++path_it)
{
const std::pair<halfedge_descriptor, bool>
h = halfedge((path_it + 1)->vertex, path_it->vertex, g);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we obtain directly the halfedges when running Dijkstra, instead of having a sequence of vertices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants