aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
dotStyle.h
Go to the documentation of this file.
1/****************************************************************************
2 * This file is part of the aGrUM/pyAgrum library. *
3 * *
4 * Copyright (c) 2005-2026 by *
5 * - Pierre-Henri WUILLEMIN(_at_LIP6) *
6 * - Christophe GONZALES(_at_AMU) *
7 * *
8 * The aGrUM/pyAgrum library is free software; you can redistribute it *
9 * and/or modify it under the terms of either : *
10 * *
11 * - the GNU Lesser General Public License as published by *
12 * the Free Software Foundation, either version 3 of the License, *
13 * or (at your option) any later version, *
14 * - the MIT license (MIT), *
15 * - or both in dual license, as here. *
16 * *
17 * (see https://agrum.gitlab.io/articles/dual-licenses-lgplv3mit.html) *
18 * *
19 * This aGrUM/pyAgrum library is distributed in the hope that it will be *
20 * useful, but WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
21 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
26 * OTHER DEALINGS IN THE SOFTWARE. *
27 * *
28 * See LICENCES for more details. *
29 * *
30 * SPDX-FileCopyrightText: Copyright 2005-2026 *
31 * - Pierre-Henri WUILLEMIN(_at_LIP6) *
32 * - Christophe GONZALES(_at_AMU) *
33 * SPDX-License-Identifier: LGPL-3.0-or-later OR MIT *
34 * *
35 * Contact : info_at_agrum_dot_org *
36 * homepage : http://agrum.gitlab.io *
37 * gitlab : https://gitlab.com/agrumery/agrum *
38 * *
39 ****************************************************************************/
40
56#ifndef GUM_DOT_STYLE_H
57#define GUM_DOT_STYLE_H
58
59#include <string>
60
61#include <agrum/agrum.h>
62
63#include <string_view>
64
65namespace gum::dot {
66
76 struct GUM_SHARED_PUBLIC DotStyle {
78 std::string size;
80 std::string rankDir;
82 std::string layout;
84 std::string arcColor;
86 std::string nodeBgColor;
88 std::string nodeFgColor;
89
91 static DotStyle read();
94 static DotStyle readCredalNet();
95 };
96
99 struct GUM_SHARED_PUBLIC JunctionTreeDotStyle: DotStyle {
101 bool withNames{true};
102 std::string separatorBgColor;
103 std::string separatorFgColor;
105 std::string cliqueBgColor;
106 std::string cliqueFgColor;
109 double mapCliqueScale{0.};
111 double mapSepScale{0.};
113 double mapEdgeLen{0.};
115 std::string mapSize;
116
117 static JunctionTreeDotStyle read();
118 };
119
122 struct GUM_SHARED_PUBLIC FactorGraphDotStyle: DotStyle {
123 std::string factorBgColor;
125 std::string factorFgColor;
127 double edgeLength{0.};
128
129 static FactorGraphDotStyle read();
130 };
131
133 struct GUM_SHARED_PUBLIC InfluenceDiagramDotStyle: DotStyle {
134 std::string chanceBgColor;
135 std::string chanceFgColor;
136 std::string chanceShape;
137 std::string utilityBgColor;
138 std::string utilityFgColor;
139 std::string utilityShape;
140 std::string decisionBgColor;
141 std::string decisionFgColor;
142 std::string decisionShape;
144 std::string decisionArcStyle;
146 std::string utilityArcStyle;
147
149 };
150
153 struct GUM_SHARED_PUBLIC CausalDotStyle: DotStyle {
154 std::string latentBgColor;
155 std::string latentFgColor;
157 bool showLatentNames{false};
158
159 static CausalDotStyle read();
160 };
161
164 struct GUM_SHARED_PUBLIC DynamicBNDotStyle: DotStyle {
166 std::string timeSliceBgColor;
170 std::string atemporalBgColor;
171
172 static DynamicBNDotStyle read();
173 };
174
190 GUM_SHARED_PUBLIC std::string configFgColor(std::string_view section, std::string_view key);
191
192} // namespace gum::dot
193
194#endif // GUM_DOT_STYLE_H
std::string configFgColor(std::string_view section, std::string_view key)
A font color of the configuration, resolved against the background color which goes with it.
Definition dotStyle.cpp:78
The style of a causal model (section causal): nodeBgColor and nodeFgColor are the ones of the observe...
Definition dotStyle.h:153
std::string latentBgColor
Definition dotStyle.h:154
std::string latentFgColor
Definition dotStyle.h:155
bool showLatentNames
show the names of the latent variables
Definition dotStyle.h:157
The look shared by all the graphs: size, direction, layout, colors of the arcs and of the nodes.
Definition dotStyle.h:76
std::string size
graphviz size of the graph, in inches (5, or 12! for an exact size)
Definition dotStyle.h:78
std::string nodeFgColor
font color of the nodes
Definition dotStyle.h:88
std::string layout
graphviz layout engine (dot, neato...)
Definition dotStyle.h:82
static DotStyle readCredalNet()
the style of the credal networks : the colors of the nodes are the ones of the section credalnet
Definition dotStyle.cpp:91
static DotStyle read()
the style of the graphs of the section notebook
Definition dotStyle.cpp:89
std::string rankDir
direction of the layout : TB (top-bottom) or LR (left-right)
Definition dotStyle.h:80
std::string nodeBgColor
background color of the nodes
Definition dotStyle.h:86
std::string arcColor
color of the arcs and edges, and of the border of the nodes
Definition dotStyle.h:84
The style of a dynamic Bayesian network (section dynamicBN) : the colors of its clusters.
Definition dotStyle.h:164
std::string atemporalBgColor
background color of the cluster of the atemporal variables
Definition dotStyle.h:170
static DynamicBNDotStyle read()
Definition dotStyle.cpp:168
std::string replicatedSliceBgColor
background color of the cluster of the replicated slice
Definition dotStyle.h:168
std::string timeSliceBgColor
background color of the cluster of a time slice
Definition dotStyle.h:166
The style of a factor graph (section factorgraph): layout, nodeBgColor and nodeFgColor are the ones o...
Definition dotStyle.h:122
double edgeLength
length of the edges
Definition dotStyle.h:127
std::string factorFgColor
the font color of the factors: adaptive against their background
Definition dotStyle.h:125
The style of an influence diagram (section influenceDiagram).
Definition dotStyle.h:133
std::string utilityArcStyle
graphviz style of the arcs pointing to a utility node
Definition dotStyle.h:146
std::string decisionArcStyle
graphviz style of the arcs pointing to a decision node
Definition dotStyle.h:144
static InfluenceDiagramDotStyle read()
Definition dotStyle.cpp:133
The style of a junction tree (section notebook): size is the size of the tree, not the one of its map...
Definition dotStyle.h:99
bool withNames
show the names of the variables in the cliques
Definition dotStyle.h:101
double mapEdgeLen
length of the edges in the map of a junction tree
Definition dotStyle.h:113
double mapCliqueScale
scale of the cliques in the map of a junction tree
Definition dotStyle.h:109
static JunctionTreeDotStyle read()
Definition dotStyle.cpp:98
double mapSepScale
scale of the separators in the map of a junction tree
Definition dotStyle.h:111
std::string mapSize
size of the map of a junction tree
Definition dotStyle.h:115