-
Notifications
You must be signed in to change notification settings - Fork 0
/
autolayout_options.go
54 lines (48 loc) · 1.42 KB
/
autolayout_options.go
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
package autog
import (
"github.com/nulab/autog/internal/graph"
imonitor "github.com/nulab/autog/internal/monitor"
cbreaking "github.com/nulab/autog/internal/phase1"
layering "github.com/nulab/autog/internal/phase2"
ordering "github.com/nulab/autog/internal/phase3"
positioning "github.com/nulab/autog/internal/phase4"
routing "github.com/nulab/autog/internal/phase5"
)
type options struct {
p1 cbreaking.Alg
p2 layering.Alg
p3 ordering.Alg
p4 positioning.Alg
p5 routing.Alg
params graph.Params
monitor imonitor.Monitor
output output
}
type output struct {
includeVirtual bool
}
var defaultOptions = options{
p1: cbreaking.Greedy,
p2: layering.NetworkSimplex,
p3: ordering.WMedian,
p4: positioning.SinkColoring,
p5: routing.Polyline,
params: graph.Params{
GreedyCycleBreakerRandomNodeChoice: false,
NetworkSimplexThoroughness: 28,
NetworkSimplexMaxIterFactor: 0,
NetworkSimplexBalance: graph.OptionNsBalanceV,
VirtualNodeFixedSize: 0.0,
WMedianMaxIter: 24,
NetworkSimplexAuxiliaryGraphWeightFactor: 4,
LayerSpacing: 150.0,
NodeSpacing: 60.0,
BrandesKoepfLayout: -1,
},
monitor: nil,
output: defaultOutputOptions,
}
var defaultOutputOptions = output{
includeVirtual: false,
}
type Option func(*options)