|
Boost-Commit : |
From: gordon_at_[hidden]
Date: 2008-08-25 14:06:44
Author: gordon.woodhull
Date: 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
New Revision: 48383
URL: http://svn.boost.org/trac/boost/changeset/48383
Log:
rearrange directories; add mpl_graph depth first search
Added:
sandbox/metagraph/boost-build.jam
- copied unchanged from r47922, /trunk/boost-build.jam
sandbox/metagraph/boost/detail/parent_from_member.hpp
- copied, changed from r47015, /sandbox/metagraph/boost/intrusive/detail/parent_from_member.hpp
sandbox/metagraph/boost/metagraph/fusion_graph/
sandbox/metagraph/boost/metagraph/fusion_graph/fusion_graph.h
- copied, changed from r47015, /sandbox/metagraph/boost/metagraph/fusion_graph.h
sandbox/metagraph/boost/metagraph/mpl_graph/
sandbox/metagraph/boost/metagraph/mpl_graph/dfs.hpp (contents, props changed)
sandbox/metagraph/boost/metagraph/mpl_graph/mpl_graph.h
- copied unchanged from r47012, /sandbox/metagraph/boost/metagraph/mpl_graph.h
sandbox/metagraph/boost/metagraph/patterns/
sandbox/metagraph/libs/intrusive/
- copied from r47922, /trunk/libs/intrusive/
sandbox/metagraph/libs/metagraph/example/dfs.cpp (contents, props changed)
Removed:
sandbox/metagraph/boost/metagraph/fusion_graph.h
sandbox/metagraph/boost/metagraph/mpl_graph.h
Text files modified:
sandbox/metagraph/boost/detail/parent_from_member.hpp | 34 ++++++++++++++++++++++++++++++++--
sandbox/metagraph/boost/metagraph/fusion_graph/fusion_graph.h | 2 +-
sandbox/metagraph/libs/metagraph/example/fusion_graph.cpp | 2 +-
sandbox/metagraph/libs/metagraph/example/mpl_graph.cpp | 6 +++---
4 files changed, 37 insertions(+), 7 deletions(-)
Copied: sandbox/metagraph/boost/detail/parent_from_member.hpp (from r47015, /sandbox/metagraph/boost/intrusive/detail/parent_from_member.hpp)
==============================================================================
--- /sandbox/metagraph/boost/intrusive/detail/parent_from_member.hpp (original)
+++ sandbox/metagraph/boost/detail/parent_from_member.hpp 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
@@ -21,13 +21,15 @@
#endif
namespace boost {
-namespace intrusive {
namespace detail {
template<class Parent, class Member>
inline std::ptrdiff_t offset_from_pointer_to_member(const Member Parent::* ptr_to_member)
{
//The implementation of a pointer to member is compiler dependent.
+ // gw: it seems like this could be a metafunction except that the implementations
+ // depend on either local variables or taking the address of ptr_to_member
+ // presumably it optimizes away anyway
#if defined(BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER)
//msvc compliant compilers use their the first 32 bits as offset (even in 64 bit mode)
return *(const boost::int32_t*)(void*)&ptr_to_member;
@@ -57,8 +59,36 @@
offset_from_pointer_to_member(ptr_to_member));
}
+template<class Parent, class Member, Member Parent::* PointerToMember>
+struct pointer_to_member_metadata
+{
+ typedef Parent parent_type;
+ typedef Member member_type;
+ static const Member Parent::* value = PointerToMember;
+}
+
+struct pointer_to_member_offset_accumulator
+{
+ std::ptrdiff_t sum_;
+ template<class PointerToMemberMetadata>
+ void operator()(mpl::identity<PointerToMemberMetadata>)
+ {
+ sum_ += offset_from_pointer_to_member(PointerToMemberMetadata::value);
+ }
+}
+
+template<class PointerToMemberSequence>
+inline std::ptrdiff_t offset_from_pointers_to_members()
+{
+ // unlikely that this will optimize away as it would
+ // if offset_from_pointer_to_member were a metafunction
+ pointer_to_member_offset_accumulator sum;
+ mpl::for_each<PointerToMemberSequence>(sum);
+ return sum.sum_;
+}
+
+
} //namespace detail {
-} //namespace intrusive {
} //namespace boost {
#ifdef BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER
Deleted: sandbox/metagraph/boost/metagraph/fusion_graph.h
==============================================================================
--- sandbox/metagraph/boost/metagraph/fusion_graph.h 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
+++ (empty file)
@@ -1,106 +0,0 @@
-// fusion_graph - a heterogeneous typed graph data structure
-
-// (c) 2008 Gordon Woodhull
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSEmpl::_1_0.txt or copy at
-// http://www.boost.org/LICENSEmpl::_1_0.txt)
-
-#include "mpl_graph.h"
-
-#include <boost/fusion/include/map.hpp>
-#include <boost/fusion/include/pair.hpp>
-#include <boost/fusion/include/insert.hpp>
-#include <boost/fusion/include/as_map.hpp>
-#include <boost/fusion/include/mpl.hpp>
-#include <boost/fusion/include/at_key.hpp>
-
-#include <list>
-
-
-namespace boost {
-namespace metagraph {
-namespace fusion_graph {
-
-// input: an mpl_graph of vertex-types and edge-relations annotated with
-// instructions on the web of types-that-refer-to-each-other to generate
-
-// note a fusion_graph's nodes and edges are all different types, although
-// there may be many instances of a particular type. as a particular example,
-// one might specify a minimal graph adt as a fusion_graph of three types G, N, and E
-// G -> N <-> E "A graph contains containers of pointers to nodes, which contain
-// containers of pointers to edges, which contain pointers to nodes."
-
-// output: a type generator for the requested interlinked types - look up
-// the implementation using tags of input graph with fig::vertex_impl<vertex_tag>::type
-// or fig::edge_impl<edge_tag>::type. note edge data is all stored in source nodes
-// and accessed using fig::access_edge<edge_tag>(vertex)
-
-// this should all be abstracted better (another level is planned), but here's a start
-template<typename InputGraph>
-struct make_fusion_graph {
- struct type {
- template<typename VertexTag> struct vertex_impl;
- template<typename EdgeTag>
- struct edge_impl {
- struct type {
- typedef typename vertex_impl<typename mpl_graph::target<EdgeTag,InputGraph>::type>::type target_type;
- typedef typename EdgeTag::template link_container<target_type>::type link_type;
-
- link_type link;
- typename EdgeTag::data_type data;
- };
- };
-
- template<typename VertexTag>
- struct vertex_impl {
- struct type {
- typedef typename mpl::transform<typename mpl_graph::out_edges<VertexTag,InputGraph>::type,
- fusion::pair<mpl::_1,
- edge_impl<mpl::_1> >
- >::type tag_n_impl_sequence;
- typedef typename VertexTag::template edges_container<tag_n_impl_sequence>::type
- edges_type;
- edges_type edges;
- typename VertexTag::data_type data;
- };
- };
- };
-};
-
-// some vertex and edge data specification classes
-
-// tells fusion_graph to use a fusion::map to keep track of edges in a vertex
-template<typename Data>
-struct mapper_vertex {
- typedef Data data_type;
- template<typename EdgeTagImplVec>
- struct edges_container :
- boost::fusion::result_of::as_map<EdgeTagImplVec>
- {};
-};
-
-// tells fusion_graph to use a pointer to store zero/one link in edge
-template<typename Data>
-struct ptr_edge {
- typedef Data data_type;
- template<typename VertexImpl>
- struct link_container {
- typedef VertexImpl* type;
- };
-};
-// tells fusion_graph to use a list to store zero or more links in edge
-template<typename Data>
-struct ptr_list_edge {
- typedef Data data_type;
- template<typename VertexImpl>
- struct link_container {
- typedef std::list<VertexImpl*> type;
- };
-};
-// etc. special provision will be made for intrusive containers and their
-// magical polymorphic qualities in the next level...
-
-
-} // fusion_graph
-} // metagraoh
-} // boost
Copied: sandbox/metagraph/boost/metagraph/fusion_graph/fusion_graph.h (from r47015, /sandbox/metagraph/boost/metagraph/fusion_graph.h)
==============================================================================
--- /sandbox/metagraph/boost/metagraph/fusion_graph.h (original)
+++ sandbox/metagraph/boost/metagraph/fusion_graph/fusion_graph.h 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
@@ -5,7 +5,7 @@
// (See accompanying file LICENSEmpl::_1_0.txt or copy at
// http://www.boost.org/LICENSEmpl::_1_0.txt)
-#include "mpl_graph.h"
+#include <boost/metagraph/mpl_graph/mpl_graph.h>
#include <boost/fusion/include/map.hpp>
#include <boost/fusion/include/pair.hpp>
Deleted: sandbox/metagraph/boost/metagraph/mpl_graph.h
==============================================================================
--- sandbox/metagraph/boost/metagraph/mpl_graph.h 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
+++ (empty file)
@@ -1,205 +0,0 @@
-// mpl_graph - defines a metadata implementation of the BGL immutable graph concepts
-
-// (c) 2008 Gordon Woodhull
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSEmpl::_1_0.txt or copy at
-// http://www.boost.org/LICENSEmpl::_1_0.txt)
-
-#ifndef BOOST_MPLGRAPH_H
-#define BOOST_MPLGRAPH_H
-
-#include <boost/mpl/map.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/copy.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/next.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/back.hpp>
-#include <boost/mpl/deref.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/void.hpp>
-#include <boost/mpl/erase_key.hpp>
-#include <boost/mpl/has_key.hpp>
-#include <boost/mpl/inserter.hpp>
-#include <boost/mpl/back_inserter.hpp>
-#include <boost/mpl/set.hpp>
-#include <boost/mpl/insert.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/mpl/pair.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/fold.hpp>
-#include <boost/mpl/transform.hpp>
-#include <boost/mpl/at.hpp>
-#include <boost/mpl/push_back.hpp>
-#include <boost/mpl/filter_view.hpp>
-#include <boost/mpl/equal.hpp>
-#include <boost/type_traits.hpp>
-
-
-namespace boost {
-namespace metagraph {
-namespace mpl_graph {
-
-// idea is to lazily produce maps and other metadata structures
-// for looking up the various things U want to look up thru bgl-like interfaces
-
-// currently Edge types must be unique but it might make sense to make them
-// unique per Source and/or Target (which would require a different edge_descriptor)
-
-// also this doesn't provide for vertices with no edges
-
-// edgeseq_graph takes an mpl sequence of sequences <Edge,Source,Target> and wraps it
-// so that the rest of the code knows what it is
-// edgeseq_graph doesn't do anything but label the data as usable by the metafunctions below
-// and provide indirection for other possible input formats (?)
-template<typename EdgeSequence>
-struct edgeseq_graph {
- typedef EdgeSequence est_sequence;
-};
-
-namespace detail {
- // clarifiers
- template<typename EST> struct fetch_edge :
- mpl::front<EST> {};
- template<typename EST> struct fetch_source :
- mpl::deref<typename mpl::next<typename mpl::begin<EST>::type>::type> {};
- template<typename EST> struct fetch_target :
- mpl::back<EST> {};
-
- // S->E->T map for out_*, adjacent_vertices
- /*
- // this implementation didn't work on msvc - anyway not sure if it's more efficient
- // to build all maps at once at the expense of lots of map updates, or to use
- // the many pass, easier-to-read filter-and-build algs below.
- template<typename EdgeSeqGraph>
- struct produce_outs_map :
-
- fold<typename EdgeSeqGraph::est_sequence,
- map<>,
- if_<has_key<mpl::_1,fetch_source<mpl::_2> >,
- insert<erase_key<mpl::_1,fetch_source<mpl::_2> >,
- pair<fetch_source<mpl::_2>,
- insert<at<mpl::_1,fetch_source<mpl::_2> >,
- pair<fetch_edge<mpl::_2>, fetch_target<mpl::_2> > > > >,
- insert<mpl::_1,pair<fetch_source<mpl::_2>,
- map<pair<fetch_edge<mpl::_2>,fetch_target<mpl::_2> > > > >
- > >
- {};
- */
- // E->T map for an S for out_*, adjacent_vertices
- template<typename S, typename EdgeSeqGraph>
- struct produce_out_map :
- mpl::fold<typename mpl::filter_view<typename EdgeSeqGraph::est_sequence, boost::is_same<fetch_source<mpl::_1>,S> >::type,
- mpl::map<>,
- mpl::insert<mpl::_1,mpl::pair<fetch_edge<mpl::_2>,fetch_target<mpl::_2> > > >
- {};
- // E->S map for a T for in_*, degree
- template<typename T, typename EdgeSeqGraph>
- struct produce_in_map :
- mpl::fold<typename mpl::filter_view<typename EdgeSeqGraph::est_sequence,
- boost::is_same<fetch_target<mpl::_1>,T> >::type,
- mpl::map<>,
- mpl::insert<mpl::_1,mpl::pair<fetch_edge<mpl::_2>,fetch_source<mpl::_2> > > >
-
- {};
- // E->pair<S,T> map for source, target
- template<typename EdgeSeqGraph>
- struct produce_edge_st_map :
- mpl::fold<typename EdgeSeqGraph::est_sequence,
- mpl::map<>,
- mpl::insert<mpl::_1,mpl::pair<fetch_edge<mpl::_2>,
- mpl::pair<fetch_source<mpl::_2>,
- fetch_target<mpl::_2> > > > >
- {};
- // Vertex set for VertexListGraph
- template<typename EdgeSeqGraph>
- struct produce_vertex_set :
- mpl::fold<typename EdgeSeqGraph::est_sequence,
- typename mpl::fold<typename EdgeSeqGraph::est_sequence,
- mpl::set<>,
- mpl::insert<mpl::_1,fetch_target<mpl::_2> >
- >::type,
- mpl::insert<mpl::_1, fetch_source<mpl::_2> > >
- {};
- // Edge set for EdgeListGraph
- template<typename EdgeSeqGraph>
- struct produce_edge_set :
- mpl::fold<typename EdgeSeqGraph::est_sequence,
- mpl::set<>,
- mpl::insert<mpl::_1,fetch_edge<mpl::_2> > >
- {};
-}
-
-// Boost Graph concepts, MPL style
-
-// IncidenceGraph
-template<typename E, typename G>
-struct source :
- mpl::first<typename mpl::at<typename detail::produce_edge_st_map<G>::type,E>::type>
-{};
-template<typename E, typename G>
-struct target :
- mpl::second<typename mpl::at<typename detail::produce_edge_st_map<G>::type,E>::type>
-{};
-template<typename U, typename G>
-struct out_edges :
- mpl::fold<typename detail::produce_out_map<U,G>::type,
- mpl::vector<>,
- mpl::push_back<mpl::_1, mpl::first<mpl::_2> > >
-{};
-template<typename U, typename G>
-struct out_degree :
- mpl::size<typename out_edges<U,G>::type>
-{};
-
-// BidirectionalGraph
-template<typename V, typename G>
-struct in_edges :
- mpl::fold<typename detail::produce_in_map<V,G>::type,
- mpl::vector<>,
- mpl::push_back<mpl::_1, mpl::first<mpl::_2> > >
-{};
-template<typename V, typename G>
-struct in_degree :
- mpl::size<typename in_edges<V,G>::type>
-{};
-template<typename V, typename G>
-struct degree :
- mpl::plus<typename out_degree<V,G>::type,typename in_degree<V,G>::type>
-{};
-
-// AdjacencyGraph
-template<typename V, typename G>
-struct adjacent_vertices :
- mpl::transform<typename detail::produce_out_map<V,G>::type,
- mpl::second<mpl::_1>,
- mpl::back_inserter<mpl::vector<> > >
-{};
-
-// VertexListGraph
-template<typename G>
-struct vertices :
- detail::produce_vertex_set<G>
-{};
-template<typename G>
-struct num_vertices :
- mpl::size<typename vertices<G>::type>
-{};
-
-// EdgeListGraph
-template<typename G>
-struct edges :
- detail::produce_edge_set<G>
-{};
-template<typename G>
-struct num_edges :
- mpl::size<typename edges<G>::type>
-{};
-// source and target are defined in IncidenceGraph
-
-} // mplgraph
-} // metagraph
-} // boost
-
-#endif // BOOST_MPLGRAPH_H
Added: sandbox/metagraph/boost/metagraph/mpl_graph/dfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/metagraph/boost/metagraph/mpl_graph/dfs.hpp 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
@@ -0,0 +1,108 @@
+#include <boost/metagraph/mpl_graph/mpl_graph.h>
+
+#include <boost/mpl/has_key.hpp>
+
+namespace boost {
+namespace metagraph {
+namespace mpl_graph {
+
+struct dfs_colors {
+ struct White {};
+ struct Grey {};
+ struct Black {};
+};
+
+// as with all mpl algorithms, state must be carried along
+// because metadata is immutable. so we do something like the mpl inserter pattern,
+// only there are many operations, which we stick in a blob (? not sure how to avoid this)
+template<typename State, typename Operations>
+struct state_and_operations {
+ typedef State state;
+ typedef Operations operations;
+};
+
+// dfs takes a visitor which has all the bgl-like metafunctions encapsulated in an
+// "operations" member class, and also a state. the operations are expected to return a new state
+// in addition, the visitor operations are expected to update the colors of vertices
+// and need to support a new metafunction get_color<Node, State>
+
+struct dfs_default_visitor_operations {
+ template<typename Node, typename Graph, typename State>
+ struct initialize_vertex {
+ typedef State type;
+ };
+
+ template<typename Node, typename Graph, typename State>
+ struct discover_vertex {
+ typedef State type;
+ };
+
+ template<typename Node, typename Graph, typename State>
+ struct finish_vertex {
+ typedef State type;
+ };
+
+ template<typename Edge, typename Graph, typename State>
+ struct tree_edge {
+ typedef State type;
+ };
+ template<typename Edge, typename Graph, typename State>
+ struct back_edge {
+ typedef State type;
+ };
+ template<typename Edge, typename Graph, typename State>
+ struct forward_or_cross_edge {
+ typedef State type;
+ };
+};
+
+struct dfs_color_map_operations {
+ template<typename Node, typename Color, typename State>
+ struct set_color :
+ mpl::insert<State, mpl::pair<Node, Color> >
+ {};
+ template<typename Node, typename State>
+ struct get_color :
+ mpl::if_<mpl::has_key<State, Node>,
+ mpl::at<State, Node>,
+ dfs_colors::White>
+ {};
+};
+
+// visitor is operations, state as described above
+// however this returns pair< visitor_state, color_state >
+template<typename Graph, typename Node, typename Visitor,
+ typename ColorMap = state_and_operations<mpl::map<>, dfs_color_map_operations> >
+struct dfs_visit {
+ // enter vertex
+ typedef typename Visitor::operations::template discover_vertex<Node, Graph, typename Visitor::state>::type discovered_state;
+ typedef typename ColorMap::operations::template set_color<Node, dfs_colors::Grey, typename ColorMap::state>::type discovered_colors;
+ // loop over out edges
+ typedef typename mpl::template
+ fold<typename mpl_graph::out_edges<Node, Graph>::type,
+ mpl::pair<discovered_state, discovered_colors>,
+ mpl::if_<boost::is_same<typename ColorMap::operations::template get_color<mpl_graph::target<mpl::_2, Graph>, mpl::second<mpl::_1 > >,
+ dfs_colors::White>,
+ // unseen target: recurse
+ dfs_visit<Graph,
+ mpl_graph::target<mpl::_2, Graph>,
+ state_and_operations<typename Visitor::operations::template tree_edge<mpl::_2, Graph, mpl::first<mpl::_1> >,
+ typename Visitor::operations>,
+ state_and_operations<mpl::second<mpl::_1>, typename ColorMap::operations> >,
+ // seen: back or forward edge
+ mpl::pair<mpl::if_<boost::is_same<typename ColorMap::operations::template get_color<mpl_graph::target<mpl::_2, Graph>, mpl::second<mpl::_1 > >, dfs_colors::Grey>,
+ typename Visitor::operations::template back_edge<mpl::_2, Graph, mpl::first<mpl::_1> >,
+ typename Visitor::operations::template forward_or_cross_edge<mpl::_2, Graph, mpl::first<mpl::_1> > >,
+ mpl::second<mpl::_1> >
+ >
+ >::type visited_state_and_colors;
+ // leave vertex, and done!
+ typedef mpl::pair<typename Visitor::operations::template finish_vertex<Node, Graph, typename mpl::first<visited_state_and_colors>::type >::type,
+ typename ColorMap::operations::template set_color<Node, dfs_colors::Black, typename mpl::second<visited_state_and_colors>::type>::type> type;
+};
+
+} // namespace mpl_graph
+} // namespace metagraph
+} // namespace boost
+
+
Added: sandbox/metagraph/libs/metagraph/example/dfs.cpp
==============================================================================
--- (empty file)
+++ sandbox/metagraph/libs/metagraph/example/dfs.cpp 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
@@ -0,0 +1,55 @@
+#include <boost/metagraph/mpl_graph/dfs.hpp>
+#include <boost/mpl/print.hpp>
+
+#include <iostream>
+
+namespace mpl_graph = boost::metagraph::mpl_graph;
+namespace mpl = boost::mpl;
+
+/*
+ test graph:
+ A -> B -> C -\--> D
+ \ |--> E
+ \ \--> F
+ \-----/
+*/
+
+// vertices
+struct A{}; struct B{}; struct C{}; struct D{}; struct E{}; struct F{};
+
+// edges
+struct A_B{}; struct B_C{}; struct C_D{}; struct C_E{}; struct C_F{}; struct B_F{};
+
+typedef mpl::vector<mpl::vector<A_B,A,B>,
+ mpl::vector<B_C,B,C>,
+ mpl::vector<C_D,C,D>,
+ mpl::vector<C_E,C,E>,
+ mpl::vector<C_F,C,F>,
+ mpl::vector<B_F,B,F> >
+ some_edge_sequence;
+typedef mpl_graph::edgeseq_graph<some_edge_sequence> some_graph;
+
+struct preordering : mpl_graph::dfs_default_visitor_operations {
+ template<typename Node, typename Graph, typename State>
+ struct discover_vertex :
+ mpl::push_back<State, Node>
+ {};
+};
+
+struct postordering : mpl_graph::dfs_default_visitor_operations {
+ template<typename Node, typename Graph, typename State>
+ struct finish_vertex :
+ mpl::push_back<State, Node>
+ {};
+};
+
+template<typename T> struct incomplete;
+
+int main() {
+ typedef mpl::first<mpl_graph::dfs_visit<some_graph,A,mpl_graph::state_and_operations<mpl::vector<>, preordering > >::type>::type preorder;
+ BOOST_MPL_ASSERT(( mpl::equal<preorder::type, mpl::vector<A,B,C,D,E,F> > ));
+
+ typedef mpl::first<mpl_graph::dfs_visit<some_graph,A,mpl_graph::state_and_operations<mpl::vector<>, postordering > >::type>::type postorder;
+ BOOST_MPL_ASSERT(( mpl::equal<postorder::type, mpl::vector<D,E,F,C,B,A> > ));
+ return 0;
+}
\ No newline at end of file
Modified: sandbox/metagraph/libs/metagraph/example/fusion_graph.cpp
==============================================================================
--- sandbox/metagraph/libs/metagraph/example/fusion_graph.cpp (original)
+++ sandbox/metagraph/libs/metagraph/example/fusion_graph.cpp 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
@@ -1,4 +1,4 @@
-#include <boost/metagraph/fusion_graph.h>
+#include <boost/metagraph/fusion_graph/fusion_graph.h>
#include <boost/mpl/print.hpp>
namespace fusion_graph = boost::metagraph::fusion_graph;
Modified: sandbox/metagraph/libs/metagraph/example/mpl_graph.cpp
==============================================================================
--- sandbox/metagraph/libs/metagraph/example/mpl_graph.cpp (original)
+++ sandbox/metagraph/libs/metagraph/example/mpl_graph.cpp 2008-08-25 14:06:42 EDT (Mon, 25 Aug 2008)
@@ -1,13 +1,13 @@
// mplgraph.cpp : Defines the entry point for the console application.
//
-#include <boost/metagraph/mpl_graph.h>
+#include <boost/metagraph/mpl_graph/mpl_graph.h>
#include <boost/mpl/print.hpp>
namespace mpl_graph = boost::metagraph::mpl_graph;
namespace mpl = boost::mpl;
-/* can't at the moment think of a cute graph example so the following abstract
- and poorly drawn
+/*
+ test graph:
A -> B -> C -\--> D
\ |--> E
\ \--> F
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk