% -*- coding: UTF-8 -*-

\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{pstricks}
\usepackage{rotating}
\usepackage{boxedminipage}
\usepackage{threeparttable}
\usepackage{subfig}
\usepackage{array}
\usepackage{mathabx}
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{times}
\usepackage[toc,page]{appendix}

\usepackage{fancyhdr}
\usepackage{lastpage}

\usepackage{tikz}
\usetikzlibrary{shapes,calc,through,backgrounds,arrows,positioning,fit}

\usepackage[final]{hyperref}

%\newtheorem{law}{\bf Law}[chapter]
%\newtheorem{defn}{\bf Definition}[chapter]
%\newtheorem{lem}{\bf Lemma}[chapter]
%\newtheorem{cor}{\bf Corollary}[chapter]
%\newtheorem{thm}{\bf Theorem}[chapter]
%\newtheorem{ppy}{\bf Property}[chapter]
%\newtheorem{ppn}{\bf Proposition}[chapter]
%\newtheorem{conj}{\bf Conjecture}[chapter]
%\newtheorem{rem}{\bf Remark}[chapter]
%\newtheorem{exmp}{\bf Example}[chapter]
%\newtheorem{Rule}{\bf Rule}[chapter]
%\newtheorem{cnd}{\bf Condition}[chapter]

