int main(int argc,char** argv) { int opt = DEFAULT; if (argc < 2) { printf("USAGE : \t %s fic.data\n",argv[0]); exit(-1); } FILE *fd = fopen(argv[1],"r"); if (fd == NULL) { printf("Inexistant file"); exit(-1); } if (argv[2] != NULL) { if (strcmp(argv[2],"-v") == 0) { printf("VERBOSE MODE SET\n"); opt = 1; } } // Initialize graph with the given file in argument init_graph(fd,opt); // Computer links and nodes compute_links_and_nodes(g,argv[1]); // Compute degrees compute_degrees(argv[1]); if (fclose(fd)) perror("fclose error"); return 1; }
// Iterate over all edges of input_sg // Keep a std::unordered_map<vertex_descriptor, vertex_descriptor> // between input and output sg // if source, target of edge are not are already added, add them and the edge. // This includes SpatialNode and SpatialEdge. // TODO GraphType trim_graph(const GraphType& input_sg) { auto histo = histogram_degrees(compute_degrees(input_sg)); return GraphType(0); }