Skip to content

Reconcile labeled_graph and named_graph into a single documented component #465

@Becheler

Description

@Becheler

Problem

Boost.Graph has two overlapping mechanisms for label to vertex lookup:

Both are incomplete. Users end up maintaining their own std::map<Label, vertex_descriptor> because both options are either broken or too cumbersome.

Proposal

  • keep labeled_graph external API (simpler one):
    • add_vertex(label, g)
    • g.vertex(label)
    • remove_vertex(label, g)
  • Replace labeled_graph internal _map with named_graph multi-index machinery. This would eliminate the entire set of map-sync bugs by construction.
  • Decouple named_graph from adjacency_list so it can back any graph type
  • Deprecate direct use of named_graph traits (internal_vertex_name, internal_vertex_constructor) as they become implementation details
  • Drop vecS label storage that seems fundamentally broken and blocked by static_assert in Fix: labeled_graph pointer specialization remove_vertex not removing label #464)
  • Reverse lookup (vertex to label)
  • Eliminate the owning/pointer graph duplication from labeled_graph
  • Write a documentation page + working examples

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions