Main Page   File List   Globals  

graph_bitmatrix.h

Go to the documentation of this file.
00001 // graph_bitmatrix.h
00002 // KMB 2005 Jul 15
00007 #include <stdio.h>
00008 #include <stdlib.h>
00009 #include <unistd.h>
00010 #include <stdlib.h>
00011 #include <stdio.h>
00012 
00013 typedef int ** _graph_t; // lowlevel graph type, internal use only
00014 
00015 struct _graph {
00016   _graph_t g;
00017   unsigned int nnodes;
00018   unsigned int *degree;        // degree of each node
00019   unsigned int *degree_dist;   // [k]=number of nodes of degree k
00020 };
00021 
00023 typedef struct _graph* graph_t;
00024 
00027 
00028 typedef unsigned int node_t;
00029 
00031 graph_t graph_new(node_t n);
00032 
00034 void graph_clear(graph_t g);
00035 
00037 void graph_set_edge(graph_t g, node_t i, node_t j);
00038 
00040 int graph_get_edge(graph_t g, node_t i, node_t j);
00041 
00043 void graph_del_edge(graph_t g, node_t i, node_t j);
00044 
00046 int graph_flip_edge(graph_t g, node_t i, node_t j);
00047 
00049 void graph_show(graph_t g, node_t n);
00050 
00052 node_t graph_get_degree(graph_t g, node_t i);
00053 
00055 node_t graph_get_nedges(graph_t g);
00056 
00058 void graph_write_dotfile(char* fn, graph_t g, unsigned int n);
00059 
00061 double graph_timing_init(FILE *f);
00062 
00064 double graph_timing_end(FILE *f);
00065 

Generated on Tue Jul 19 15:09:05 2005 for graphlib by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002