14#ifdef LAGRANGE_ENABLE_LEGACY_FUNCTIONS
15 #include <lagrange/legacy/internal/dijkstra.h>
18#include <lagrange/SurfaceMesh.h>
19#include <lagrange/utils/function_ref.h>
20#include <lagrange/utils/span.h>
33template <
typename Scalar,
typename Index>
36 using Entry = std::pair<Scalar, Index>;
37 std::priority_queue<Entry, std::vector<Entry>, std::greater<Entry>> queue;
38 std::vector<bool> visited;
39 std::vector<bool> visited_edges;
40 std::vector<bool> chord_bridged;
41 std::vector<Index> edge_indices;
47template <
typename Scalar>
82template <
typename Scalar,
typename Index>
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
A lightweight non-owning reference to a callable.
Definition function_ref.h:47
@ Scalar
Mesh attribute must have exactly 1 channel.
Definition AttributeFwd.h:56
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition span.h:27
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition attribute_string_utils.h:21
void dijkstra(SurfaceMesh< Scalar, Index > &mesh, span< const Index > seed_vertices, span< const Scalar > seed_vertex_dist, const DijkstraOptions< Scalar > &dijkstra_options, const function_ref< Scalar(Index, Index)> &dist, const function_ref< void(Index, Scalar)> &process, DijkstraCache< Scalar, Index > *cache=nullptr)
Traverse the mesh based on Dijkstra's algorithm with customized distance metric and process functions...
Definition dijkstra.cpp:254
Reusable scratch buffers for Dijkstra traversal.
Definition dijkstra.h:35
Options for the Dijkstra traversal.
Definition dijkstra.h:49
Eigen::Vector3< Scalar > seed_position
Center of the Euclidean ball. Required when euclidean_radius > 0.
Definition dijkstra.h:61
Scalar euclidean_radius
Maximum Euclidean distance from seed_position.
Definition dijkstra.h:58
Scalar geodesic_radius
Maximum geodesic distance from the seed.
Definition dijkstra.h:53