raygozag
raygozag

Reputation: 218

boost graph adjacency_list, retrieving a node's parents

I want to find in an adjacency graph from the bgl how give a Vertexdescriptor and get the set of nodes that are parents of this given node.

i would like to do this in directed graph, it seems you could use a bidirectional graph but i want to be able to restrict it so that there are no cycles.

Upvotes: 0

Views: 543

Answers (1)

baol
baol

Reputation: 4358

The bidirectional graph is not an undirected graph: it's a directed graph that simply stores the information on inbound arcs. It seems just right the info you want.

Upvotes: 2

Related Questions