On 19 May 2010 03:02, Tamas Nepusz
<address@hidden> wrote:
int igraph_bfs(const igraph_t *graph,
igraph_integer_t root, igraph_neimode_t mode,
igraph_vector_t *order, igraph_vector_t *rank,
igraph_vector_t *father,
igraph_vector_t *pred, igraph_vector_t *succ,
igraph_vector_t *dist, igraph_bfshandler_t *callback,
void *extra);
Tamas,
A couple of questions on DFS and BFS.
* the void *extra can be used to pass additional argument into the callback function. What if I need to pass more than one argument? In my case, I need to pass two igraph_vectors.
* From the DFS output, i see that the nodes are processed in-order. Is there any way to change this to a pre-order traversal? One way I can do this is, use the out_callback function? This would guarantee that the children are processed before the parent. (tested this to be true)
Thanks
~ashwin