#include "vn_graph.h"

int main() {
  int j;
  graph_t g=graph_new(5);
  graph_add_edge(g,0,1);
  graph_add_edge(g,0,2);
  graph_add_edge(g,0,3);
  graph_add_edge(g,0,4);
  graph_add_edge(g,1,4);
  graph_show(g);
  printf("chi=%d\n",graph_chromatic_number(g,0));
  graph_make_dotfile_colored(g,"example_03.dot");
  graph_greedy_color(g,NULL);
  for (j=0; j<g->nnodes; j++) {
    if (visited(g,j)) {
      printf("node %d visited",j);
      printf(", color=%d",color(g,j));
      printf(", cluster=%d\n",cluster(g,j));
    }
  }
  printf("check_coloring=%d\n",graph_check_coloring(g));
  graph_clear(g);
  return 0;
}