/* Library for graph structure analyze * Usage: * graph_analyze (N, connect, max_depth, isomorphism_class) */ #include #include int check_cycle (const int N, const int *pn) // function to return number of cycles { int cycle, i; /* cycle - number of cycle */ cycle = 0; for (i=1; i 2) && (cur_N <= depth)) { // copy connectivity matrix cycle = 1; for (j=0; j N) depth = N; else depth = max_depth; // convert to matrix of weight pn = (int *) malloc (N * sizeof (int)); n_cycle = (int *) malloc ((depth - 2) * sizeof (int)); for (i=0; i 0) { check_cycle_size (N, matrix, depth, n_cycle); for (i=0; i