mirror of
https://github.com/boostorg/graph.git
synced 2025-05-11 13:24:01 +00:00
102 lines
2.7 KiB
HTML
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<typename Graph, typename PositionMap, typename Dimension,
|
|
typename RandomNumberGenerator>
|
|
void
|
|
random_graph_layout(const Graph& g, PositionMap position_map,
|
|
Dimension minX, Dimension maxX,
|
|
Dimension minY, Dimension maxY,
|
|
RandomNumberGenerator& 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& 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& 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 © 2004</TD><TD>
|
|
<A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University
|
|
</TD></TR></TABLE>
|
|
|
|
</BODY>
|
|
</HTML>
|