boostorg / boostorg/graph

Pass port information to BGL

Offen
#419 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
392
Forks
239
Ø Merge
1 T. 11 Min.
Gemergte PRs (30 T.)
20

Beschreibung

I read in section "Future Work" of [`boost::read_graphviz()`](https://www.boost.org/doc/libs/1_87_0/libs/graph/doc/read_graphviz.html):
> - Passing port information to BGL.
> [...]

I couldn't find any related ongoing work on Github:
- Is someone working on this already?
- Is this still something that BGL would want to implement?

I would be interested in the feature, and I would even be interested in implementing it myself if nothing's already being done. That being said, I have zero familiarity with boost's code base, so I'd be interested in getting some pointers as to how you would like to get it done.

With ports, I understand that edges now connect ports, and not nodes... Plus, ports are optional, so we'd need to have a default one. Without being familiar with the code base, I guess this change will require a not-so-small patch.

As for the use case, (IMO) it's especially useful to draw network layouts (with information like "which port of device X is connected to which port of device Y").

```dot
graph {
node [shape=record];

rankdir=LR

0 [label="switch 1|{eth1|eth2|eth3|eth4}"];
1 [label="switch 2|{eth1|eth2|eth3|eth4}"];
2 [label="switch 3|{eth1|eth2|eth3|eth4}"];

0:eth1 -- 1:eth1;
1:eth2 -- 2:eth1;
2:eth2 -- 0:eth2;
}
```

![Image](https://github.com/user-attachments/assets/ab0d488f-1bac-488a-8581-f0aadc5eba0b)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.