Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 5105

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Parallel/vtkPBGLGraphAdapter.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Parallel/vtkPBGLGraphAdapter.h</h1><a href="a03313.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: vtkPBGLGraphAdapter.h,v $</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00015"></a>00015 <span class="comment">/* </span>
<a name="l00016"></a>00016 <span class="comment"> * Copyright (C) 2008 The Trustees of Indiana University.</span>
<a name="l00017"></a>00017 <span class="comment"> * Use, modification and distribution is subject to the Boost Software</span>
<a name="l00018"></a>00018 <span class="comment"> * License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef __vtkPBGLGraphAdapter_h</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __vtkPBGLGraphAdapter_h</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="a02995.html">vtkBoostGraphAdapter.h</a>"</span> <span class="comment">// for the sequential BGL adapters</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="comment">//BTX</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;boost/graph/distributed/mpi_process_group.hpp&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;boost/graph/properties.hpp&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;boost/graph/parallel/container_traits.hpp&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;boost/parallel/local_property_map.hpp&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;boost/serialization/base_object.hpp&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;boost/functional/hash.hpp&gt;</span>
<a name="l00039"></a>00039 <span class="comment">//ETX</span>
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="a03312.html">vtkPBGLDistributedGraphHelper.h</a>"</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="a02161.html">vtkVariantBoostSerialization.h</a>"</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="keyword">namespace </span>boost {
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 <span class="comment">// Define specializations of class template property_map for</span>
<a name="l00047"></a>00047 <span class="comment">// vtkDirectedGraph and vtkUndirectedGraph, based on the</span>
<a name="l00048"></a>00048 <span class="comment">// specialization for vtkGraph.</span>
<a name="l00049"></a><a class="code" href="a03313.html#e2d80d0a9fa02e7ba4b525fedf354252">00049</a> <span class="preprocessor">#define SUBCLASS_PROPERTY_MAP_SPECIALIZATIONS(Property)         \</span>
<a name="l00050"></a>00050 <span class="preprocessor">  template&lt;&gt;                                                    \</span>
<a name="l00051"></a>00051 <span class="preprocessor">  struct property_map&lt;vtkDirectedGraph *, Property&gt;             \</span>
<a name="l00052"></a>00052 <span class="preprocessor">    : property_map&lt;vtkGraph *, Property&gt; { };                   \</span>
<a name="l00053"></a>00053 <span class="preprocessor">                                                                \</span>
<a name="l00054"></a>00054 <span class="preprocessor">  template&lt;&gt;                                                    \</span>
<a name="l00055"></a>00055 <span class="preprocessor">  struct property_map&lt;vtkUndirectedGraph *, Property&gt;           \</span>
<a name="l00056"></a>00056 <span class="preprocessor">    : property_map&lt;vtkGraph *, Property&gt; { };                   \</span>
<a name="l00057"></a>00057 <span class="preprocessor">                                                                \</span>
<a name="l00058"></a>00058 <span class="preprocessor">  template&lt;&gt;                                                    \</span>
<a name="l00059"></a>00059 <span class="preprocessor">  struct property_map&lt;vtkDirectedGraph * const, Property&gt;       \</span>
<a name="l00060"></a>00060 <span class="preprocessor">    : property_map&lt;vtkGraph *, Property&gt; { };                   \</span>
<a name="l00061"></a>00061 <span class="preprocessor">                                                                \</span>
<a name="l00062"></a>00062 <span class="preprocessor">  template&lt;&gt;                                                    \</span>
<a name="l00063"></a>00063 <span class="preprocessor">  struct property_map&lt;vtkUndirectedGraph * const, Property&gt;     \</span>
<a name="l00064"></a>00064 <span class="preprocessor">    : property_map&lt;vtkGraph *, Property&gt; { }</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a>00066   <span class="comment">// Property map from a vertex descriptor to the owner of the vertex</span>
<a name="l00067"></a><a class="code" href="a01828.html">00067</a>   <span class="keyword">struct </span><a class="code" href="a01828.html">vtkVertexOwnerMap</a> 
<a name="l00068"></a>00068   {
<a name="l00069"></a>00069     <span class="comment">// Default-construct an empty (useless!) vertex-owner map</span>
<a name="l00070"></a><a class="code" href="a01828.html#7b6fad7f2dbcb278ec4ea9098e5e0bef">00070</a>     <a class="code" href="a01828.html#7b6fad7f2dbcb278ec4ea9098e5e0bef">vtkVertexOwnerMap</a>() : <a class="code" href="a01828.html#f791ad99be9619a202348018d0846657">helper</a>(0) { }
<a name="l00071"></a>00071     
<a name="l00072"></a>00072     <span class="comment">// Construct a vertex-owner map for a specific vtkGraph</span>
<a name="l00073"></a><a class="code" href="a01828.html#bdf3dceea44cc37a53f1cba9b0ad44f8">00073</a>     <span class="keyword">explicit</span> <a class="code" href="a01828.html#7b6fad7f2dbcb278ec4ea9098e5e0bef">vtkVertexOwnerMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph) 
<a name="l00074"></a>00074       : <a class="code" href="a01828.html#f791ad99be9619a202348018d0846657">helper</a>(graph? graph-&gt;GetDistributedGraphHelper() : 0) { }
<a name="l00075"></a>00075     
<a name="l00076"></a>00076     <span class="comment">// The distributed graph helper that will aid in mapping vertices</span>
<a name="l00077"></a>00077     <span class="comment">// to their owners.</span>
<a name="l00078"></a><a class="code" href="a01828.html#f791ad99be9619a202348018d0846657">00078</a>     <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *<a class="code" href="a01828.html#f791ad99be9619a202348018d0846657">helper</a>;
<a name="l00079"></a>00079   };
<a name="l00080"></a>00080   
<a name="l00081"></a>00081   <span class="comment">// Property map traits for the vertex-owner map</span>
<a name="l00082"></a>00082   <span class="keyword">template</span>&lt;&gt;
<a name="l00083"></a><a class="code" href="a00063.html">00083</a>   <span class="keyword">struct </span>property_traits&lt;<a class="code" href="a01828.html">vtkVertexOwnerMap</a>&gt; 
<a name="l00084"></a>00084   {
<a name="l00085"></a><a class="code" href="a00063.html#43156abac062cd19c0cfb08240ed32e6">00085</a>     <span class="keyword">typedef</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> value_type;
<a name="l00086"></a><a class="code" href="a00063.html#ef479d2ad7c39dc9e7699c1a5ff9cc58">00086</a>     <span class="keyword">typedef</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21007cdaec72795b9d958f3051ff223566a">reference</a>;
<a name="l00087"></a><a class="code" href="a00063.html#2fb4dc9e97af597fed3ec31dae4f21ac">00087</a>     <span class="keyword">typedef</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> key_type;
<a name="l00088"></a><a class="code" href="a00063.html#9296ec0bc47d8905259a9f5f386e0390">00088</a>     <span class="keyword">typedef</span> readable_property_map_tag category;
<a name="l00089"></a>00089   };
<a name="l00090"></a>00090   
<a name="l00091"></a>00091   <span class="comment">// Retrieve the owner of the given vertex (the key)</span>
<a name="l00092"></a>00092   <span class="keyword">inline</span> <a class="code" href="a00063.html#ef479d2ad7c39dc9e7699c1a5ff9cc58">property_traits&lt;vtkVertexOwnerMap&gt;::reference</a>
<a name="l00093"></a><a class="code" href="a03753.html#16ee377b3c371ed1b53b68248da294b3">00093</a>   <span class="keyword">get</span>(
<a name="l00094"></a>00094     <a class="code" href="a01828.html">vtkVertexOwnerMap</a> owner_map,
<a name="l00095"></a>00095     <a class="code" href="a00063.html#2fb4dc9e97af597fed3ec31dae4f21ac">property_traits&lt;vtkVertexOwnerMap&gt;::key_type</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>)
<a name="l00096"></a>00096   {
<a name="l00097"></a>00097     <span class="keywordflow">return</span> owner_map.helper-&gt;GetVertexOwner(<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>);
<a name="l00098"></a>00098   }
<a name="l00099"></a>00099    
<a name="l00100"></a>00100    <span class="comment">// State that the vertex owner property map of a vtkGraph is the</span>
<a name="l00101"></a>00101    <span class="comment">// vtkVertexOwnerMap</span>
<a name="l00102"></a>00102    <span class="keyword">template</span>&lt;&gt;
<a name="l00103"></a><a class="code" href="a00051.html">00103</a>    <span class="keyword">struct </span>property_map&lt;<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>*, vertex_owner_t&gt;
<a name="l00104"></a>00104    {
<a name="l00105"></a><a class="code" href="a00051.html#40110789d999f55a2da404155b19d377">00105</a>      <span class="keyword">typedef</span> <a class="code" href="a01828.html">vtkVertexOwnerMap</a> <a class="code" href="a01828.html">type</a>;
<a name="l00106"></a><a class="code" href="a00051.html#ccd43c2c2a9e4ecb64753ccd6c5f2f49">00106</a>      <span class="keyword">typedef</span> <a class="code" href="a01828.html">vtkVertexOwnerMap</a> <a class="code" href="a01828.html">const_type</a>;
<a name="l00107"></a>00107    };
<a name="l00108"></a>00108    
<a name="l00109"></a>00109   <a class="code" href="a03753.html#ec0752ae5bd7f037154a6d07c5efbc8d">SUBCLASS_PROPERTY_MAP_SPECIALIZATIONS</a>(vertex_owner_t);
<a name="l00110"></a>00110 
<a name="l00111"></a>00111     <span class="comment">// Retrieve the vertex-owner property map from a vtkGraph</span>
<a name="l00112"></a>00112    <span class="keyword">inline</span> <a class="code" href="a01828.html">vtkVertexOwnerMap</a>
<a name="l00113"></a><a class="code" href="a03753.html#a1b5f00b15902da892f5cdb89e19855b">00113</a>    <span class="keyword">get</span>(vertex_owner_t, <a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph)
<a name="l00114"></a>00114    {
<a name="l00115"></a>00115      <span class="keywordflow">return</span> <a class="code" href="a01828.html">vtkVertexOwnerMap</a>(graph);
<a name="l00116"></a>00116    }
<a name="l00117"></a>00117 
<a name="l00118"></a>00118   <span class="comment">// Property map from a vertex descriptor to the local descriptor of</span>
<a name="l00119"></a>00119   <span class="comment">// the vertex</span>
<a name="l00120"></a><a class="code" href="a01827.html">00120</a>   <span class="keyword">struct </span><a class="code" href="a01827.html">vtkVertexLocalMap</a> 
<a name="l00121"></a>00121   {
<a name="l00122"></a>00122     <span class="comment">// Default-construct an empty (useless!) vertex-local map</span>
<a name="l00123"></a><a class="code" href="a01827.html#6a824fb498817d18d7a564719a30b3b2">00123</a>     <a class="code" href="a01827.html#6a824fb498817d18d7a564719a30b3b2">vtkVertexLocalMap</a>() : <a class="code" href="a01827.html#aa26f90606692bfacd9947e7731c9932">helper</a>(0) { }
<a name="l00124"></a>00124     
<a name="l00125"></a>00125     <span class="comment">// Construct a vertex-local map for a specific vtkGraph</span>
<a name="l00126"></a><a class="code" href="a01827.html#2197197c822675c64098b833512c3d32">00126</a>     <span class="keyword">explicit</span> <a class="code" href="a01827.html#6a824fb498817d18d7a564719a30b3b2">vtkVertexLocalMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph) 
<a name="l00127"></a>00127       : <a class="code" href="a01827.html#aa26f90606692bfacd9947e7731c9932">helper</a>(graph? graph-&gt;GetDistributedGraphHelper() : 0) { }
<a name="l00128"></a>00128     
<a name="l00129"></a>00129     <span class="comment">// The distributed graph helper that will aid in mapping vertices</span>
<a name="l00130"></a>00130     <span class="comment">// to their locals.</span>
<a name="l00131"></a><a class="code" href="a01827.html#aa26f90606692bfacd9947e7731c9932">00131</a>     <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *<a class="code" href="a01827.html#aa26f90606692bfacd9947e7731c9932">helper</a>;
<a name="l00132"></a>00132   };
<a name="l00133"></a>00133   
<a name="l00134"></a>00134   <span class="comment">// Property map traits for the vertex-local map</span>
<a name="l00135"></a>00135   <span class="keyword">template</span>&lt;&gt;
<a name="l00136"></a><a class="code" href="a00062.html">00136</a>   <span class="keyword">struct </span>property_traits&lt;<a class="code" href="a01827.html">vtkVertexLocalMap</a>&gt; 
<a name="l00137"></a>00137   {
<a name="l00138"></a><a class="code" href="a00062.html#2824e750e6e286400e5ed4d7284a8792">00138</a>     <span class="keyword">typedef</span> <span class="keywordtype">int</span> value_type;
<a name="l00139"></a><a class="code" href="a00062.html#ea369b35a36b6d1aba09eedef1946262">00139</a>     <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21007cdaec72795b9d958f3051ff223566a">reference</a>;
<a name="l00140"></a><a class="code" href="a00062.html#d11298f9ec0eada59ee5e28da56128f3">00140</a>     <span class="keyword">typedef</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> key_type;
<a name="l00141"></a><a class="code" href="a00062.html#fd52ec8517b3e9a701786bf2f9934265">00141</a>     <span class="keyword">typedef</span> readable_property_map_tag category;
<a name="l00142"></a>00142   };
<a name="l00143"></a>00143   
<a name="l00144"></a>00144   <span class="comment">// Retrieve the local descriptor of the given vertex (the key)</span>
<a name="l00145"></a>00145   <span class="keyword">inline</span> <a class="code" href="a00062.html#ea369b35a36b6d1aba09eedef1946262">property_traits&lt;vtkVertexLocalMap&gt;::reference</a>
<a name="l00146"></a><a class="code" href="a03753.html#c7910eef00cd6f6d0d3c7653ddcd69fd">00146</a>   <span class="keyword">get</span>(
<a name="l00147"></a>00147     <a class="code" href="a01827.html">vtkVertexLocalMap</a> local_map,
<a name="l00148"></a>00148     <a class="code" href="a00062.html#d11298f9ec0eada59ee5e28da56128f3">property_traits&lt;vtkVertexLocalMap&gt;::key_type</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>)
<a name="l00149"></a>00149   {
<a name="l00150"></a>00150     <span class="keywordflow">return</span> local_map.helper-&gt;GetVertexIndex(<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>);
<a name="l00151"></a>00151   }
<a name="l00152"></a>00152    
<a name="l00153"></a>00153    <span class="comment">// State that the vertex local property map of a vtkGraph is the</span>
<a name="l00154"></a>00154    <span class="comment">// vtkVertexLocalMap</span>
<a name="l00155"></a>00155    <span class="keyword">template</span>&lt;&gt;
<a name="l00156"></a><a class="code" href="a00050.html">00156</a>    <span class="keyword">struct </span>property_map&lt;<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>*, vertex_local_t&gt;
<a name="l00157"></a>00157    {
<a name="l00158"></a><a class="code" href="a00050.html#f17a5a133006e5af432db60f6ff34984">00158</a>      <span class="keyword">typedef</span> <a class="code" href="a01827.html">vtkVertexLocalMap</a> <a class="code" href="a01827.html">type</a>;
<a name="l00159"></a><a class="code" href="a00050.html#c21d090a61f83b1dd38e61fae9654d5b">00159</a>      <span class="keyword">typedef</span> <a class="code" href="a01827.html">vtkVertexLocalMap</a> <a class="code" href="a01827.html">const_type</a>;
<a name="l00160"></a>00160    };
<a name="l00161"></a>00161    
<a name="l00162"></a>00162   <a class="code" href="a03753.html#ec0752ae5bd7f037154a6d07c5efbc8d">SUBCLASS_PROPERTY_MAP_SPECIALIZATIONS</a>(vertex_local_t);
<a name="l00163"></a>00163 
<a name="l00164"></a>00164     <span class="comment">// Retrieve the vertex-local property map from a vtkGraph</span>
<a name="l00165"></a>00165    <span class="keyword">inline</span> <a class="code" href="a01827.html">vtkVertexLocalMap</a>
<a name="l00166"></a><a class="code" href="a03753.html#d42b6e5fc381f9de224a0b100fa24d6f">00166</a>    <span class="keyword">get</span>(vertex_local_t, <a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph)
<a name="l00167"></a>00167    {
<a name="l00168"></a>00168      <span class="keywordflow">return</span> <a class="code" href="a01827.html">vtkVertexLocalMap</a>(graph);
<a name="l00169"></a>00169    }
<a name="l00170"></a>00170    
<a name="l00171"></a>00171    <span class="comment">// Map from vertex descriptor to (owner, local descriptor)</span>
<a name="l00172"></a><a class="code" href="a01824.html">00172</a>    <span class="keyword">struct </span><a class="code" href="a01824.html">vtkVertexGlobalMap</a> 
<a name="l00173"></a>00173    {
<a name="l00174"></a><a class="code" href="a01824.html#9461ed304bae1d8e11c3cae00b604cc5">00174</a>      <a class="code" href="a01824.html#9461ed304bae1d8e11c3cae00b604cc5">vtkVertexGlobalMap</a>() : <a class="code" href="a01824.html#eed710bcdba49b2e0cf394bae7ae4b2b">helper</a>(0) { }
<a name="l00175"></a>00175           
<a name="l00176"></a><a class="code" href="a01824.html#a91661dc1cf90699a1519560758dcec0">00176</a>      <span class="keyword">explicit</span> <a class="code" href="a01824.html#9461ed304bae1d8e11c3cae00b604cc5">vtkVertexGlobalMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph) 
<a name="l00177"></a>00177        : <a class="code" href="a01824.html#eed710bcdba49b2e0cf394bae7ae4b2b">helper</a>(graph? graph-&gt;GetDistributedGraphHelper() : 0) { }
<a name="l00178"></a>00178           
<a name="l00179"></a><a class="code" href="a01824.html#eed710bcdba49b2e0cf394bae7ae4b2b">00179</a>      <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *<a class="code" href="a01824.html#eed710bcdba49b2e0cf394bae7ae4b2b">helper</a>;
<a name="l00180"></a>00180    };
<a name="l00181"></a>00181    
<a name="l00182"></a>00182    <span class="keyword">template</span>&lt;&gt;
<a name="l00183"></a><a class="code" href="a00061.html">00183</a>    <span class="keyword">struct </span>property_traits&lt;<a class="code" href="a01824.html">vtkVertexGlobalMap</a>&gt; 
<a name="l00184"></a>00184    {
<a name="l00185"></a><a class="code" href="a00061.html#39fb191155efec7d918faf3aadbd1980">00185</a>      <span class="keyword">typedef</span> vtkstd::pair&lt;int, vtkIdType&gt; value_type;
<a name="l00186"></a><a class="code" href="a00061.html#f22b9f715f049ac689b947e364d6ffaf">00186</a>      <span class="keyword">typedef</span> value_type <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21007cdaec72795b9d958f3051ff223566a">reference</a>;
<a name="l00187"></a><a class="code" href="a00061.html#e753bda19d1e5f1e30bca73047c81ed0">00187</a>      <span class="keyword">typedef</span> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> key_type;
<a name="l00188"></a><a class="code" href="a00061.html#9115069aae34d06eee07666c51de522d">00188</a>      <span class="keyword">typedef</span> readable_property_map_tag category;
<a name="l00189"></a>00189    };
<a name="l00190"></a>00190    
<a name="l00191"></a>00191    <span class="keyword">inline</span> <a class="code" href="a00061.html#f22b9f715f049ac689b947e364d6ffaf">property_traits&lt;vtkVertexGlobalMap&gt;::reference</a>
<a name="l00192"></a><a class="code" href="a03753.html#713319087d978baa556635471c9fad79">00192</a>    <span class="keyword">get</span>(
<a name="l00193"></a>00193      <a class="code" href="a01824.html">vtkVertexGlobalMap</a> global_map,
<a name="l00194"></a>00194      <a class="code" href="a00061.html#e753bda19d1e5f1e30bca73047c81ed0">property_traits&lt;vtkVertexGlobalMap&gt;::key_type</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>)
<a name="l00195"></a>00195    {
<a name="l00196"></a>00196      <span class="keywordflow">return</span> vtkstd::pair&lt;int,vtkIdType&gt;(global_map.helper-&gt;GetVertexOwner(<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>),
<a name="l00197"></a>00197                                         global_map.helper-&gt;GetVertexIndex(<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>));
<a name="l00198"></a>00198    }
<a name="l00199"></a>00199     
<a name="l00200"></a>00200     <span class="comment">// </span>
<a name="l00201"></a>00201    <span class="keyword">template</span>&lt;&gt;
<a name="l00202"></a><a class="code" href="a00048.html">00202</a>    <span class="keyword">struct </span>property_map&lt;<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>*, vertex_global_t&gt;
<a name="l00203"></a>00203    {
<a name="l00204"></a><a class="code" href="a00048.html#d399ff2c63b0f245cb7ce10fb244a029">00204</a>      <span class="keyword">typedef</span> <a class="code" href="a01824.html">vtkVertexGlobalMap</a> <a class="code" href="a01824.html">type</a>;
<a name="l00205"></a><a class="code" href="a00048.html#892832886a24b6a7dd5903f5f55ad4aa">00205</a>      <span class="keyword">typedef</span> <a class="code" href="a01824.html">vtkVertexGlobalMap</a> <a class="code" href="a01824.html">const_type</a>;
<a name="l00206"></a>00206    };
<a name="l00207"></a>00207     
<a name="l00208"></a>00208   <a class="code" href="a03753.html#ec0752ae5bd7f037154a6d07c5efbc8d">SUBCLASS_PROPERTY_MAP_SPECIALIZATIONS</a>(vertex_global_t);
<a name="l00209"></a>00209 
<a name="l00210"></a>00210    <span class="keyword">inline</span> <a class="code" href="a01824.html">vtkVertexGlobalMap</a>
<a name="l00211"></a><a class="code" href="a03753.html#5fbd0f30b0859e14b60c316e446add65">00211</a>    <span class="keyword">get</span>(vertex_global_t, <a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph)
<a name="l00212"></a>00212    {
<a name="l00213"></a>00213      <span class="keywordflow">return</span> <a class="code" href="a01824.html">vtkVertexGlobalMap</a>(graph);
<a name="l00214"></a>00214    }
<a name="l00215"></a>00215    
<a name="l00216"></a>00216    <span class="comment">// Map from edge descriptor to (owner, local descriptor)</span>
<a name="l00217"></a><a class="code" href="a00447.html">00217</a>    <span class="keyword">struct </span><a class="code" href="a00447.html">vtkEdgeGlobalMap</a> 
<a name="l00218"></a>00218    {
<a name="l00219"></a><a class="code" href="a00447.html#b00a34ce0d0340250a62c8846b6920f9">00219</a>      <a class="code" href="a00447.html#b00a34ce0d0340250a62c8846b6920f9">vtkEdgeGlobalMap</a>() : <a class="code" href="a00447.html#4b11818935c43cc977eea96b5b26913f">helper</a>(0) { }
<a name="l00220"></a>00220           
<a name="l00221"></a><a class="code" href="a00447.html#d8d17c5fc2fb05ed05f0d15a9ae6d8bc">00221</a>      <span class="keyword">explicit</span> <a class="code" href="a00447.html#b00a34ce0d0340250a62c8846b6920f9">vtkEdgeGlobalMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph) 
<a name="l00222"></a>00222        : <a class="code" href="a00447.html#4b11818935c43cc977eea96b5b26913f">helper</a>(graph? graph-&gt;GetDistributedGraphHelper() : 0) { }
<a name="l00223"></a>00223           
<a name="l00224"></a><a class="code" href="a00447.html#4b11818935c43cc977eea96b5b26913f">00224</a>      <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *<a class="code" href="a00447.html#4b11818935c43cc977eea96b5b26913f">helper</a>;
<a name="l00225"></a>00225    };
<a name="l00226"></a>00226       
<a name="l00227"></a>00227    <span class="keyword">template</span>&lt;&gt;
<a name="l00228"></a><a class="code" href="a00058.html">00228</a>    <span class="keyword">struct </span>property_traits&lt;<a class="code" href="a00447.html">vtkEdgeGlobalMap</a>&gt; 
<a name="l00229"></a>00229    {
<a name="l00230"></a><a class="code" href="a00058.html#45a82e4c94d267250de76acdab9fb77d">00230</a>      <span class="keyword">typedef</span> vtkstd::pair&lt;int, vtkIdType&gt; value_type;
<a name="l00231"></a><a class="code" href="a00058.html#1facea08b2d4be194197e651e13ce69e">00231</a>      <span class="keyword">typedef</span> value_type <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21007cdaec72795b9d958f3051ff223566a">reference</a>;
<a name="l00232"></a><a class="code" href="a00058.html#f4fb9577ea3e2f2f7a764cffe8498e4b">00232</a>      <span class="keyword">typedef</span> <a class="code" href="a00454.html">vtkEdgeType</a> <a class="code" href="a00454.html">key_type</a>;
<a name="l00233"></a><a class="code" href="a00058.html#fab180d1b8bdf4b5a52c49711fbe3fdf">00233</a>      <span class="keyword">typedef</span> readable_property_map_tag category;
<a name="l00234"></a>00234    };
<a name="l00235"></a>00235       
<a name="l00236"></a>00236    <span class="keyword">inline</span> <a class="code" href="a00058.html#1facea08b2d4be194197e651e13ce69e">property_traits&lt;vtkEdgeGlobalMap&gt;::reference</a>
<a name="l00237"></a><a class="code" href="a03753.html#47b92271e7d32ad8b471cb90cac4e78d">00237</a>    <span class="keyword">get</span>(
<a name="l00238"></a>00238      <a class="code" href="a00447.html">vtkEdgeGlobalMap</a> global_map,
<a name="l00239"></a>00239      <a class="code" href="a00058.html#f4fb9577ea3e2f2f7a764cffe8498e4b">property_traits&lt;vtkEdgeGlobalMap&gt;::key_type</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>)
<a name="l00240"></a>00240    {
<a name="l00241"></a>00241      <span class="keywordflow">return</span> vtkstd::pair&lt;int, vtkIdType&gt;
<a name="l00242"></a>00242               (global_map.helper-&gt;GetEdgeOwner(<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>.Id), <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2100846b78bc0416ae791ce3bc3eddc9bc7">key</a>.Id);
<a name="l00243"></a>00243    }
<a name="l00244"></a>00244        
<a name="l00245"></a>00245    <span class="comment">// </span>
<a name="l00246"></a>00246    <span class="keyword">template</span>&lt;&gt;
<a name="l00247"></a><a class="code" href="a00046.html">00247</a>    <span class="keyword">struct </span>property_map&lt;<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>*, edge_global_t&gt;
<a name="l00248"></a>00248    {
<a name="l00249"></a><a class="code" href="a00046.html#25b9682b756c8a7a1cb7122db13bdcf8">00249</a>      <span class="keyword">typedef</span> <a class="code" href="a00447.html">vtkEdgeGlobalMap</a> <a class="code" href="a00447.html">type</a>;
<a name="l00250"></a><a class="code" href="a00046.html#449d42ccbce2e0de2ed0c9f961cffa51">00250</a>      <span class="keyword">typedef</span> <a class="code" href="a00447.html">vtkEdgeGlobalMap</a> <a class="code" href="a00447.html">const_type</a>;
<a name="l00251"></a>00251    };
<a name="l00252"></a>00252        
<a name="l00253"></a>00253   <a class="code" href="a03753.html#ec0752ae5bd7f037154a6d07c5efbc8d">SUBCLASS_PROPERTY_MAP_SPECIALIZATIONS</a>(edge_global_t);
<a name="l00254"></a>00254 
<a name="l00255"></a>00255    <span class="keyword">inline</span> <a class="code" href="a00447.html">vtkEdgeGlobalMap</a>
<a name="l00256"></a><a class="code" href="a03753.html#cd5ffebb44394cf4840fa141dfad9185">00256</a>    <span class="keyword">get</span>(edge_global_t, <a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph)
<a name="l00257"></a>00257    {
<a name="l00258"></a>00258      <span class="keywordflow">return</span> <a class="code" href="a00447.html">vtkEdgeGlobalMap</a>(graph);
<a name="l00259"></a>00259    }
<a name="l00260"></a>00260 
<a name="l00261"></a>00261 <span class="preprocessor">#undef SUBCLASS_PROPERTY_MAP_SPECIALIZATIONS</span>
<a name="l00262"></a>00262 <span class="preprocessor"></span>
<a name="l00263"></a>00263   <span class="comment">//===========================================================================</span>
<a name="l00264"></a>00264   <span class="comment">// Hash functions</span>
<a name="l00265"></a>00265   <span class="keyword">template</span>&lt;&gt; 
<a name="l00266"></a><a class="code" href="a00029.html">00266</a>   <span class="keyword">struct </span>hash&lt;<a class="code" href="a00454.html">vtkEdgeType</a>&gt;
<a name="l00267"></a>00267   {
<a name="l00268"></a><a class="code" href="a00029.html#472a945667db27f572387be3a1aa0619">00268</a>     vtkstd::size_t operator()(<span class="keyword">const</span> <a class="code" href="a00454.html">vtkEdgeType</a>&amp; edge)<span class="keyword"> const</span>
<a name="l00269"></a>00269 <span class="keyword">    </span>{
<a name="l00270"></a>00270       <span class="keywordflow">return</span> hash_value(edge.<a class="code" href="a00445.html#b9cdbfa89c9102a760031e7d9249628b">Id</a>);
<a name="l00271"></a>00271     }
<a name="l00272"></a>00272   };
<a name="l00273"></a>00273 
<a name="l00274"></a>00274 } <span class="comment">// namespace boost</span>
<a name="l00275"></a>00275 
<a name="l00276"></a>00276 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00277"></a>00277 <span class="comment">// Extract the process group from a vtkGraph</span>
<a name="l00278"></a>00278 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00279"></a>00279 
<a name="l00280"></a><a class="code" href="a03756.html">00280</a> <span class="keyword">namespace </span>boost { <span class="keyword">namespace </span>graph { <span class="keyword">namespace </span>parallel { 
<a name="l00281"></a>00281   <span class="keyword">template</span>&lt;&gt;
<a name="l00282"></a><a class="code" href="a00039.html">00282</a>   <span class="keyword">struct </span>process_group_type&lt;<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a> *&gt; 
<a name="l00283"></a>00283   {
<a name="l00284"></a><a class="code" href="a00039.html#cb17a3bf80aa8ffaf07c7847d8c901b0">00284</a>     <span class="keyword">typedef</span> boost::graph::distributed::mpi_process_group <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2108e7f81709ed57920a45c02a954726847">type</a>;
<a name="l00285"></a>00285   };
<a name="l00286"></a>00286 
<a name="l00287"></a>00287   <span class="keyword">template</span>&lt;&gt;
<a name="l00288"></a><a class="code" href="a00037.html">00288</a>   <span class="keyword">struct </span>process_group_type&lt;<a class="code" href="a00421.html" title="A directed graph.">vtkDirectedGraph</a> *&gt; 
<a name="l00289"></a>00289     : process_group_type&lt;vtkGraph *&gt; { };
<a name="l00290"></a>00290 
<a name="l00291"></a>00291   <span class="keyword">template</span>&lt;&gt;
<a name="l00292"></a><a class="code" href="a00040.html">00292</a>   <span class="keyword">struct </span>process_group_type&lt;<a class="code" href="a01776.html" title="An undirected graph.">vtkUndirectedGraph</a> *&gt; 
<a name="l00293"></a>00293     : process_group_type&lt;vtkGraph *&gt; { };
<a name="l00294"></a>00294 
<a name="l00295"></a>00295   <span class="keyword">template</span>&lt;&gt;
<a name="l00296"></a><a class="code" href="a00038.html">00296</a>   <span class="keyword">struct </span>process_group_type&lt;<a class="code" href="a00421.html" title="A directed graph.">vtkDirectedGraph</a> * <span class="keyword">const</span>&gt;
<a name="l00297"></a>00297     : process_group_type&lt;vtkDirectedGraph *&gt; { };
<a name="l00298"></a>00298 
<a name="l00299"></a>00299   <span class="keyword">template</span>&lt;&gt;
<a name="l00300"></a><a class="code" href="a00041.html">00300</a>   <span class="keyword">struct </span>process_group_type&lt;<a class="code" href="a01776.html" title="An undirected graph.">vtkUndirectedGraph</a> * <span class="keyword">const</span>&gt;
<a name="l00301"></a>00301     : process_group_type&lt;vtkUndirectedGraph *&gt; { };
<a name="l00302"></a>00302 } } } <span class="comment">// end namespace boost::graph::parallel</span>
<a name="l00303"></a>00303 
<a name="l00304"></a>00304 boost::graph::distributed::mpi_process_group <a class="code" href="a03313.html#20bcc1ae10a3f3f7e168de217f905258">process_group</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a> *graph);
<a name="l00305"></a>00305 
<a name="l00306"></a>00306 <span class="keyword">inline</span> boost::graph::distributed::mpi_process_group 
<a name="l00307"></a><a class="code" href="a03313.html#09c904a9660d2332324cedcc8c4fdb70">00307</a> <a class="code" href="a03313.html#20bcc1ae10a3f3f7e168de217f905258">process_group</a>(<a class="code" href="a00421.html" title="A directed graph.">vtkDirectedGraph</a> *graph)
<a name="l00308"></a>00308 {
<a name="l00309"></a>00309   <span class="keywordflow">return</span> <a class="code" href="a03313.html#20bcc1ae10a3f3f7e168de217f905258">process_group</a>(static_cast&lt;vtkGraph *&gt;(graph));
<a name="l00310"></a>00310 }
<a name="l00311"></a>00311 
<a name="l00312"></a>00312 <span class="keyword">inline</span> boost::graph::distributed::mpi_process_group
<a name="l00313"></a><a class="code" href="a03313.html#9918de313d8fad9903b8b57b88d42a6a">00313</a> <a class="code" href="a03313.html#20bcc1ae10a3f3f7e168de217f905258">process_group</a>(<a class="code" href="a01776.html" title="An undirected graph.">vtkUndirectedGraph</a> *graph)
<a name="l00314"></a>00314 {
<a name="l00315"></a>00315   <span class="keywordflow">return</span> <a class="code" href="a03313.html#20bcc1ae10a3f3f7e168de217f905258">process_group</a>(static_cast&lt;vtkGraph *&gt;(graph));
<a name="l00316"></a>00316 }
<a name="l00317"></a>00317 
<a name="l00318"></a>00318 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00319"></a>00319 <span class="comment">// Serialization support for simple VTK structures</span>
<a name="l00320"></a>00320 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00321"></a>00321 
<a name="l00322"></a>00322 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00323"></a>00323 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Archiver&gt;
<a name="l00324"></a><a class="code" href="a03313.html#2a810fc2195179a68ae2abd26453e6bf">00324</a> <span class="keywordtype">void</span> <a class="code" href="a02161.html#df361cbb3ebebe9506969720ef46e950">serialize</a>(Archiver&amp; ar, <a class="code" href="a00445.html">vtkEdgeBase</a>&amp; edge, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)
<a name="l00325"></a>00325 {
<a name="l00326"></a>00326   ar &amp; edge.<a class="code" href="a00445.html#b9cdbfa89c9102a760031e7d9249628b">Id</a>;
<a name="l00327"></a>00327 }
<a name="l00328"></a>00328 
<a name="l00329"></a>00329 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Archiver&gt;
<a name="l00330"></a><a class="code" href="a03313.html#ec7da2534c18f58ba032c518b812ae29">00330</a> <span class="keywordtype">void</span> <a class="code" href="a02161.html#df361cbb3ebebe9506969720ef46e950">serialize</a>(Archiver&amp; ar, <a class="code" href="a01138.html">vtkOutEdgeType</a>&amp; edge, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)
<a name="l00331"></a>00331 {
<a name="l00332"></a>00332   ar &amp; boost::serialization::base_object&lt;vtkEdgeBase&gt;(edge)
<a name="l00333"></a>00333      &amp; edge.<a class="code" href="a01138.html#10a4f65d5c7e0e608ba122759885fa10">Target</a>;
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335 
<a name="l00336"></a>00336 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Archiver&gt;
<a name="l00337"></a><a class="code" href="a03313.html#8ceefa8022c4d7cd5369469ddbc3c15b">00337</a> <span class="keywordtype">void</span> <a class="code" href="a02161.html#df361cbb3ebebe9506969720ef46e950">serialize</a>(Archiver&amp; ar, <a class="code" href="a00871.html">vtkInEdgeType</a>&amp; edge, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)
<a name="l00338"></a>00338 {
<a name="l00339"></a>00339   ar &amp; boost::serialization::base_object&lt;vtkEdgeBase&gt;(edge)
<a name="l00340"></a>00340      &amp; edge.<a class="code" href="a00871.html#14a351832ab534211fb58f1ef79f2073">Source</a>;
<a name="l00341"></a>00341 }
<a name="l00342"></a>00342 
<a name="l00343"></a>00343 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Archiver&gt;
<a name="l00344"></a><a class="code" href="a03313.html#71d4fdecace894ede7bd5dc06182686c">00344</a> <span class="keywordtype">void</span> <a class="code" href="a02161.html#df361cbb3ebebe9506969720ef46e950">serialize</a>(Archiver&amp; ar, <a class="code" href="a00454.html">vtkEdgeType</a>&amp; edge, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)
<a name="l00345"></a>00345 {
<a name="l00346"></a>00346   ar &amp; boost::serialization::base_object&lt;vtkEdgeBase&gt;(edge)
<a name="l00347"></a>00347      &amp; edge.<a class="code" href="a00454.html#e064cd661897144ed104f034590cb959">Source</a>
<a name="l00348"></a>00348      &amp; edge.<a class="code" href="a00454.html#d2a4bb7e4995e95722268fe13e6b8f79">Target</a>;
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00351"></a>00351 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00352"></a>00352 <span class="comment">// Simplified tools to build distributed property maps</span>
<a name="l00353"></a>00353 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00354"></a>00354 
<a name="l00356"></a>00356 
<a name="l00361"></a>00361 <span class="keyword">typedef</span> boost::local_property_map&lt;boost::graph::distributed::mpi_process_group,
<a name="l00362"></a>00362                                   <a class="code" href="a01824.html">boost::vtkVertexGlobalMap</a>,
<a name="l00363"></a>00363                                   <a class="code" href="a00663.html">boost::vtkGraphIndexMap</a>&gt;
<a name="l00364"></a><a class="code" href="a03313.html#aafca34c2af8e1a4d56e124039f0a7cc">00364</a>   <a class="code" href="a03313.html#aafca34c2af8e1a4d56e124039f0a7cc">vtkGraphDistributedVertexIndexMap</a>;
<a name="l00366"></a>00366 
<a name="l00368"></a>00368 
<a name="l00369"></a>00369 <span class="keyword">inline</span> <a class="code" href="a03313.html#aafca34c2af8e1a4d56e124039f0a7cc">vtkGraphDistributedVertexIndexMap</a>
<a name="l00370"></a><a class="code" href="a03313.html#00af83e5593b8422cf9c2cd6313a7de3">00370</a> <a class="code" href="a03313.html#00af83e5593b8422cf9c2cd6313a7de3">MakeDistributedVertexIndexMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph)
<a name="l00372"></a>00372 {
<a name="l00373"></a>00373   <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *helper = graph-&gt;<a class="code" href="a00654.html#09924a04ae4c4d22d621b65f237e6f22">GetDistributedGraphHelper</a>();
<a name="l00374"></a>00374   <span class="keywordflow">if</span> (!helper)
<a name="l00375"></a>00375     {
<a name="l00376"></a>00376     vtkErrorWithObjectMacro(graph, <span class="stringliteral">"A vtkGraph without a distributed graph helper is not a distributed graph"</span>);
<a name="l00377"></a>00377     <span class="keywordflow">return</span> <a class="code" href="a03313.html#aafca34c2af8e1a4d56e124039f0a7cc">vtkGraphDistributedVertexIndexMap</a>();
<a name="l00378"></a>00378     }
<a name="l00379"></a>00379 
<a name="l00380"></a>00380   <a class="code" href="a01188.html" title="end namespace boost::graph::distributed">vtkPBGLDistributedGraphHelper</a> *pbglHelper 
<a name="l00381"></a>00381     = <a class="code" href="a01188.html#ae320c94eff6c711f825f136ffd459e8">vtkPBGLDistributedGraphHelper::SafeDownCast</a>(helper);
<a name="l00382"></a>00382   <span class="keywordflow">if</span> (!pbglHelper)
<a name="l00383"></a>00383     {
<a name="l00384"></a>00384     vtkErrorWithObjectMacro(graph, <span class="stringliteral">"A vtkGraph with a non-Parallel BGL distributed graph helper cannot be used with the Parallel BGL"</span>);
<a name="l00385"></a>00385     <span class="keywordflow">return</span> <a class="code" href="a03313.html#aafca34c2af8e1a4d56e124039f0a7cc">vtkGraphDistributedVertexIndexMap</a>();
<a name="l00386"></a>00386     }
<a name="l00387"></a>00387 
<a name="l00388"></a>00388   <span class="keywordflow">return</span> <a class="code" href="a03313.html#aafca34c2af8e1a4d56e124039f0a7cc">vtkGraphDistributedVertexIndexMap</a>(pbglHelper-&gt;<a class="code" href="a01188.html#7be7301066f42a2f9b44ac0e8a28b606">GetProcessGroup</a>(),
<a name="l00389"></a>00389                                            <a class="code" href="a01824.html">boost::vtkVertexGlobalMap</a>(graph),
<a name="l00390"></a>00390                                            <a class="code" href="a00663.html">boost::vtkGraphIndexMap</a>());
<a name="l00391"></a>00391 }
<a name="l00392"></a>00392 
<a name="l00394"></a>00394 
<a name="l00396"></a>00396 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataArray&gt;
<a name="l00397"></a><a class="code" href="a00435.html">00397</a> <span class="keyword">struct </span><a class="code" href="a00435.html">vtkDistributedVertexPropertyMapType</a>
<a name="l00399"></a>00399 {
<a name="l00400"></a>00400   <span class="keyword">typedef</span> boost::parallel::distributed_property_map&lt;
<a name="l00401"></a>00401             boost::graph::distributed::mpi_process_group,
<a name="l00402"></a>00402             <a class="code" href="a01824.html">boost::vtkVertexGlobalMap</a>,
<a name="l00403"></a><a class="code" href="a00435.html#85bca1ec53dd8c4b72290a1930ae95d3">00403</a>             DataArray*&gt; <a class="code" href="a00435.html#85bca1ec53dd8c4b72290a1930ae95d3">type</a>;
<a name="l00404"></a>00404 };
<a name="l00405"></a>00405 
<a name="l00407"></a>00407 
<a name="l00409"></a>00409 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataArray&gt;
<a name="l00410"></a>00410 <span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="a00435.html">vtkDistributedVertexPropertyMapType&lt;DataArray&gt;::type</a>
<a name="l00411"></a><a class="code" href="a03313.html#fb1085daf4277134dad094efb534263a">00411</a> <a class="code" href="a03313.html#fb1085daf4277134dad094efb534263a">MakeDistributedVertexPropertyMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph, DataArray* array)
<a name="l00413"></a>00413 {
<a name="l00414"></a>00414   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00435.html">vtkDistributedVertexPropertyMapType&lt;DataArray&gt;::type</a> MapType;
<a name="l00415"></a>00415   
<a name="l00416"></a>00416   <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *helper = graph-&gt;<a class="code" href="a00654.html#09924a04ae4c4d22d621b65f237e6f22">GetDistributedGraphHelper</a>();
<a name="l00417"></a>00417   <span class="keywordflow">if</span> (!helper)
<a name="l00418"></a>00418     {
<a name="l00419"></a>00419     vtkErrorWithObjectMacro(graph, <span class="stringliteral">"A vtkGraph without a distributed graph helper is not a distributed graph"</span>);
<a name="l00420"></a>00420     <span class="keywordflow">return</span> MapType();
<a name="l00421"></a>00421     }
<a name="l00422"></a>00422 
<a name="l00423"></a>00423   <a class="code" href="a01188.html" title="end namespace boost::graph::distributed">vtkPBGLDistributedGraphHelper</a> *pbglHelper 
<a name="l00424"></a>00424     = <a class="code" href="a01188.html#ae320c94eff6c711f825f136ffd459e8">vtkPBGLDistributedGraphHelper::SafeDownCast</a>(helper);
<a name="l00425"></a>00425   <span class="keywordflow">if</span> (!pbglHelper)
<a name="l00426"></a>00426     {
<a name="l00427"></a>00427     vtkErrorWithObjectMacro(graph, <span class="stringliteral">"A vtkGraph with a non-Parallel BGL distributed graph helper cannot be used with the Parallel BGL"</span>);
<a name="l00428"></a>00428     <span class="keywordflow">return</span> MapType();
<a name="l00429"></a>00429     }
<a name="l00430"></a>00430 
<a name="l00431"></a>00431   <span class="keywordflow">return</span> MapType(pbglHelper-&gt;<a class="code" href="a01188.html#7be7301066f42a2f9b44ac0e8a28b606">GetProcessGroup</a>(),
<a name="l00432"></a>00432                  <a class="code" href="a01824.html">boost::vtkVertexGlobalMap</a>(graph),
<a name="l00433"></a>00433                  array);
<a name="l00434"></a>00434 }
<a name="l00435"></a>00435 
<a name="l00437"></a>00437 
<a name="l00439"></a>00439 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataArray&gt;
<a name="l00440"></a><a class="code" href="a00432.html">00440</a> <span class="keyword">struct </span><a class="code" href="a00432.html">vtkDistributedEdgePropertyMapType</a>
<a name="l00442"></a>00442 {
<a name="l00443"></a>00443   <span class="keyword">typedef</span> boost::parallel::distributed_property_map&lt;
<a name="l00444"></a>00444             boost::graph::distributed::mpi_process_group,
<a name="l00445"></a>00445             <a class="code" href="a00447.html">boost::vtkEdgeGlobalMap</a>,
<a name="l00446"></a><a class="code" href="a00432.html#456beb4dc1e450cc6b6c5e1655077262">00446</a>             DataArray*&gt; <a class="code" href="a00432.html#456beb4dc1e450cc6b6c5e1655077262">type</a>;
<a name="l00447"></a>00447 };
<a name="l00448"></a>00448 
<a name="l00450"></a>00450 
<a name="l00452"></a>00452 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataArray&gt;
<a name="l00453"></a>00453 <span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="a00432.html">vtkDistributedEdgePropertyMapType&lt;DataArray&gt;::type</a>
<a name="l00454"></a><a class="code" href="a03313.html#5fb4945617ab2cfd2979115406994392">00454</a> <a class="code" href="a03313.html#5fb4945617ab2cfd2979115406994392">MakeDistributedEdgePropertyMap</a>(<a class="code" href="a00654.html" title="Base class for graph data types.">vtkGraph</a>* graph, DataArray* array)
<a name="l00456"></a>00456 {
<a name="l00457"></a>00457   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="a00432.html">vtkDistributedEdgePropertyMapType&lt;DataArray&gt;::type</a> MapType;
<a name="l00458"></a>00458 
<a name="l00459"></a>00459   <a class="code" href="a00433.html" title="helper for the vtkGraph class that allows the graph to be distributed across multiple...">vtkDistributedGraphHelper</a> *helper = graph-&gt;<a class="code" href="a00654.html#09924a04ae4c4d22d621b65f237e6f22">GetDistributedGraphHelper</a>();
<a name="l00460"></a>00460   <span class="keywordflow">if</span> (!helper)
<a name="l00461"></a>00461     {
<a name="l00462"></a>00462     vtkErrorWithObjectMacro(graph, <span class="stringliteral">"A vtkGraph without a distributed graph helper is not a distributed graph"</span>);
<a name="l00463"></a>00463     <span class="keywordflow">return</span> MapType();
<a name="l00464"></a>00464     }
<a name="l00465"></a>00465 
<a name="l00466"></a>00466   <a class="code" href="a01188.html" title="end namespace boost::graph::distributed">vtkPBGLDistributedGraphHelper</a> *pbglHelper 
<a name="l00467"></a>00467     = <a class="code" href="a01188.html#ae320c94eff6c711f825f136ffd459e8">vtkPBGLDistributedGraphHelper::SafeDownCast</a>(helper);
<a name="l00468"></a>00468   <span class="keywordflow">if</span> (!pbglHelper)
<a name="l00469"></a>00469     {
<a name="l00470"></a>00470     vtkErrorWithObjectMacro(graph, <span class="stringliteral">"A vtkGraph with a non-Parallel BGL distributed graph helper cannot be used with the Parallel BGL"</span>);
<a name="l00471"></a>00471     <span class="keywordflow">return</span> MapType();
<a name="l00472"></a>00472     }
<a name="l00473"></a>00473 
<a name="l00474"></a>00474   <span class="keywordflow">return</span> MapType(pbglHelper-&gt;<a class="code" href="a01188.html#7be7301066f42a2f9b44ac0e8a28b606">GetProcessGroup</a>(),
<a name="l00475"></a>00475                  <a class="code" href="a00447.html">boost::vtkEdgeGlobalMap</a>(graph),
<a name="l00476"></a>00476                  array);
<a name="l00477"></a>00477 }
<a name="l00478"></a>00478 
<a name="l00479"></a>00479 <span class="preprocessor">#endif // __vtkPBGLGraphAdapter_h</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:43 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>