igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] igraph BFS


From: Ashwin Kumar
Subject: Re: [igraph] igraph BFS
Date: Wed, 19 May 2010 16:41:36 +0530



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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]