...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

// non-named parameter versiontemplate<typename Graph, typename PositionMap, typename Topology> void random_graph_layout(const Graph& g, PositionMap position_map, const Topology& space);

This algorithm places the points of the graph at random locations within a given space.

The graph object on which the algorithm will be applied. The typeIN/OUT:Graphmust be a model of Vertex And Edge List Graph.

The property map that stores the position of each vertex. The typeIN:PositionMapmust be a model of Lvalue Property Map such that the vertex descriptor type ofGraphis convertible to its key type. Its value type must beTopology::point_type, representing the coordinates of the vertex.

The topology used to lay out the vertices. This parameter describes both the size and shape of the layout area and provides a random number generator used to create random positions within the space. Topologies are described in more detail (with a list of BGL-provided topologies) in separate documentation.

The time complexity is *O(|V|)*.

Copyright © 2004, 2010 | Doug Gregor, Indiana University |