prg_graph_edge_insert()

Abstract

Creates and inserts an edge between two vertices in the graph

Syntax

prg_graph_edge_insert (graph_ptr, vertex_a_ptr, vertex_b_ptr, edge_type)
Argument Type Description
graph_ptr PrgT_Graph * The graph where the edge will reside
vertex_a_ptr PrgT_Graph_Vertex * Source vertex for the edge
vertex_b_ptr PrgT_Graph_Vertex * Destination vertex for the edge
edge_type PrgT_Graph_Edge_Type Type of edge to create (one of the values in Table 4 Graph Package Symbolic Constants)

Return Type

PrgT_Graph_Edge *

Returns the created edge, otherwise PRGC_NIL

prg_graph.h

Details

An edge has a type, which specifies if it is simplex (unidirectional) or duplex (bidirectional). The corresponding values for type are the constants PrgC_Graph_Edge_Simplex or PrgC_Graph_Edge_Duplex, respectively. In both cases, the first vertex, "vertex a", is considered the source of the link, and "vertex b" is considered the destination. In the case of a simplex link, this distinction is of significance, while in the case of the duplex link, the source and destinations would typically be interchangeable.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com