Skip to content

Commit

Permalink
DOC: Improve the example file.
Browse files Browse the repository at this point in the history
Put node types, edge types and other utilities into separate
tables. Add explicit examples of different edge types. For
instance, how to draw undirected edges (without arrow).
  • Loading branch information
jluttine committed Aug 20, 2013
1 parent 5e9c5e0 commit fbde46a
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions example.tex
Expand Up @@ -63,17 +63,53 @@
\tikz{ %
\node[factor] [label=$\mathcal{N}$] {}; %
}
\end{tabular}
\end{center}
\end{table}
\begin{table}[ht]
\caption{Edge types}
\begin{center}
\begin{tabular}{llc}
Type & Syntax & Output
\\
Factor with nodes &
&
\hline
Directed edges &
\texttt{\textbackslash edge[opts]\{inputs\}\{outputs\}} &
\tikz{ %
\node[obs] (y) {$y$} ; %
\node[latent, left=of y, yshift=0.5cm] (mu) {$\mu$} ; %
\node[latent, left=of y, yshift=-0.5cm] (tau) {$\tau$} ; %
\edge {mu,tau} {y} ; %
}
\\
Undirected edges &
\texttt{\textbackslash edge[-,opts]\{inputs\}\{outputs\}} &
\tikz{ %
\node[obs] (y) {$y$} ; %
\node[latent, left=of y, yshift=0.5cm] (mu) {$\mu$} ; %
\node[latent, left=of y, yshift=-0.5cm] (tau) {$\tau$} ; %
\edge[-] {mu,tau} {y} ; %
}
\\
Factor graph edges &
\texttt{\textbackslash factoredge[opts]\{inputs\}\{via\}\{outputs\}} &
\tikz{ %
\node[obs] (y) {$y$} ; %
\node[latent, left=of y, yshift=0.5cm] (mu) {$\mu$} ; %
\node[latent, left=of y, yshift=-0.5cm] (tau) {$\tau$} ; %
\factor[left=of y] {y-factor} {$\mathcal{N}$} {} {};
\factoredge {mu,tau} {y-factor} {y} ; %
}
\end{tabular}
\end{center}
\end{table}
\begin{table}[ht]
\caption{Utilities}
\begin{center}
\begin{tabular}{llc}
Type & Syntax & Output
\\
\hline
Plate &
\texttt{\textbackslash plate} &
\tikz{ %
Expand Down

0 comments on commit fbde46a

Please sign in to comment.