random_layout.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <HTML>
  2. <!--
  3. Copyright (c) 2005, 2010 Trustees of Indiana University
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <Head>
  9. <Title>Boost Graph Library: Random Graph Layout</Title>
  10. <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
  11. ALINK="#ff0000">
  12. <IMG SRC="../../../boost.png"
  13. ALT="C++ Boost" width="277" height="86">
  14. <BR Clear>
  15. <TT>random_graph_layout</TT>
  16. </H1>
  17. <P>
  18. <PRE>
  19. <i>// non-named parameter version</i>
  20. template&lt;typename Graph, typename PositionMap, typename Topology&gt;
  21. void
  22. random_graph_layout(const Graph&amp; g, PositionMap position_map,
  23. const Topology&amp; space);
  24. </PRE>
  25. <P> This algorithm places the points of the graph at random
  26. locations within a given space. </p>
  27. <h3>Where Defined</h3>
  28. <a href="../../../boost/graph/random_layout.hpp"><tt>boost/graph/random_layout.hpp</tt></a>
  29. <h3>Parameters</h3>
  30. IN: <tt>const Graph&amp; g</tt>
  31. <blockquote>
  32. The graph object on which the algorithm will be applied.
  33. The type <tt>Graph</tt> must be a model of
  34. <a href="./VertexAndEdgeListGraph.html">Vertex And Edge List Graph</a>.
  35. </blockquote>
  36. IN/OUT: <tt>PositionMap position</tt>
  37. <blockquote>
  38. The property map that stores the position of each vertex. The type
  39. <tt>PositionMap</tt> must be a model of <a
  40. href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
  41. Map</a> such that the vertex descriptor type of <tt>Graph</tt> is
  42. convertible to its key type. Its value type must be
  43. <tt>Topology::point_type</tt>, representing the coordinates of the vertex.
  44. </blockquote>
  45. IN: <tt>const Topology&amp; space</tt>
  46. <blockquote>
  47. The topology used to lay out the vertices. This parameter describes both the
  48. size and shape of the layout area and provides a random number generator used
  49. to create random positions within the space. Topologies are described in
  50. more detail (with a list of BGL-provided topologies) <a
  51. href="topology.html">in separate documentation</a>.
  52. </blockquote>
  53. <H3>Complexity</H3>
  54. <P> The time complexity is <i>O(|V|)</i>.
  55. <br>
  56. <HR>
  57. <TABLE>
  58. <TR valign=top>
  59. <TD nowrap>Copyright &copy; 2004, 2010</TD><TD>
  60. <A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University
  61. </TD></TR></TABLE>
  62. </BODY>
  63. </HTML>