Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/graph/doc/random_layout.html @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 2.7 KB
Line 
1<HTML>
2<!--
3  -- Copyright (c) 2005 Trustees of Indiana University
4  --
5  -- Distributed under the Boost Software License, Version 1.0.
6  -- (See accompanying file LICENSE_1_0.txt or copy at
7  -- http://www.boost.org/LICENSE_1_0.txt)
8  -->
9<Head>
10<Title>Boost Graph Library: Random Graph Layout</Title>
11<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
12        ALINK="#ff0000"> 
13<IMG SRC="../../../boost.png" 
14     ALT="C++ Boost" width="277" height="86"> 
15
16<BR Clear>
17
18<TT>random_graph_layout</TT>
19</H1>
20
21
22<P>
23<PRE>
24<i>// non-named parameter version</i>
25template&lt;typename Graph, typename PositionMap, typename Dimension,
26         typename RandomNumberGenerator&gt;
27void
28random_graph_layout(const Graph&amp; g, PositionMap position_map,
29                    Dimension minX, Dimension maxX,
30                    Dimension minY, Dimension maxY,
31                    RandomNumberGenerator&amp; gen);
32</PRE>
33
34<P> This algorithm places the points of the graph at random
35locations. </p>
36
37<h3>Where Defined</h3>
38
39<a href="../../../boost/graph/random_layout.hpp"><tt>boost/graph/random_layout.hpp</tt></a>
40
41<h3>Parameters</h3>
42
43IN: <tt>const Graph&amp; g</tt> 
44<blockquote>
45  The graph object on which the algorithm will be applied.
46  The type <tt>Graph</tt> must be a model of
47  <a href="./VertexAndEdgeListGraph.html">Vertex And Edge List Graph</a>.
48</blockquote>
49
50IN/OUT: <tt>PositionMap position</tt>
51<blockquote>
52  The property map that stores the position of each vertex. The type
53  <tt>PositionMap</tt> must be a model of <a
54  href="../../property_map/LvaluePropertyMap.html">Lvalue Property
55  Map</a> such that the vertex descriptor type of <tt>Graph</tt> is
56  convertible to its key type. Its value type must be a structure with
57  fields <tt>x</tt> and <tt>y</tt>, representing the coordinates of
58  the vertex.
59</blockquote>
60
61IN: <tt>Dimension minX</tt>
62<blockquote>
63  The minimum <tt>x</tt> coordinate.
64</blockquote>
65
66IN: <tt>Dimension maxX</tt>
67<blockquote>
68  The maximum <tt>x</tt> coordinate.
69</blockquote>
70
71IN: <tt>Dimension minY</tt>
72<blockquote>
73  The minimum <tt>y</tt> coordinate.
74</blockquote>
75
76IN: <tt>Dimension maxY</tt>
77<blockquote>
78  The maximum <tt>y</tt> coordinate.
79</blockquote>
80
81IN/UTIL: <tt>RandomNumberGenerator&amp; gen</tt>
82<blockquote>
83A random number generator that will be used to place vertices. The
84type <tt>RandomNumberGenerator</tt> must model the <a
85href="../../random/random-concepts.html#number_generator">NumberGenerator</a>
86concept.
87</blockquote>
88
89<H3>Complexity</H3>
90<P> The time complexity is <i>O(|V|)</i>.
91
92<br>
93<HR>
94<TABLE>
95<TR valign=top>
96<TD nowrap>Copyright &copy; 2004</TD><TD>
97<A HREF="../../../people/doug_gregor.html">Doug Gregor</A>, Indiana University
98</TD></TR></TABLE>
99
100</BODY>
101</HTML> 
Note: See TracBrowser for help on using the repository browser.