File: random_layout.html

package info (click to toggle)
boost1.35 1.35.0-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 203,856 kB
  • ctags: 337,867
  • sloc: cpp: 938,683; xml: 56,847; ansic: 41,589; python: 18,999; sh: 11,566; makefile: 664; perl: 494; yacc: 456; asm: 353; csh: 6
file content (101 lines) | stat: -rw-r--r-- 2,776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<HTML>
<!--
  -- Copyright (c) 2005 Trustees of Indiana University
  --
  -- Distributed under the Boost Software License, Version 1.0.
  -- (See accompanying file LICENSE_1_0.txt or copy at
  -- http://www.boost.org/LICENSE_1_0.txt)
  -->
<Head>
<Title>Boost Graph Library: Random Graph Layout</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
        ALINK="#ff0000"> 
<IMG SRC="../../../boost.png" 
     ALT="C++ Boost" width="277" height="86"> 

<BR Clear>

<TT>random_graph_layout</TT>
</H1>


<P>
<PRE>
<i>// non-named parameter version</i>
template&lt;typename Graph, typename PositionMap, typename Dimension, 
         typename RandomNumberGenerator&gt;
void
random_graph_layout(const Graph&amp; g, PositionMap position_map,
                    Dimension minX, Dimension maxX, 
                    Dimension minY, Dimension maxY,
                    RandomNumberGenerator&amp; gen);
</PRE>

<P> This algorithm places the points of the graph at random
locations. </p>

<h3>Where Defined</h3>

<a href="../../../boost/graph/random_layout.hpp"><tt>boost/graph/random_layout.hpp</tt></a>

<h3>Parameters</h3>

IN: <tt>const Graph&amp; g</tt> 
<blockquote>
  The graph object on which the algorithm will be applied.
  The type <tt>Graph</tt> must be a model of 
  <a href="./VertexAndEdgeListGraph.html">Vertex And Edge List Graph</a>.
</blockquote>

IN/OUT: <tt>PositionMap position</tt>
<blockquote>
  The property map that stores the position of each vertex. The type
  <tt>PositionMap</tt> must be a model of <a
  href="../../property_map/LvaluePropertyMap.html">Lvalue Property
  Map</a> such that the vertex descriptor type of <tt>Graph</tt> is
  convertible to its key type. Its value type must be a structure with
  fields <tt>x</tt> and <tt>y</tt>, representing the coordinates of
  the vertex.
</blockquote>

IN: <tt>Dimension minX</tt>
<blockquote>
  The minimum <tt>x</tt> coordinate.
</blockquote>

IN: <tt>Dimension maxX</tt>
<blockquote>
  The maximum <tt>x</tt> coordinate.
</blockquote>

IN: <tt>Dimension minY</tt>
<blockquote>
  The minimum <tt>y</tt> coordinate.
</blockquote>

IN: <tt>Dimension maxY</tt>
<blockquote>
  The maximum <tt>y</tt> coordinate.
</blockquote>

IN/UTIL: <tt>RandomNumberGenerator&amp; gen</tt>
<blockquote>
A random number generator that will be used to place vertices. The
type <tt>RandomNumberGenerator</tt> must model the <a
href="../../random/random-concepts.html#number_generator">NumberGenerator</a>
concept. 
</blockquote>

<H3>Complexity</H3>
<P> The time complexity is <i>O(|V|)</i>.

<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University
</TD></TR></TABLE>

</BODY>
</HTML>