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> |
---|
25 | template<typename Graph, typename PositionMap, typename Dimension, |
---|
26 | typename RandomNumberGenerator> |
---|
27 | void |
---|
28 | random_graph_layout(const Graph& g, PositionMap position_map, |
---|
29 | Dimension minX, Dimension maxX, |
---|
30 | Dimension minY, Dimension maxY, |
---|
31 | RandomNumberGenerator& gen); |
---|
32 | </PRE> |
---|
33 | |
---|
34 | <P> This algorithm places the points of the graph at random |
---|
35 | locations. </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 | |
---|
43 | IN: <tt>const Graph& 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 | |
---|
50 | IN/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 | |
---|
61 | IN: <tt>Dimension minX</tt> |
---|
62 | <blockquote> |
---|
63 | The minimum <tt>x</tt> coordinate. |
---|
64 | </blockquote> |
---|
65 | |
---|
66 | IN: <tt>Dimension maxX</tt> |
---|
67 | <blockquote> |
---|
68 | The maximum <tt>x</tt> coordinate. |
---|
69 | </blockquote> |
---|
70 | |
---|
71 | IN: <tt>Dimension minY</tt> |
---|
72 | <blockquote> |
---|
73 | The minimum <tt>y</tt> coordinate. |
---|
74 | </blockquote> |
---|
75 | |
---|
76 | IN: <tt>Dimension maxY</tt> |
---|
77 | <blockquote> |
---|
78 | The maximum <tt>y</tt> coordinate. |
---|
79 | </blockquote> |
---|
80 | |
---|
81 | IN/UTIL: <tt>RandomNumberGenerator& gen</tt> |
---|
82 | <blockquote> |
---|
83 | A random number generator that will be used to place vertices. The |
---|
84 | type <tt>RandomNumberGenerator</tt> must model the <a |
---|
85 | href="../../random/random-concepts.html#number_generator">NumberGenerator</a> |
---|
86 | concept. |
---|
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 © 2004</TD><TD> |
---|
97 | <A HREF="../../../people/doug_gregor.html">Doug Gregor</A>, Indiana University |
---|
98 | </TD></TR></TABLE> |
---|
99 | |
---|
100 | </BODY> |
---|
101 | </HTML> |
---|