◆ ytPGraph_addEdge()
void ytPGraph_addEdge |
( |
ytPGraph * |
this, |
|
|
int |
src, |
|
|
int |
dst |
|
) |
| |
Adds an edge to the graph.
This does not check whether the src - dst edge exists already in the graph.
- Parameters
-
◆ ytPGraph_checkEdge()
int ytPGraph_checkEdge |
( |
const ytPGraph * |
this, |
|
|
int |
src, |
|
|
int |
dst |
|
) |
| |
Checks if the specified edge exists in the graph.
- Parameters
-
this | pointer to the ytPGraph instance. NULL acceptable. If so, this always returns 0. |
src | index of starting node of the edge. |
dst | index of ending node of the edge. |
- Returns
- 1 if the edge exists, or 0 otherwise.
◆ ytPGraph_clear()
Removes all the edges.
- Parameters
-
◆ ytPGraph_copy()
Copies edges to this graph.
The current edges in this graph are removed, then edges in src are copied into this graph.
- Parameters
-
- See also
- ytPGraph_copyGraph()
◆ ytPGraph_copyGraph()
Copies edges to this graph.
The current edges in this graph are removed, then edges in src are copied into this graph.
- Parameters
-
- See also
- ytPGraph_copy()
◆ ytPGraph_delete()
Deletes the ytPGraph instance.
- Parameters
-
◆ ytPGraph_getParent()
int ytPGraph_getParent |
( |
const ytPGraph * |
this, |
|
|
int |
j, |
|
|
int |
k |
|
) |
| |
Returns the parent index of the node.
- Parameters
-
this | pointer to the ytPGraph instance. |
j | node index. |
k | parent index. |
- Returns
- index of the k -th parent of the j -th node.
◆ ytPGraph_numNodes()
int ytPGraph_numNodes |
( |
const ytPGraph * |
this | ) |
|
Returns the number of nodes in the graph.
- Parameters
-
◆ ytPGraph_numParents()
int ytPGraph_numParents |
( |
const ytPGraph * |
this, |
|
|
int |
j |
|
) |
| |
Returns the number of parents of the specified node.
- Parameters
-
this | pointer to the ytPGraph instance. |
j | node index. |
- Returns
- the number of parents of the j -th node.
The documentation for this struct was generated from the following files: