41 lines
1.5 KiB
TeX
41 lines
1.5 KiB
TeX
\startenvironment tikz
|
|
|
|
\usemodule[tikz]
|
|
\usetikzlibrary[automata, arrows, positioning, matrix, fit, decorations.pathreplacing]
|
|
|
|
\usemodule[pgfplots]
|
|
|
|
% defaults
|
|
\tikzset{node distance=2cm} % 'shorten >=2pt' only for automata
|
|
\tikzset{/pgfplots/table/search path={data,../data}}
|
|
\tikzset{initial text=, every initial by arrow/.style={shorten >=1pt}}
|
|
|
|
% observation table
|
|
\tikzset{obs table/.style={matrix of math nodes, ampersand replacement=\&, column 1/.style={anchor=base west}}}
|
|
|
|
\tikzset{trans/.style={->, shorten >=1pt}}
|
|
|
|
% This command is used to draw the internal data structure for the minimal separating sequences paper
|
|
\define[5]\gasblock{
|
|
\fill (#1-0.495,{(3-#3)*0.75+0.5}) [rounded corners=0.2cm] -- (#1-0.495,{(3-#3)*0.75+0.655}) -- (#2-0.505,{(3-#3)*0.75+0.655}) [sharp corners] -- (#2-0.505,{(3-#3)*0.75+0.5}) [rounded corners=0.2cm] -- (#2-0.505,{(3-#3)*0.75+0.645}) -- (#1-0.495,{(3-#3)*0.75+0.645}) [sharp corners] -- cycle;
|
|
\draw ({(#1+#2)/2-0.5},{(3-#3)*0.75+0.65}) node[fill=white] (B#4) {{$B_{#4}$} {$\scriptscriptstyle #5$}};
|
|
}
|
|
|
|
\define[4]\splitnode{
|
|
\node (#1) [#4] {$#2$};
|
|
\node (#1s) [below=-2pt of #1] {$#3$};
|
|
}
|
|
\define[5]\adsnode{
|
|
\node (#1) [align=center,#5] {$I = #2$ \\ $C = #3$};
|
|
\node (#1s) [below=-2pt of #1] {$#4$};
|
|
}
|
|
|
|
% Used to draw extended cells in observation tables for the learning nominal automata paper
|
|
\define[1]\NomCell{
|
|
\startmathcases[numberdistance=0pt]
|
|
\NC 1 \NC if $#1$ \NR
|
|
\NC 0 \NC else \NR
|
|
\stopmathcases
|
|
}
|
|
|
|
\stopenvironment
|