summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua
blob: b7bab37819169111e5cd58a6398982ba37742e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
-- Copyright 2013 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information

-- @release $Header$


local key           = require 'pgf.gd.doc'.key
local documentation = require 'pgf.gd.doc'.documentation
local summary       = require 'pgf.gd.doc'.summary
local example       = require 'pgf.gd.doc'.example


--------------------------------------------------------------------------------
key           "FMMMLayout"
summary       "The fast multipole multilevel layout algorithm."

documentation
[[
|FMMMLayout| implements a force-directed graph drawing
method suited also for very large graphs. It is based on a
combination of an efficient multilevel scheme and a strategy for
approximating the repulsive forces in the system by rapidly
evaluating potential fields.

The implementation is based on the following publication:
%
\begin{itemize}
  \item Stefan Hachul, Michael J\"unger: Drawing Large Graphs with
    a Potential-Field-Based Multilevel Algorithm. \emph{12th
      International Symposium on Graph Drawing 1998 (GD '04)},
      New York, LNCS 3383, pp. 285--295, 2004.
\end{itemize}
]]

example
[[
\tikz \graph [FMMMLayout] { a -- {b,c,d} -- e -- a };
]]


example
[[
\tikz [nodes={text height=.7em, text depth=.2em,
              draw=black!20, thick, fill=white, font=\footnotesize},
       >=spaced stealth', rounded corners, semithick]
  \graph [FMMMLayout, node sep=1mm, variation=2] {
    "5th Edition" -> { "6th Edition", "PWB 1.0" };
    "6th Edition" -> { "LSX",  "1 BSD", "Mini Unix", "Wollongong", "Interdata" };
    "Interdata" ->[orient=down] "Unix/TS 3.0",
    "Interdata" -> { "PWB 2.0", "7th Edition" };
    "7th Edition" -> { "8th Edition", "32V", "V7M", "Ultrix-11", "Xenix", "UniPlus+" };
    "V7M" -> "Ultrix-11";
    "8th Edition" -> "9th Edition";
    "1 BSD" -> "2 BSD" -> "2.8 BSD" -> { "Ultrix-11", "2.9 BSD" };
    "32V" -> "3 BSD" -> "4 BSD" -> "4.1 BSD" -> { "4.2 BSD", "2.8 BSD", "8th Edition" };
    "4.2 BSD" -> { "4.3 BSD", "Ultrix-32" };
    "PWB 1.0" -> { "PWB 1.2" -> "PWB 2.0", "USG 1.0" -> { "CB Unix 1", "USG 2.0" }};
    "CB Unix 1" -> "CB Unix 2" -> "CB Unix 3" -> { "Unix/TS++", "PDP-11 Sys V" };
    { "USG 2.0" -> "USG 3.0", "PWB 2.0", "Unix/TS 1.0" } -> "Unix/TS 3.0";
    { "Unix/TS++", "CB Unix 3", "Unix/TS 3.0" } ->
      "TS 4.0" -> "System V.0" -> "System V.2" -> "System V.3";
  };
]]
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
key           "FMMMLayout.randSeed"
summary       "Sets the random seed for the |FMMMLayout|."
documentation
[[
By changing this number, you can vary the appearance of the generated
graph drawing. This key is an alias for |random seed|, which in turn
can be set by using the |variation| key.
]]

example
[[
\tikz \graph [FMMMLayout, variation=1] { a -- {b,c,d} -- e -- a };
]]
example
[[
\tikz \graph [FMMMLayout, variation=2] { a -- {b,c,d} -- e -- a };
]]
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
key           "FMMMLayout.unitEdgeLength"
summary       "The ``ideal'' padding between two nodes."

documentation
[[
The algorithm will try to make the padding between any two vertices
this distance. Naturally, this is not always possible, so, normally,
distance will actually be different. This key is an alias for the more
natural |node sep|.
]]

example
[[
\tikz {
  \graph [FMMMLayout, node sep=1cm] { subgraph C_n[n=6]; };

  \draw [red, ultra thick, |-|] (1.south) -- ++(down:1cm);
}
]]
example
[[
\tikz {
  \graph [FMMMLayout, node sep=5mm] { subgraph C_n[n=6]; };

  \draw [red, ultra thick, |-|] (1.south) -- ++(down:5mm);
}
]]
--------------------------------------------------------------------------------


-- Local Variables:
-- mode:latex
-- End: