prg_vertex_adjacent_vertices_get()

Abstract

Returns a set of adjacent vertices that satisfy the specified criterion

Syntax

prg_vertex_adjacent_vertices_get (vertex_ptr, set_type)
Argument Type Description
vertex_ptr PrgT_Graph_Vertex * Vertex being queried
set_type PrgT_Graph_Element_Set_Type Criterion defining the desired set of adjacent vertices (one of the values in Table 4 Graph Package Symbolic Constants)

Return Type

PrgT_Vector *

Vector containing the vertices that meet the specified criterion

prg_graph.h

Details

All of the vertices that are connected to the specified vertex are considered. However, only vertices that meet the specified criterion are selected. The selection criterion is given by the set_type argument, and can be any of the following:

  • PrgC_Graph_Element_Set_All—selects all connected vertices.
  • PrgC_Graph_Element_Set_Outgoing—selects all vertices that are the destination of a simplex edge departing from the specified vertex, as well as those that are connected to the specified vertex by a duplex edge.
  • PrgC_Graph_Element_Set_Incoming—selects all vertices that are the source of a simplex edge arriving at the specified vertex, as well as those that are connected to the specified vertex by a duplex edge.

The vector that is returned contains the addresses of all of the selected vertices (PrgT_Graph_Vertex *). Memory management (i.e., appropriate destruction) of the vector is the responsibility of the caller. The contents of the vector should not be destroyed, as the referenced vertices still belong to the graph.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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