page_rank.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
  7. <title>Parallel BGL PageRank</title>
  8. <link rel="stylesheet" href="../../../../rst.css" type="text/css" />
  9. </head>
  10. <body>
  11. <div class="document" id="logo-pagerank">
  12. <h1 class="title"><a class="reference external" href="http://www.osl.iu.edu/research/pbgl"><img align="middle" alt="Parallel BGL" class="align-middle" src="pbgl-logo.png" /></a> PageRank</h1>
  13. <!-- Copyright (C) 2004-2008 The Trustees of Indiana University.
  14. Use, modification and distribution is subject to the Boost Software
  15. License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  16. http://www.boost.org/LICENSE_1_0.txt) -->
  17. <pre class="literal-block">
  18. namespace graph {
  19. template&lt;typename Graph, typename RankMap, typename Done&gt;
  20. inline void
  21. page_rank(const Graph&amp; g, RankMap rank_map, Done done,
  22. typename property_traits&lt;RankMap&gt;::value_type damping = 0.85);
  23. template&lt;typename Graph, typename RankMap&gt;
  24. inline void
  25. page_rank(const Graph&amp; g, RankMap rank_map);
  26. }
  27. </pre>
  28. <p>The <tt class="docutils literal"><span class="pre">page_rank</span></tt> algorithm computes the ranking of vertices in a
  29. graph, based on the connectivity of a directed graph <a class="citation-reference" href="#pbmw98" id="id1">[PBMW98]</a>. The
  30. idea of PageRank is based on a random model of a Web surfer, who
  31. starts a random web page and then either follows a link from that web
  32. page (choosing from the links randomly) or jumps to a completely
  33. different web page (not necessarily linked from the current
  34. page). The PageRank of each page is the probability of the random web
  35. surfer visiting that page.</p>
  36. <div class="contents topic" id="contents">
  37. <p class="topic-title first">Contents</p>
  38. <ul class="simple">
  39. <li><a class="reference internal" href="#where-defined" id="id2">Where Defined</a></li>
  40. <li><a class="reference internal" href="#parameters" id="id3">Parameters</a></li>
  41. <li><a class="reference internal" href="#complexity" id="id4">Complexity</a><ul>
  42. <li><a class="reference internal" href="#bibliography" id="id5">Bibliography</a></li>
  43. </ul>
  44. </li>
  45. </ul>
  46. </div>
  47. <div class="section" id="where-defined">
  48. <h1><a class="toc-backref" href="#id2">Where Defined</a></h1>
  49. <p>&lt;<tt class="docutils literal"><span class="pre">boost/graph/distributed/page_rank.hpp</span></tt>&gt;</p>
  50. <p>also accessible from</p>
  51. <p>&lt;<tt class="docutils literal"><span class="pre">boost/graph/page_rank.hpp</span></tt>&gt;</p>
  52. </div>
  53. <div class="section" id="parameters">
  54. <h1><a class="toc-backref" href="#id3">Parameters</a></h1>
  55. <dl class="docutils">
  56. <dt>IN: <tt class="docutils literal"><span class="pre">Graph&amp;</span> <span class="pre">g</span></tt></dt>
  57. <dd>The graph type must be a model of <a class="reference external" href="DistributedVertexListGraph.html">Distributed Vertex List Graph</a> and
  58. <a class="reference external" href="DistributedEdgeListGraph.html">Distributed Edge List Graph</a>. The graph must be directed.</dd>
  59. <dt>OUT: <tt class="docutils literal"><span class="pre">RankMap</span> <span class="pre">rank</span></tt></dt>
  60. <dd>Stores the rank of each vertex. The type <tt class="docutils literal"><span class="pre">RankMap</span></tt> must model the
  61. <a class="reference external" href="http://www.boost.org/libs/property_map/ReadWritePropertyMap.html">Read/Write Property Map</a> concept and must be a <a class="reference external" href="distributed_property_map.html">distributed
  62. property map</a>. Its key type must be the vertex descriptor of the
  63. graph type and its value type must be a floating-point or rational
  64. type.</dd>
  65. <dt>IN: <tt class="docutils literal"><span class="pre">Done</span> <span class="pre">done</span></tt></dt>
  66. <dd><p class="first">A function object that determines when the PageRank algorithm
  67. should complete. It will be passed two parameters, the rank map and
  68. a reference to the graph, and should return <tt class="docutils literal"><span class="pre">true</span></tt> when the
  69. algorithm should terminate.</p>
  70. <p class="last"><strong>Default</strong>: <tt class="docutils literal"><span class="pre">graph::n_iterations(20)</span></tt></p>
  71. </dd>
  72. <dt>IN: <tt class="docutils literal"><span class="pre">typename</span> <span class="pre">property_traits&lt;RankMap&gt;::value_type</span> <span class="pre">damping</span></tt></dt>
  73. <dd><p class="first">The damping factor is the probability that the Web surfer will
  74. select an outgoing link from the current page instead of jumping to
  75. a random page.</p>
  76. <p class="last"><strong>Default</strong>: 0.85</p>
  77. </dd>
  78. </dl>
  79. </div>
  80. <div class="section" id="complexity">
  81. <h1><a class="toc-backref" href="#id4">Complexity</a></h1>
  82. <p>Each iteration of PageRank requires <em>O((V + E)/p)</em> time on <em>p</em>
  83. processors and performs <em>O(V)</em> communication. The number of
  84. iterations is dependent on the input to the algorithm.</p>
  85. <div class="section" id="bibliography">
  86. <h2><a class="toc-backref" href="#id5">Bibliography</a></h2>
  87. <table class="docutils citation" frame="void" id="pbmw98" rules="none">
  88. <colgroup><col class="label" /><col /></colgroup>
  89. <tbody valign="top">
  90. <tr><td class="label"><a class="fn-backref" href="#id1">[PBMW98]</a></td><td>Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry
  91. Winograd. The PageRank Citation Ranking: Bringing Order to the
  92. Web. Technical report, Stanford Digital Library Technologies Project,
  93. November 1998.</td></tr>
  94. </tbody>
  95. </table>
  96. <hr class="docutils" />
  97. <p>Copyright (C) 2005 The Trustees of Indiana University.</p>
  98. <p>Authors: Douglas Gregor and Andrew Lumsdaine</p>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="footer">
  103. <hr class="footer" />
  104. Generated on: 2009-05-31 00:21 UTC.
  105. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
  106. </div>
  107. </body>
  108. </html>