简体   繁体   English

提升图adjacency_list,检索节点的父级

[英]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. 我想在bgl的邻接图中找到如何给出Vertexdescriptor并获取作为该给定节点的父节点的节点集。

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. 我想在有向图中执行此操作,看来您可以使用双向图,但我希望能够对其进行限制,以便没有循环。

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. 似乎恰到好处您想要的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM