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

	<entry>
		<id>http://www.programmingexamples.net/w/index.php?title=CPP/Boost/BGL/GridGraphProperties&amp;diff=5140&amp;oldid=prev</id>
		<title>Daviddoria: Created page with 'Grid graphs must use &quot;exterior properties&quot;. Here is how:  ==GridGraphProperties.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;iostream&gt; #include &lt;boost/array.hpp&gt; #include &lt;boost/graph/gri…'</title>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=CPP/Boost/BGL/GridGraphProperties&amp;diff=5140&amp;oldid=prev"/>
				<updated>2012-01-23T20:03:24Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;Grid graphs must use &amp;quot;exterior properties&amp;quot;. Here is how:  ==GridGraphProperties.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;boost/array.hpp&amp;gt; #include &amp;lt;boost/graph/gri…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Grid graphs must use &amp;quot;exterior properties&amp;quot;. Here is how:&lt;br /&gt;
&lt;br /&gt;
==GridGraphProperties.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/array.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/graph/grid_graph.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char* argv[]) &lt;br /&gt;
{&lt;br /&gt;
  typedef boost::grid_graph&amp;lt;2&amp;gt; GraphType;&lt;br /&gt;
&lt;br /&gt;
  const unsigned int dimension = 5;&lt;br /&gt;
  boost::array&amp;lt;std::size_t, 2&amp;gt; lengths = { { dimension, dimension } };&lt;br /&gt;
  GraphType graph(lengths);&lt;br /&gt;
&lt;br /&gt;
  boost::graph_traits&amp;lt;GraphType&amp;gt;::vertex_descriptor v = { { 0, 1 } };&lt;br /&gt;
&lt;br /&gt;
  std::vector&amp;lt;float&amp;gt; vertexData(dimension * dimension, 3);&lt;br /&gt;
&lt;br /&gt;
  typedef boost::property_map&amp;lt;GraphType, boost::vertex_index_t&amp;gt;::const_type indexMapType;&lt;br /&gt;
&lt;br /&gt;
  indexMapType indexMap(get(boost::vertex_index, graph));&lt;br /&gt;
&lt;br /&gt;
  boost::iterator_property_map&amp;lt;std::vector&amp;lt;float&amp;gt;::iterator, indexMapType&amp;gt; myMap(vertexData.begin(), indexMap);&lt;br /&gt;
&lt;br /&gt;
  float retrieved = get(myMap, v);&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; &amp;quot;Retrieved: &amp;quot; &amp;lt;&amp;lt; retrieved &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(GridGraphProperties)&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(GridGraphProperties GridGraphProperties.cpp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>