| igraph Reference Manual |
|---|
int igraph_layout_grid_fruchterman_reingold(const igraph_t *graph, igraph_matrix_t *res, igraph_integer_t niter, igraph_real_t maxdelta, igraph_real_t area, igraph_real_t coolexp, igraph_real_t repulserad, igraph_real_t cellsize, igraph_bool_t use_seed);
This algorithm is the same as the Fruchterman-Reingold layout generator, but it partitions the 2d space to a grid and and vertex repulsion is calculated only for vertices nearby.
Arguments:
graph: |
The graph object. |
res: |
The result, the coordinates in a matrix. The parameter should point to an initialized matrix object and will be resized. |
niter: |
Number of iterations to perform. |
maxdelta: |
Maximum distance to move a vertex in an iteration. |
area: |
The area of the square on which the vertices will be placed. |
coolexp: |
The cooling exponent. |
repulserad: |
Determines the radius at which vertex-vertex repulsion cancels out attraction of adjacenct vertices. |
cellsize: |
The size of the grid cells. |
use_seed: |
Logical, if true, the coordinates passed in |
Returns:
|
Error code. |
Added in version 0.2.
Time complexity: ideally (constant number of vertices in each cell) O(niter*(|V|+|E|)), in the worst case O(niter*(|V|^2+|E|)).
<< 1.7. igraph_layout_reingold_tilford_circular — Circular Reingold-Tilford layout for trees |
1.9. igraph_layout_lgl — Force based layout algorithm for large graphs. >> |