...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 VertexListAndIncidenceGraph, typename Topology, typename PositionMap, typename VertexIndexMap, typename EdgeWeightMap> void gursoy_atun_layout(const VertexListAndIncidenceGraph& g, const Topology& space, PositionMap position, int nsteps = num_vertices(g), double diameter_initial = sqrt((double)num_vertices(g)), double diameter_final = 1, double learning_constant_initial = 0.8, double learning_constant_final = 0.2, VertexIndexMap vertex_index_map = get(vertex_index, g), EdgeWeightMap weight = dummy_property_map());// Named parameter versiontemplate<typename VertexListAndIncidenceGraph, typename Topology, typename PositionMap, typename P, typename T, typename R> void gursoy_atun_layout(const VertexListAndIncidenceGraph& g, const Topology& space, PositionMap position, const bgl_named_params<P,T,R>& params =all defaults);

This algorithm [60]
performs layout of directed graphs, either weighted or unweighted. This
algorithm is very different from the Kamada-Kawai and Fruchterman-Reingold algorithms,
because it does not explicitly strive to layout graphs in a visually
pleasing manner. Instead, it attempts to distribute the vertices
uniformly within a *topology* (e.g., rectangle, sphere, heart shape),
keeping vertices close to their neighbors; various
topologies are provided by BGL, and users can also create their own. The
algorithm itself is
based on Self-Organizing
Maps.

The graph object on which the algorithm will be applied. The typeIN:Graphmust be a model of Vertex List Graph and Incidence Graph.

The topology on which the graph will be laid out. The type must model the Topology concept.OUT:

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.

The number of iterations to perform.IN:

Default:num_vertices(g)

When a vertex is selected to be updated, all vertices that are reachable from that vertex within a certain diameter (in graph terms) will also be updated. This diameter begins atIN:diameter_initialin the first iteration and ends atdiameter_finalin the last iteration, progressing exponentially. Generally the diameter decreases, in a manner similar to the cooling schedule in Fruchterman-Reingold. The diameter should typically decrease in later iterations, so this value should not be less thandiameter_final.

Default:sqrt((double)num_vertices(g))

The final value of the diameter.IN:

Default: 1.0

The learning rate affects how far vertices can moved to rearrange themselves in a given iteration. The learning rate progresses linearly from the initial value to the final value, both of which should be between 0 and 1. The learning rate should typically decrease, so the initial value should not exceed the final value.IN:

Default: 0.8

The final learning rate constant.IN:

Default: 0.2

This maps each vertex to an integer in the rangeIN:[0, num_vertices(g)). This is only necessary when no displacement map is provided. The typeVertexIndexMapmust be a model of Readable Property Map. The value type of the map must be an integer type. The vertex descriptor type of the graph needs to be usable as the key type of the map.

Default:get(vertex_index, g)Note: if you use this default, make sure your graph has an internalvertex_indexproperty. For example,adjacency_listwithVertexList=listSdoes not have an internalvertex_indexproperty.

This maps each edge to a weight. The typeEdgeWeightMapmust be a model of Readable Property Map. The value type of the map must be an floating-point type compatible withdouble. The edge descriptor type of the graph needs to be usable as the key type of the map. When this map is adummy_property_map, the algorithm assumes the graph is unweighted.

Default:dummy_property_map()

Executes the algorithm forIN:niterations.

Default:num_vertices(g)

Range specifying the parameters (IN:diameter_initial,diameter_final).

Default:std::make_pair(sqrt((double)num_vertices(g)), 1.0)

Range specifying the parameters (IN:learning_constant_initial,learning_constant_final).

Default:std::make_pair(0.8, 0.2)

Equivalent to the non-namedIN:weightparameter.

Default:dummy_property_map()

Equivalent to the non-namedvertex_index_mapparameter.

Default:get(vertex_index, g)Note: if you use this default, make sure your graph has an internalvertex_indexproperty. For example,adjacency_listwithVertexList=listSdoes not have an internalvertex_indexproperty.

Copyright © 2004 Trustees of Indiana University |
Jeremiah Willcock, Indiana University () Doug Gregor, Indiana University () Andrew Lumsdaine, Indiana University () |