C++ Boost
random_graph_layout

// non-named parameter version
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);

This algorithm places the points of the graph at random locations.

Where Defined

boost/graph/random_layout.hpp

Parameters

IN: const Graph& g
The graph object on which the algorithm will be applied. The type Graph must be a model of Vertex And Edge List Graph.
IN/OUT: PositionMap position
The property map that stores the position of each vertex. The type PositionMap must be a model of Lvalue Property Map such that the vertex descriptor type of Graph is convertible to its key type. Its value type must be a structure with fields x and y, representing the coordinates of the vertex.
IN: Dimension minX
The minimum x coordinate.
IN: Dimension maxX
The maximum x coordinate.
IN: Dimension minY
The minimum y coordinate.
IN: Dimension maxY
The maximum y coordinate.
IN/UTIL: RandomNumberGenerator& gen
A random number generator that will be used to place vertices. The type RandomNumberGenerator must model the NumberGenerator concept.

Complexity

The time complexity is O(|V|).


Copyright © 2004 Doug Gregor, Indiana University