\newenvironment{pf}[1][]{{\noindent \bf Proof. #1 }}{\hfill $\blacksquare$\\ }
\newenvironment{pfof}[1][]{{\noindent \bf Proof of #1:}}{\hfill $\blacksquare$\\ }
\newenvironment{skpf}[1][]{{\noindent \bf Sketch of proof. #1 }}{\hfill $\blacksquare$\\ }
% \newenvironment{res}[1p][]{\noindent \begin{boxedminipage}{\textwidth} \bf
% Abstract. \normalfont #1 }{\end{boxedminipage} \newpage}

\newcommand{\Pred}{\mbox{\upshape Pred}}
\newcommand{\e}[1]{\emph{#1}}
\newcommand{\m}[1]{\mathcal{#1}}
\newcommand{\mbf}[1]{\mathbf{#1}}
\newcommand{\tabl}[1]{table~\ref{#1}}
\newcommand{\Tab}[1]{Table~\ref{#1}}
\newcommand{\fig}[1]{figure~\ref{#1}}
\newcommand{\Fig}[1]{Figure~\ref{#1}}
\newcommand{\eq}[1]{equation~\ref{#1}}
\newcommand{\Eq}[1]{Equation~\ref{#1}}
\newcommand{\Algo}[1]{Algorithm~\ref{#1}}
\newcommand{\algo}[1]{algorithm~\ref{#1}}
\newcommand{\Proc}[1]{Procedure~\ref{#1}}
\newcommand{\proc}[1]{procedure~\ref{#1}}
\newcommand{\Chap}[1]{Chapter~\ref{#1}}
\newcommand{\chap}[1]{chapter~\ref{#1}}
\newcommand{\Ann}[1]{Appendix~\ref{#1}}
\newcommand{\ann}[1]{appendix~\ref{#1}}
\newcommand{\Dff}[1]{Definition~\ref{#1}}
\newcommand{\dff}[1]{definition~\ref{#1}}
\newcommand{\Rle}[1]{rule~\ref{#1}}
\newcommand{\rle}[1]{rule~\ref{#1}}

\newcommand{\tikzCPT}[5]{\textbf{#1}}
% \newcommand{\tikzCPT}[5]{\textbf{#1} \nodepart{second} \begin{tabular}{l r}#2
% & #3 \\ #4 & #5\end{tabular}}

% SUM macros
\def\SoC{\ensuremath{\mathbb{C}}}
\def\SoI{\ensuremath{\mathbb{I}}}
\def\class#1{\ensuremath{\mathcal{#1}}}
\def\SoO#1{\ensuremath{\mathbb{O}(\class{#1})}}
\def\closure#1{\ensuremath{\overline{\SoA{#1}}}}
\def\system#1{\ensuremath{\mathit{#1}}}
\def\interface#1{\ensuremath{\mathcal{#1}}}
\def\dynclass#1{\mbox{\fontsize{8}{10}\selectfont%
    \ensuremath{\widehat{\mathcal{#1}}}}}
\def\scriptdynclass#1{\mbox{\fontsize{6}{8}\selectfont%
    \ensuremath{\widehat{\mathcal{#1}}}}}
\def\instance#1{\mbox{\ensuremath{#1}}}
\def\SO#1{\ensuremath{{\mathbf #1}}}
\def\So#1#2{\ensuremath{{\mathbf #1}(\class{#2})}}
\def\SoR#1{\ensuremath{{\mathbf R}(\class{#1})}}
\def\SoA#1{\ensuremath{{\mathbf A}(\class{#1})}}
\def\SoIn#1{\ensuremath{{\mathbf I}(\class{#1})}}
\def\SoOut#1{\ensuremath{{\mathbf O}(\class{#1})}}
\def\SoExt#1{\ensuremath{{\mathbf E}(\class{#1})}}
\def\SoP#1{\ensuremath{{\mathbf P}(\class{#1})}}
\def\Pa#1{\ensuremath{\Pi_{#1}}}
\def\PC#1{\ensuremath{P\!\left(#1 \!\!\mid\!\! \Pa{#1}\right)}}
\def\smallclass#1{\scriptsize\class{#1}}
\newlength{\boldlength}
\def\mybold#1{%
  \settowidth{\boldlength}{$\mathcal#1$}%
  \addtolength{\boldlength}{-.55pt}%
  \hbox{$\mathcal#1$\hspace*{-\boldlength}$\mathcal#1$}%
}
\def\AAA{\mathcal{A}}
\def\DDD{\mathcal{D}}
\def\EEE{\mathcal{E}}
\def\GGG{\mathcal{G}}
\def\III{\mathcal{I}}
\def\LLL{\mathcal{L}}
\def\MMM{\mathcal{M}}
\def\PPP{\mathcal{P}}
\def\QQQ{\mathcal{Q}}
\def\RRR{\mathcal{R}}
\def\SSS{\mathcal{S}}
\def\UUU{\mathcal{U}}
\def\VVV{\mathcal{V}}
\def\WWW{\mathcal{W}}
\def\XXX{\mathcal{X}}
\newcommand{\subst}[1]{\SSS(#1)}
\newcommand{\comp}[1]{|\mbox{Comp}(#1)|}
\def\BG{\mybold{B}\mybold{G}}

% Operators
\def\ci{\perp\!\!\!\perp}
\def\ii{1\!\!1}

% Latin shorthands
\def\ie{i.e., }
\def\eg{e.g., }
\def\cf{cf. }
\def\st{, s.t.~}
\def\etc{etc.}
\def\ect{etc.}

% Graph notation shorthands
\def\ra{\rightarrow}
\def\la{\leftarrow}
\def\lra{\leftrightarrow}
\def\uG{\ensuremath{G}}
\def\dG{\ensuremath{\vec{G}}}
\newcommand{\pa}[1]{\pi(#1)}
\newcommand{\ch}[1]{\mbox{Ch}(#1)}
\newcommand{\bnd}[1]{\mbox{Boundary}_{#1}}
\newcommand{\nghb}[1]{\mbox{Nghbrs}_{#1}}
\newcommand{\dgr}[1]{\mbox{Degree}_{#1}}
\newcommand{\idgr}[1]{\mbox{OutDegree}_{#1}}
\newcommand{\odgr}[1]{\mbox{InDegree}_{#1}}
\newcommand{\anc}[1]{\mbox{Ancestors}_{#1}}
\newcommand{\dec}[1]{\mbox{Descendants}_{#1}}
\newcommand{\nondec}[1]{\mbox{NonDescendants}_{#1}}
\newcommand{\imap}[1]{\ensuremath{\m{I}(#1)}}

% Sets
\def\BFA{\ensuremath{\mathbf{A}}}
\def\BFC{\ensuremath{\mathbf{C}}}
\def\BFD{\ensuremath{\mathbf{D}}}
\def\BFE{\ensuremath{\mathbf{E}}}
\def\BFG{\ensuremath{\mathbf{G}}}
\def\BFI{\ensuremath{\mathbf{I}}}
\def\BFK{\ensuremath{\mathbf{K}}}
\def\BFL{\ensuremath{\mathbf{L}}}
\def\BFM{\ensuremath{\mathbf{M}}}
\def\BFP{\ensuremath{\mathbf{P}}}
\def\BFQ{\ensuremath{\mathbf{Q}}}
\def\BFR{\ensuremath{\mathbf{R}}}
\def\BFS{\ensuremath{\mathbf{S}}}
\def\BFT{\ensuremath{\mathbf{T}}}
\def\BFU{\ensuremath{\mathbf{U}}}
\def\BFV{\ensuremath{\mathbf{V}}}
\def\BFW{\ensuremath{\mathbf{W}}}
\def\BFX{\ensuremath{\mathbf{X}}}
\def\BFY{\ensuremath{\mathbf{Y}}}
\def\BFZ{\ensuremath{\mathbf{Z}}}
\def\BFa{\ensuremath{\mathbf{A}}}
\def\BFd{\ensuremath{\mathbf{d}}}
\def\BFe{\ensuremath{\mathbf{e}}}
\def\BFg{\ensuremath{\mathbf{g}}}
\def\BFi{\ensuremath{\mathbf{i}}}
\def\BFl{\ensuremath{\mathbf{l}}}
\def\BFm{\ensuremath{\mathbf{m}}}
\def\BFp{\ensuremath{\mathbf{p}}}
\def\BFq{\ensuremath{\mathbf{q}}}
\def\BFr{\ensuremath{\mathbf{r}}}
\def\BFs{\ensuremath{\mathbf{s}}}
\def\BFt{\ensuremath{\mathbf{t}}}
\def\BFu{\ensuremath{\mathbf{u}}}
\def\BFv{\ensuremath{\mathbf{v}}}
\def\BFw{\ensuremath{\mathbf{w}}}
\def\BFx{\ensuremath{\mathbf{x}}}
\def\BFy{\ensuremath{\mathbf{y}}}
\def\BFz{\ensuremath{\mathbf{z}}}

\def\BFPSI{\ensuremath{\mathbf{\Psi}}}

% Cliques
\def\C1{\ensuremath{\mathbf{C}_1}}
\def\CK{\ensuremath{\mathbf{C}_K}}
\def\Ci{\ensuremath{\mathbf{C}_i}}
\def\Cj{\ensuremath{\mathbf{C}_j}}
\def\Cn{\ensuremath{\mathbf{C}_n}}

% PRMs
\newcommand{\cl}[1]{\ensuremath{\mathcal{#1}}}
\newcommand{\at}[1]{\ensuremath{#1}}
\newcommand{\rf}[1]{\ensuremath{#1}}
\newcommand{\rsc}[1]{\ensuremath{\mathbf{#1}}}
\newcommand{\attr}[1]{\ensuremath{\mathcal{A}(#1)}}
\newcommand{\refs}[1]{\ensuremath{\mathcal{R}(#1)}}
\newcommand{\dom}[1]{\ensuremath{domain(#1)}}
\newcommand{\rng}[1]{\ensuremath{range(#1)}}
\newcommand{\inst}[1]{\ensuremath{\mathbb{I}_{\cl{S}}(#1)}}
\newcommand{\type}[1]{\ensuremath{\m{T}(#1)}}

\def\super{\ensuremath{\triangleright}}
\def\sub{\ensuremath{\triangleleft}}
\def\usuper{\ensuremath{\blacktriangleright}}
\def\usub{\ensuremath{\blacktriangleleft}}
\def\Dgf{Domain generalization function}
\def\Dgfs{Domain generalization functions}
\def\dgf{domain generalization function}
\def\dgfs{domain generalization functions}

% BN notation
\newcommand{\dsep}[3]{\mbox{d-sep}(#1;#2|#3)}
\newcommand{\val}[1]{\mbox{Val}({#1})}
\newcommand{\scope}[1]{\mbox{Scope}({#1})}

\def\BN{BN}
\def\BNs{BNs}
\def\MN{MN}
\def\MNs{MNs}
\def\PGM{PGM}
\def\PGMs{PGMs}
\def\PRM{PRM}
\def\PRMs{PRMs}
\def\rv{random variable}
\def\rvs{random variables}
\def\Rv{Random variable}
\def\Rvs{Random variables}
\def\cpt{CPT}
\def\cpts{CPTs}
\def\Cpt{CPT}
\def\Cpts{CPTs}
\def\cpd{conditional probability distribution}
\def\cpds{conditional probability distributions}
\def\jpd{joint probability distribution}
\def\jpds{joint probability distributions}
\def\wrt{with respect to}
\def\noisy{\e{Noisy-or}}
\def\Noisy{\e{Noisy-or}}
\def\nand{\e{Noisy-and}}
\def\Nand{\e{Noisy-and}}
\def\AI{AI}
\def\Dsepa{D-Separation}
\def\dsepa{D-Separation}
\def\VE{VE}
\def\VEBB{VEBB}
\def\SS{SS}
\def\Jt{Junction tree}
\def\jt{junction tree}
\def\Jts{Junction trees}
\def\jts{junction trees}
\def\Rip{Running intersection property}
\def\rip{running intersection property}

\def\OO{Object-Oriented}
\def\Oo{Object-oriented}
\def\oo{object-oriented}
\def\FO{First-Order}
\def\Fo{First-order}
\def\fo{first-order}
\def\ER{Entity-Relationship}
\def\Er{Entity-relationship}
\def\er{entity-relationship}

\def\DBN{DBN}
\def\DBNs{DBNs}
\def\dBN{DBN}
\def\dBNs{DBNs}

\def\MSBN{MSBN}
\def\MSBNs{MSBNs}
\def\MSDAG{MSDAG}
\def\MSDAGs{MSDAGs}

\def\OOBN{OOBN}
\def\OOBNs{OOBNs}
\def\oobnP{OOBNs \e{à la Pfeffer}}
\def\oobnB{OOBNs \e{à la Bangs\o{} \& Wuillemin}}

%\def\PERM{Probabilistic Entity-Relationship Model}
%\def\PERMs{Probabilistic Entity-Relationship Models}

\def\FOPM{FOPM}
\def\FOPMs{FOPMs}

\def\MEBN{MEBN}
\def\MEBNs{MEBNs}

\def\SVE{SVE}
\def\SPI{SPI}
\def\BB{BB}

\def\bigM{\ensuremath{\mathbf{M}}}
\def\bigS{\ensuremath{\mathbf{S}}}
\def\bigL{\ensuremath{\mathbf{L}}}
\def\dynCl#1{\ensuremath{\widehat{\mathcal{#1}}}}
% \def\dynCl#1{\mbox{\fontsize{8}{10}\selectfont%
%     \ensuremath{\widehat{\mathcal{#1}}}}}
%\newcommand{\integerset}[2]{\{#1, \ldots, #2\}}
\newcommand{\doverline}[1]{\overline{\overline{#1}}}

\def\keyw#1{{\bf #1}}
\def\tab{\hspace*{5mm}}
\def\myfunction#1#2{\vspace{1mm}\noindent\rule{0pt}{3.5mm}{\bf Fonction} {\tt#1}(#2)\\%
\begingroup\small\renewcommand{\extrarowheight}{0pt}%
\begin{tabular}{@{}l@{\ \ }l@{}}\hline}
\def\endmyfunction{\hline\end{tabular}\endgroup

\rule{0pt}{1.5mm}

\vspace{-1mm}
}

\hyphenation{baye-sian}

%macro for captions in minipage env.
\makeatletter
\def\captionof#1#2{{\def\@captype{#1}#2}}
\makeatother


\def\o3prmlogo{\includegraphics[width=2cm]{o3prm.png}}
\fancypagestyle{plain}{
  \fancyhf{}
  \fancyfoot[L]{
    \parbox[b]{\dimexpr\linewidth-2.5cm\relax}{ \ \\
    {\color{black}\rule{\dimexpr\linewidth\relax}{0.4pt}}\\
    \url{http://o3prm.lip6.fr} \hfill \sffamily \bfseries\hfill \thepage/\pageref*{LastPage}}
  }
  \fancyfoot[R]{
    \raisebox{-5mm}{\o3prmlogo}
  }
}

\pagestyle{plain}
