stop bfs by discovery time

Asked by pablo

Hello
Is it possible to access the bfs discovery time vector whit a vertex/edge visitor?
Many thanks for this great library!
Pablo

Question information

Language:
English Edit question
Status:
Answered
For:
Matlab BGL Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
David Gleich (dgleich) said :
#1

Pablo,

That isn't possible with the standard bfs routine. If you write a
custom visitor for the breadth_first_search routine, it is, however.

David

On Fri, Nov 6, 2009 at 10:04 AM, pablo
<email address hidden> wrote:
> New question #88911 on Matlab BGL:
> https://answers.launchpad.net/matlab-bgl/+question/88911
>
> Hello
> Is it possible to access the bfs discovery time vector whit a vertex/edge visitor?
> Many thanks for this great library!
> Pablo
>
> --
> You received this question notification because you are an answer
> contact for Matlab BGL.
>

Revision history for this message
pablo (pb-physics) said :
#2

Thanks for the answer. In that case, should the custom visitor in charge of keeping track of the discovery time of each vertex or is this already available? If so, how should I find it.
PS> I have my own code for doing this but I'd love implement as much as possible using matlab_bgl :)

Revision history for this message
David Gleich (dgleich) said :
#3

pablo:

Yes, the custom visitor must also keep track of the discovery time of
each vertex. See the documentation on visitors in Matlab_bgl and/or
the example of this in the examples directory (I think it's
bfs_in_mbgl.m).

Note that this will not be a high performance solution. Visitors in
Matlab are quite expensive to call due to the expensive call-back
nature of Matlab.

David

On Sun, Nov 8, 2009 at 8:46 PM, pablo
<email address hidden> wrote:
> Question #88911 on Matlab BGL changed:
> https://answers.launchpad.net/matlab-bgl/+question/88911
>
>    Status: Answered => Open
>
> pablo is still having a problem:
> Thanks for the answer. In that case, should  the custom visitor in charge of keeping track of the discovery time of each vertex or is this already available? If so, how should I find it.
> PS> I have my own code for doing this but I'd love implement as much as possible using matlab_bgl :)
>
> --
> You received this question notification because you are an answer
> contact for Matlab BGL.
>

Can you help with this problem?

Provide an answer of your own, or ask pablo for more information if necessary.

To post a message you must log in.