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
Header
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.