Wrong visitor type when using depth_first_search with start location

Good day,
I’ve been trying several things to fix my problem, yet, I just get more
errors when I do. So here’s my best shot:
I have an adjacent_list graph define as such:
typedef adjacency_list

On May 6, 2008, at 10:31 AM, Jean-Olivier Racine wrote:
I have an adjacent_list graph define as such: typedef adjacency_list
, Relationships> Graph;
I just spent a while learning this the hard way too. See the FAQ: http://www.boost.org/doc/libs/1_35_0/libs/graph/doc/faq.html Specifically, look at item number 5. I am using bundled properties, and had to add an "index" variable to the vertex property to use it with a listS or setS vertex map. There was an old post on the list that I found somewhat helpful: http://thread.gmane.org/gmane.comp.lib.boost.user/27916/focus=27967 James

Hello James,
Thanks for your quick answer. I struggled for several hours to find the
answer you gave me within minutes and would have loved to get the answer
this quickly, but I already fixed that problem. ):
If you notice the error is regarding the visitor, not the ColorMap. It is
looking for the initialize_vertex and start_vertex method within the
visitor. Yet, I use the same visitor for a depth_first_search without the
3rd and 4th parameters and I don’t get an error…
I get the error even if I declare those methods within my BFSTreeVisitor, (I
suppose because of the visitor() cast).
So here’s my question: do I need to use another visitor cast? If so, which
one and why?
Jean-Olivier Racine
HYPERLINK "mailto:joracine@humancad.com"joracine@humancad.com
HumanCAD development team
Nexgen Ergonomics Inc.
HYPERLINK "http://www.nexgenergo.com/"http://www.nexgenergo.com/
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of James Sutherland
Sent: Tuesday, May 06, 2008 12:49 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Wrong visitor type when using depth_first_search
with start location
On May 6, 2008, at 10:31 AM, Jean-Olivier Racine wrote:
I have an adjacent_list graph define as such:
typedef adjacency_list

Hello James,
Thanks for your quick answer. I struggled for several hours to find the answer you gave me within minutes and would have loved to get the answer this quickly, but I already fixed that problem. ):
If you notice the error is regarding the visitor, not the ColorMap. It is looking for the initialize_vertex and start_vertex method within the visitor. Yet, I use the same visitor for a depth_first_search without the 3rd and 4th parameters and I don’t get an error…
I get the error even if I declare those methods within my BFSTreeVisitor, (I suppose because of the visitor() cast).
So here’s my question: do I need to use another visitor cast? If so, which one and why?
Sorry - I didn't carefully read your initial message. While this may be the blind leading the blind, I suspect that the problem is not with your visitor, but with the property map you are using (or the way you are using it). That is what is giving rise to the "bgl_named_params" portion of the error message you sent. Unfortunately, I don't think that I can be of much help beyond that... I don't even see any examples provided of how to do what you are trying to do when you get the errors... James

Hi again, No problem for the misreading, happens to the best of us ;) I’m not sure it has anything to do with the property maps. Looking at the code and documentation for dfs(), it seems to be related more to the named arguments system. I am not familiar with that system and although it seems to be a very clever system, it makes the process of checking what the function is expecting less obvious. Thanks for your help and let’s hope someone has the answer ;p Jean-Olivier Racine HYPERLINK "mailto:joracine@humancad.com"joracine@humancad.com HumanCAD development team Nexgen Ergonomics Inc. HYPERLINK "http://www.nexgenergo.com/"http://www.nexgenergo.com/ From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of James Sutherland Sent: Tuesday, May 06, 2008 2:36 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Wrong visitor type when using depth_first_search with start location Hello James, Thanks for your quick answer. I struggled for several hours to find the answer you gave me within minutes and would have loved to get the answer this quickly, but I already fixed that problem. ): If you notice the error is regarding the visitor, not the ColorMap. It is looking for the initialize_vertex and start_vertex method within the visitor. Yet, I use the same visitor for a depth_first_search without the 3rd and 4th parameters and I don’t get an error… I get the error even if I declare those methods within my BFSTreeVisitor, (I suppose because of the visitor() cast). So here’s my question: do I need to use another visitor cast? If so, which one and why? Sorry - I didn't carefully read your initial message. While this may be the blind leading the blind, I suspect that the problem is not with your visitor, but with the property map you are using (or the way you are using it). That is what is giving rise to the "bgl_named_params" portion of the error message you sent. Unfortunately, I don't think that I can be of much help beyond that... I don't even see any examples provided of how to do what you are trying to do when you get the errors... James No virus found in this incoming message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.9/1417 - Release Date: 5/6/2008 8:07 AM No virus found in this outgoing message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.9/1419 - Release Date: 5/7/2008 7:46 AM
participants (2)
-
James Sutherland
-
Jean-Olivier Racine