#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <time.h>#include <sys/times.h>#include <assert.h>#include <glib.h>Go to the source code of this file.
Defines | |
| #define | NDEBUG |
Typedefs | |
| typedef gushort | node_t |
| type of a node. | |
| typedef _graph * | graph_t |
| type of a graph. | |
Functions | |
| graph_t | graph_new (node_t n) |
| make a new undirected graph with n nodes. | |
| void | graph_clear (graph_t g) |
| destroy a graph. | |
| void | graph_set_edge (graph_t g, node_t i, node_t j) |
| add edge (i,j) to the graph. | |
| gboolean | graph_get_edge (graph_t g, node_t i, node_t j) |
| return true if edge (i,j) exists in g. | |
| gboolean | graph_del_edge (graph_t g, node_t i, node_t j) |
| delete edge (i,j) in g (if it exists). | |
| void | graph_flip_edge (graph_t g, node_t i, node_t j) |
| add edge (i,j) if it exists, else delete it. | |
| void | graph_show_degrees (graph_t) |
| print a table of degrees of all nodes. | |
| void | graph_show_neighbours (graph_t, node_t) |
| list neighbours of node i. | |
| void | graph_show (graph_t g) |
| print the whole graph. | |
| node_t | graph_get_degree (graph_t g, node_t i) |
| return the degree of node i. | |
| node_t | graph_get_nedges (graph_t g) |
| return the number of edges in the graph. | |
| void | graph_show_degree_dist (graph_t g) |
| print a table showing the degree distribution in g. | |
| void | graph_write_dotfile (char *fn, graph_t g, unsigned int n) |
| write a file suitable for input to dot or neato. | |
| void | graph_write_glossfile (char *fn, graph_t g, unsigned int n) |
| write a file suitable for input to gloss (from AGLO). | |
| double | graph_timing_init (FILE *f) |
| initialize timing. | |
| double | graph_timing_end (FILE *f) |
| finalize timing. | |
| void | graph_show_glib_version (void) |
| show_ lib version. | |
|
|
A library of low-level graph functions, optimized for large, sparse graphs. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002