% Macros
%
% (c) Matthieu Guerquin-Kern, 2007.08.29

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Latin
\def\apriori{\emph{a priori }}
\def\aposteriori{\emph{a posteriori }}
\def\acontrario{\emph{a contrario }}          % from the opposite
\def\afortiori{\emph{a fortiori }}                 % from the stronger
\def\adlib{\emph{ad lib }}						   % "ad libitum": "toward pleasure"
\def\cf{\emph{cf. }}									   % "confer": bring together, compare, consult
\def\eg{\emph{e.g. }}                                  % "exempli gratia" (for example)
\def\ie{\emph{i.e. }}									   % "id est" (that is)
\def\rda{\emph{reductio ad absurdum }}    % proof by contradiction
\def\etal{\emph{et al. }}                              % "et alii": "and the rest" for a list of names
\def\dixit{\emph{dixit }}                             % said
\def\infine{\emph{i.f. }}                               % in fine: in the end
\def\nb{\emph{n.b. }}								    % nota bene: mark well, please note, note it well
\def\vs{\emph{vs }}                                    % versus

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sets
\def\N{\mathbb N}
\def\Z{\mathbb Z}
\def\Q{\mathbb Q}
\def\R{\mathbb R}
\def\C{\mathbb C}
\def\K{\mathbb K}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Misc maths
\def\1{\mathbbmtt 1}                       % indicatrice
\def\P{\mathbbmtt P}
\newcommand{\transp}[1]{{\vphantom{#1}}^{\mathit t}{#1}}
\newcommand{\transpH}[1]{{#1}^{\mathit H}}
\newcommand{\argmin}{\mathrm{arg}\,\mathop{\mathrm{min}}}
\newcommand{\argmax}{\mathrm{arg}\,\mathop{\mathrm{max}}}
\newcommand{\ud}{\mathrm{d}}          % differential symbol in integrals
\newcommand{\ui}{\mathrm{i}}            % index "i" of complex notation
\newcommand{\uj}{\mathrm{j}}            % index "j" of complex notation
\newcommand{\bino}[2]{C_{#2}^{#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Linear algebra
\newcommand{\vc}[1]{\mathbf #1}
\newcommand{\vct}[1]{{\pmb #1}}
\newcommand{\ma}[1]{\mathbf #1}
\newcommand{\pscal}[2]{\left\langle #1 | #2 \right\rangle}
\newcommand{\norm}[1]{\left\| #1 \right\|}
\newcommand{\conj}[1]{\overline{#1}}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THEOREM Environments ---------------------------------------------------
%\newenvironment{proof}{\textbf{Proof: }}{ \quad \hfill $\Box$\paragraph{}}
%\newtheorem{theorem}{Theorem}
%\newtheorem{corolary}[theorem]{Corollary}
%\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
%\newtheorem{definition}{Definition}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Figures (some of these macros come from T. Blu)
\newcommand{\pdffig}[3]{
% 1-st argument: scale
% 2nd argument: file name (also used for labelling)
% 3rd argument: caption
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=#1\textwidth]{./images/#2.pdf}
\caption{#3.}
\label{#2}
\end{center}
\end{figure}
}

\thinlines
\setlength{\unitlength}{0.6mm}
\newcommand{\reffig}[1]{(Fig. \ref{#1})}

  \put(0,32){\circle*{3}}
  \put(32,0){\circle*{3}}
  \put(16,32){\circle*{3}}
  \put(32,16){\circle*{3}}
  \put(32,32){\circle*{3}}
\end{picture}}

\newcommand{\gridD}[0]{\begin{picture}(55,55)
  \put(8,8){\circle*{3}}
  \put(24,24){\circle*{3}}
  \put(8,24){\circle*{3}}
  \put(24,8){\circle*{3}}
  \put(40,40){\circle*{3}}
  \put(8,40){\circle*{3}}
  \put(40,8){\circle*{3}}
  \put(24,40){\circle*{3}}
  \put(40,24){\circle*{3}}
\end{picture}}

\newcommand{\grid}[0]{\begin{picture}(55,55)
  \put(0,8){\circle*{3}}
  \put(0,24){\circle*{3}}
  \put(0,40){\circle*{3}}
  \put(8,0){\circle*{3}}
  \put(24,0){\circle*{3}}
  \put(40,0){\circle*{3}}
  \put(8,16){\circle*{3}}
  \put(8,32){\circle*{3}}
  \put(16,8){\circle*{3}}
  \put(16,24){\circle*{3}}
  \put(16,40){\circle*{3}}
  \put(24,16){\circle*{3}}
  \put(24,32){\circle*{3}}
  \put(32,8){\circle*{3}}
  \put(32,24){\circle*{3}}
  \put(32,40){\circle*{3}}
  \put(40,16){\circle*{3}}
  \put(40,32){\circle*{3}}
\end{picture}}

\newcommand{\grilleTpsFreq}[2]{\begin{picture}(100,90)
\put(10,5){\vector(1,0){80}}
\put(100,5){\makebox(0,0)[r]{$#1$}}
\put(10,5){\vector(0,1){80}}
\put(7,80){\makebox(0,0)[r]{$#2$}}
\end{picture}}

\newcommand{\grilleHaar}[2]{\begin{picture}(35,35)
\put(0,5){\vector(1,0){35}}
\put(5,0){\vector(0,1){35}}
\put(4,25){\line(1,0){2}}
\put(25,4){\line(0,1){2}}
\put(0,0){\makebox(0,0)[l]{$0$}}
\put(0,25){\makebox(0,0)[c]{$1$}}
\put(25,0){\makebox(0,0)[c]{$1$}}
\put(35,10){\makebox(0,0)[r]{$#1$}}
\put(7,29){\makebox(20,10)[l]{$#2$}}
\end{picture}}

\newcommand{\grilleHaarOnd}[2]{\begin{picture}(35,55)
\put(0,25){\vector(1,0){35}}
\put(5,0){\vector(0,1){55}}
\put(4,5){\line(1,0){2}}
\put(4,45){\line(1,0){2}}
\put(25,24){\line(0,1){2}}
\put(0,20){\makebox(0,0)[l]{$0$}}
\put(3,45){\makebox(0,0)[r]{$1$}}
\put(3,5){\makebox(0,0)[r]{$-1$}}
\put(25,30){\makebox(0,0)[c]{$1$}}
\put(35,30){\makebox(0,0)[r]{$#1$}}
\put(7,49){\makebox(20,10)[l]{$#2$}}
\end{picture}}

\newcommand{\axeProjHarr}[2]{\begin{picture}(95,50)
\put(0,5){\vector(1,0){95}}
\put(5,0){\vector(0,1){50}}
\put(0,1){\makebox(0,0)[l]{$0$}}
\multiput(4,10)(0,5){8}{\line(1,0){2}}
\multiput(10,4)(5,0){16}{\line(0,1){2}}
\put(0,15){\makebox(0,0)[c]{$0.5$}}
\put(0,25){\makebox(0,0)[c]{$1$}}
\put(0,35){\makebox(0,0)[c]{$1.5$}}
\put(0,45){\makebox(0,0)[c]{$2$}}
\put(15,1){\makebox(0,0)[c]{$1$}}
\put(25,1){\makebox(0,0)[c]{$2$}}
\put(35,1){\makebox(0,0)[c]{$3$}}
\put(45,1){\makebox(0,0)[c]{$4$}}
\put(55,1){\makebox(0,0)[c]{$5$}}
\put(65,1){\makebox(0,0)[c]{$6$}}
\put(75,1){\makebox(0,0)[c]{$7$}}
\put(85,1){\makebox(0,0)[c]{$8$}}
\put(95,10){\makebox(0,0)[r]{$#1$}}
\put(7,45){\makebox(20,10)[l]{$#2$}}
\end{picture}}

\newcommand{\axeProjHarrOnd}[2]{\begin{picture}(95,50)
\put(5,25){\vector(1,0){90}}
\put(5,0){\vector(0,1){50}}
\put(3,25){\makebox(0,0)[r]{$0$}}
\multiput(4,10)(0,5){8}{\line(1,0){2}}
\multiput(10,24)(5,0){16}{\line(0,1){2}}
\put(3,15){\makebox(0,0)[r]{$-0.5$}}
\put(3,5){\makebox(0,0)[r]{$-1$}}
\put(3,35){\makebox(0,0)[r]{$0.5$}}
\put(3,45){\makebox(0,0)[r]{$1$}}
\put(86,21){\makebox(0,0)[l]{$8$}}
\put(95,30){\makebox(0,0)[r]{$#1$}}
\put(7,45){\makebox(20,10)[l]{$#2$}}
\end{picture}}
