<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=Boost%2FBGL%2FBidirectionalGraph</id>
		<title>Boost/BGL/BidirectionalGraph - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=Boost%2FBGL%2FBidirectionalGraph"/>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BidirectionalGraph&amp;action=history"/>
		<updated>2026-04-21T00:53:16Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=Boost/BGL/BidirectionalGraph&amp;diff=5039&amp;oldid=prev</id>
		<title>Daviddoria: moved CPP/Boost/BGL/BidirectionalGraph to Boost/BGL/BidirectionalGraph</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BidirectionalGraph&amp;diff=5039&amp;oldid=prev"/>
				<updated>2011-11-16T12:50:31Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/wiki/CPP/Boost/BGL/BidirectionalGraph&quot; class=&quot;mw-redirect&quot; title=&quot;CPP/Boost/BGL/BidirectionalGraph&quot;&gt;CPP/Boost/BGL/BidirectionalGraph&lt;/a&gt; to &lt;a href=&quot;/wiki/Boost/BGL/BidirectionalGraph&quot; title=&quot;Boost/BGL/BidirectionalGraph&quot;&gt;Boost/BGL/BidirectionalGraph&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:50, 16 November 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=Boost/BGL/BidirectionalGraph&amp;diff=587&amp;oldid=prev</id>
		<title>Daviddoria: Created page with '==BidirectionalGraph.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;iostream&gt; #include &lt;boost/graph/graph_traits.hpp&gt; #include &lt;boost/graph/adjacency_list.hpp&gt;  //typedef boost::adjacency_l…'</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=Boost/BGL/BidirectionalGraph&amp;diff=587&amp;oldid=prev"/>
				<updated>2011-01-27T15:42:57Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;==BidirectionalGraph.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;boost/graph/graph_traits.hpp&amp;gt; #include &amp;lt;boost/graph/adjacency_list.hpp&amp;gt;  //typedef boost::adjacency_l…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==BidirectionalGraph.cpp==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/graph/graph_traits.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/graph/adjacency_list.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//typedef boost::adjacency_list&amp;lt;boost::vecS, boost::vecS, boost::directedS&amp;gt; Graph; //can't use this, in_edges are not defined in this concept - it only stores out_edges for space efficiency&lt;br /&gt;
typedef boost::adjacency_list&amp;lt;boost::vecS, boost::vecS, boost::bidirectionalS&amp;gt; Graph;&lt;br /&gt;
&lt;br /&gt;
int main(int,char*[])&lt;br /&gt;
{&lt;br /&gt;
  // Create a graph object&lt;br /&gt;
  Graph g(3);&lt;br /&gt;
&lt;br /&gt;
  boost::add_edge(0,1,g);&lt;br /&gt;
  boost::add_edge(1,2,g);&lt;br /&gt;
&lt;br /&gt;
  // Get a list of incoming edges to vertex 1&lt;br /&gt;
  typedef boost::graph_traits &amp;lt; Graph &amp;gt;::in_edge_iterator in_edge_iterator;&lt;br /&gt;
&lt;br /&gt;
  std::pair&amp;lt;in_edge_iterator, in_edge_iterator&amp;gt; inEdges = boost::in_edges(1, g);&lt;br /&gt;
&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; &amp;quot;In edges: &amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  for(; inEdges.first != inEdges.second; ++inEdges.first)&lt;br /&gt;
    {&lt;br /&gt;
    //std::cout &amp;lt;&amp;lt; index[*inEdges.first] &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; *inEdges.first &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; &amp;quot;Out edges: &amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  // Get a list of outgoing edges from vertex 1&lt;br /&gt;
  typedef boost::graph_traits &amp;lt; Graph &amp;gt;::out_edge_iterator out_edge_iterator;&lt;br /&gt;
  std::pair&amp;lt;out_edge_iterator, out_edge_iterator&amp;gt; outEdges =&lt;br /&gt;
    boost::out_edges(1, g);&lt;br /&gt;
&lt;br /&gt;
  for(; outEdges.first != outEdges.second; ++outEdges.first)&lt;br /&gt;
    {&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; *outEdges.first &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CMakeLists.txt==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 2.6)&lt;br /&gt;
&lt;br /&gt;
Project(BidirectionalGraph)&lt;br /&gt;
&lt;br /&gt;
set(Boost_USE_MULTITHREADED ON)&lt;br /&gt;
FIND_PACKAGE(Boost 1.38 COMPONENTS required)&lt;br /&gt;
&lt;br /&gt;
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIRS})&lt;br /&gt;
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${Boost_LIBRARY_DIRS})&lt;br /&gt;
&lt;br /&gt;
ADD_EXECUTABLE(BidirectionalGraph BidirectionalGraph.cpp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>