graph/doc/random_layout.html
Jeremiah Willcock 8b185359ef Fixed links to property_map library
[SVN r53475]
2009-05-31 01:32:55 +00:00

102 lines
2.7 KiB
HTML

<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/doc/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>