creation of nested subgraphs by vertex descriptors is broken/unintuitive

Aperta
#378 17 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@jeremy-murphy ci sta già lavorando.

Dal 11/6/2024.

  • #379 di @reuther-genisys — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

data structure priority: medium

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());.

Lingua principale
C++
Stelle
402
Fork
251
Merge medio
1g 9h
PR unite (30g)
38

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di boostorg/graph

Tutte le issue di boostorg/graph

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.