
Hi, Which is the command to visualize a path in a graph? For ie I want to visualize all the shortest path inside a graph, or all the path from a source to a dest. Thanks Daniele

On Jul 13, 2004, at 11:52 AM, Daniele Carlucci wrote:
There is no direct way to visualize a graph with the Boost Graph Library. You can get the paths by supplying a "predecessor_map" parameter to Dijkstra's algorithm and rebuilding the path from the predecessor tree. Doug

Hi there, I am having a problem with the mpl library and I wonder if someone could help me with it. Basically I am trying to get a joint_view of two mpl::vector types and I get an error message on mpl/clear.hpp saying clear_traits< Tag > ::template algorithm< Sequence > base class undefined. I tried including several of the mpl hpp files, the ones that seemed could have something to do with this problem but that didn't help. I also get a similar problem trying to use mpl::push_back. In this case I get push_back_traits< Tag > ::template algorithm< Sequence,T > Base class undefined. On the other hand mpl::push_front and mpl::insert compile beautifully. Any ideas? Thanks -delfin

"Delfin Rojas"
The error messages you are getting basically say: "This algorithm is undefined for this type of sequence." I never used joint_view, but the push_back is currently not defined for the mpl::vector. AFAIK, this is going to be corrected in the next version of Boost (which is currently being put together). Also, if you are trying to use push_back in combination with, say, fold, this can be replaced with push_front in combination with fold_backward. HTH, Arkadiy

"Arkadiy Vertleyb"
Exactly. Like all other views, joint_view is not extensible. How could you push_back onto a view, anyway? push_back is supposed to return the same "kind" of sequence as its input, but you can't add an element to a joint_view. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

Hi David,
I wasn't trying to add elements to a joint view. I am trying to make a joint
sequence of two other sequences. I first tried to obtain that from
joint_view but when that failed I tried using push_back to push each element
of the second sequence at the end of the first one. I thought about trying
mpl::copy but I am not sure if that is implemented either...
Thanks
-delfin
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of David Abrahams
Sent: Monday, July 19, 2004 7:55 PM
To: boost-users@lists.boost.org
Subject: [Boost-users] Re: Mpl problem
"Arkadiy Vertleyb"
Exactly. Like all other views, joint_view is not extensible. How could you push_back onto a view, anyway? push_back is supposed to return the same "kind" of sequence as its input, but you can't add an element to a joint_view. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

"Delfin Rojas"
mpl::joint_view
This problem:
Can only occur by trying to extend the joint_view, if it's caused when you're "trying to make a joint view". -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

Thanks for the explanation Arkadiy. I had the impression this was probably a
problem of stuff not been implemented yet. However since mpl documentation
talks about vector and push_back I thought it was there...
What I'm trying to do is make a variant that is a superset of another
variant. For that, I make an initial mpl sequence with the types of the
first variant and create it. Then I make a second list with the extra types
of the second variant. I would then like to create the second variant
passing the joint list of the first types sequence and second types
sequence. That is why I wanted to use joint_view. Then I thought I would
just push_back each of the second variant types to the first types sequence
but that failed too. Finally I am doing an insert at the end (essentially a
push_back but not quite).
Thanks again
-delfin
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Arkadiy Vertleyb
Sent: Monday, July 19, 2004 5:51 PM
To: boost-users@lists.boost.org
Subject: [Boost-users] Re: Mpl problem
"Delfin Rojas"
The error messages you are getting basically say: "This algorithm is undefined for this type of sequence." I never used joint_view, but the push_back is currently not defined for the mpl::vector. AFAIK, this is going to be corrected in the next version of Boost (which is currently being put together). Also, if you are trying to use push_back in combination with, say, fold, this can be replaced with push_front in combination with fold_backward. HTH, Arkadiy _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

"Delfin Rojas"
If you just need to concatenate two sequences, you can use fold_backward and
push_front, something like:
template
{};
HTH, Arkadiy

"Arkadiy Vertleyb"
That's a lot costlier than using joint_view, though. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (5)
-
Arkadiy Vertleyb
-
Daniele Carlucci
-
David Abrahams
-
Delfin Rojas
-
Doug Gregor