36auto from_grid(SpatialGrid
const &grid, VertexProperty
const &v, EdgeProperty
const &e, Vicinity
const &vicinity,
37 Directionality dir, Policy
const &bounding_policy)
42 using vertex_t = graph_type::vertex_descriptor;
44 graph_type
graph( grid.width() * grid.height() + bounding_policy.num_extra_vertices() ) ;
45 vicinity.connect(
graph, grid, bounding_policy);
47 if constexpr ( ! std::is_same_v<VertexProperty, no_property>) {
48 for(
auto vertex :
graph.vertices() ){
53 if constexpr ( ! std::is_same_v<EdgeProperty, no_property>) {
54 for(
auto edge :
graph.edges()){
55 if constexpr (std::constructible_from<VertexProperty, vertex_t, vertex_t, SpatialGrid>){
56 graph[edge] = EdgeProperty(edge.source(), edge.target(), grid);
58 static_assert(std::is_default_constructible_v<EdgeProperty>);
auto from_grid(SpatialGrid const &grid, VertexProperty const &v, EdgeProperty const &e, Vicinity const &vicinity, Directionality dir, Policy const &bounding_policy)
Spatial graph construction method.
Definition from_grid.hpp:36