graph.h File Reference
Interface definition of a directed graph class.
More...
#include "list.h"
Go to the source code of this file.
|
Functions |
graph * | newGraph (const char *name) |
| Creates a new graph node.
|
void | deleteGraph (graph *src) |
| Frees all memory for this node.
|
void | graphConnect (graph *src, const graph *dest) |
| Connects two graphs in one direction.
|
void | graphColorNode (graph *src, unsigned long color) |
| Sets a color value for a certain graph node.
|
unsigned long | graphGetColorNode (graph *src) |
| Returns a color value of a graph.
|
const char * | graphGetNameNode (graph *src) |
| Returns the nodes name.
|
list * | graphGetConnections (graph *src) |
| Returns a list of all the other graphs that the node is connected to.
|
Detailed Description
Interface definition of a directed graph class.
- Author:
- Dorian Weber
- See also:
- graph.c
Definition in file graph.h.
Function Documentation
void deleteGraph |
( |
graph * |
src |
) |
|
Frees all memory for this node.
- Parameters:
-
Definition at line 34 of file graph.c.
void graphColorNode |
( |
graph * |
src, |
|
|
unsigned long |
color | |
|
) |
| | |
Sets a color value for a certain graph node.
- Parameters:
-
[in] | src | graph node to color |
[in] | color | the color |
Definition at line 59 of file graph.c.
void graphConnect |
( |
graph * |
src, |
|
|
const graph * |
dest | |
|
) |
| | |
Connects two graphs in one direction.
- Parameters:
-
[in] | src | source node that marks the starting point of the edge |
[in] | dest | target node that marks the end point of the edge |
Definition at line 43 of file graph.c.
unsigned long graphGetColorNode |
( |
graph * |
src |
) |
|
Returns a color value of a graph.
- Parameters:
-
[in] | src | node to read the color from |
- Returns:
- the color
Definition at line 65 of file graph.c.
list* graphGetConnections |
( |
graph * |
src |
) |
|
Returns a list of all the other graphs that the node is connected to.
Definition at line 77 of file graph.c.
const char* graphGetNameNode |
( |
graph * |
src |
) |
|
Returns the nodes name.
Definition at line 71 of file graph.c.
graph* newGraph |
( |
const char * |
name |
) |
|
Creates a new graph node.
- Parameters:
-
[in] | name | specifies the name of this node |
- Returns:
- pointer to a graph node
Definition at line 23 of file graph.c.