boostorg / boostorg/graph

creation of nested subgraphs by vertex descriptors is broken/unintuitive

Abierto
#378 17 comentarios 0 reacciones 1 asignado Reclamado por @jeremy-murphy Ver en GitHub
data structure priority: medium
Lenguaje dominante
C++
Estrellas
392
Forks
239
Merge medio
1 d 11 min
PR fusionados (30 d)
20

Descripción

When using `subgraph::create_subgraph(VertexIterator first, VertexIterator last)`, the vertex descriptors are interpreted as vertex descriptors into the root graph. (`add_vertex` expects the given descriptor to be a root graph descriptor).

My expectation is that the vertex descriptors should be interpreted as descriptors for the subgraph on which `create_subgraph` is called on. This way you can get a subgraph object, do some vertex selection logic on it and pass the set of selected vertices to `create_subgraph` without ever needing to worry where the graph is situated in the subgraph tree.

The fix is to replace line 197 `add_vertex(*first, *m_children.back());` with `add_vertex(local_to_global(*first), *m_children.back());`.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.