12.0 图概念

表达式 返回类型或描述
Graph
boost::graph_traits<G>::vertex_descriptor 节点对象的类型
boost::graph_traits<G>::edge_descriptor 边对象的类型
boost::graph_traits<G>::directed_category 有向或无相?
boost::graph_traits<G>::edge_parallel_category 是否允许平行边?
boost::graph_traits<G>::traversal_category 访问图的顶点和边的方式
IncidenceGraph 细化自 Graph
boost::graph_traits<G>::out_edge_iterator 迭代出边
boost::graph_traits<G>::degree_size_type 表示顶点度数的整数类型
out_edges(v, g) std::pair<out_edge_iterator, out_edge_iterator>
source(e, g) vertex_descriptor
target(e, g) vertex_descriptor
out_degree(v, g) degree_size_type
BidirectionalGraph 细化自 IncidenceGraph
boost::graph_traits<G>::in_edge_iterator 迭代入边
in_edges(v, g) std::pair<in_edge_iterator, in_edge_iterator>
in_degree(v, g) degree_size_type
degree(e, g) degree_size_type
AdjacencyGraph 细化自 Graph
boost::graph_traits<G>::adjacency_iterator 迭代临接节点
adjacent_vertices(v, g) std::pair<adjacency_iterator, adjacency_iterator>
VertexListGraph 细化自 Graph
boost::graph_traits<G>::vertex_iterator 迭代图的节点集合
boost::graph_traits<G>::vertices_size_type 表示图中节点数量的无符号整型
vertices(g) std::pair<vertex_iterator, vertex_iterator>
num_vertices(g) vertices_size_type
EdgeListGraph 细化自 Graph
boost::graph_traits<G>::edge_iterator 迭代图的边集合
boost::graph_traits<G>::edges_size_type 表示图中边数量的无符号整型
edges(g) std::pair<edge_iterator, edge_iterator>
num_edges(g) edges_size_type
source(e, g) vertex_descriptor
target(e, g) vertex_descriptor
AdjacencyMatrix 细化自 Graph
edge(u, v, g) std::pair<edge_descriptor, bool>
MutableGraph 细化自 Graph
add_vertex(g) vertex_descriptor
clear_vertex(v, g) void
remove_vertex(v, g) void
add_edge(u, v, g) std::pair<edge_descriptor, bool>
remove_edge(u, v, g) void
remove_edge(e, g) void
remove_edge(e_iter, g) void
MutablePropertyGraph 细化自 Graph
add_vertex(vp, g) vertex_descriptor
add_edge(u, v, ep, g) std::pair<edge_descriptor, bool>
PropertyGraph 细化自 Graph
boost::property_map<G, Property>::type 可变属性映射表类型
boost::property_map<G, Property>::const_type 可变属性映射表类型
get(property, g) 获取属性映射表的函数
get(property, g, x) 获取顶点或边 x 的属性值
put(property, g, x, v) 将顶点或边 x 的属性值设置为 v

12.0 图概念
http://example.com/2023/11/01/boost/boost_graph_library/12_The Boost Graph Interface/12.0_图概念/
作者
QiDianMaker
发布于
2023年10月31日
更新于
2023年10月31日
许可协议