-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefinitions.tex
51 lines (43 loc) · 2.03 KB
/
definitions.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%% re-new commands
% short mathcal
\newcommand{\ca}[1]{{\mathcal #1}}
% mathcal letters
\newcommand{\R}{{\mathbb{R}}} % real numbers
\newcommand{\N}{{\mathbb{N}}} % natural numbers
\newcommand{\C}{{\mathbb{C}}} % complex numbers
\newcommand{\EE}{{\mathbb{E}}} % expectation, ...
\newcommand{\X}{{\mathbb{X}}} % input set
\newcommand{\Y}{{\mathbb{Y}}} % output set
\newcommand{\I}{{\mathbb{I}}} % index set
\renewcommand{\H}{{\mathbb{H}}} % entropy
\renewcommand{\O}{{\mathcal{O}}} % Landau O
%% new commands
\newcommand{\Rn}[1]{{\mathbb{R}^{ #1 }}} % real vector space
\newcommand{\tr}{{\mathrm{tr}}} % trace operator
\newcommand{\ind}{\raisebox{0.05em}{\ \rotatebox[origin=c]{90}{$\models$}}\ } % independence
\newcommand*\diff{\mathop{}\!\mathrm{d}} % integration: dx
\newcommand{\ipu}[2]{{\left< #1 \right>_ #2}} % inner product with subscript
\newcommand{\Ep}[2]{{\mathbb{E}_{#2} \left[#1\right]}} % expectation with subscript
\newcommand{\E}[1]{{\mathbb{E}\left[ #1 \right]}} % expectation
\newcommand{\ip}[1]{{\left< #1 \right>}} % inner product
\newcommand{\GP}{{\mathcal{GP}}} % Gaussian Process
\newcommand{\norm}[1]{{\left\| #1 \right\|}} % norm
%% delimiters
% https://tex.stackexchange.com/questions/151984/double-vertical-bar-notation
\DeclarePairedDelimiterX{\infdivx}[2]{(}{)}{%
#1\;\delimsize\|\;#2%
}
\newcommand{\kl}{D_{\mathrm{KL}}\infdivx} % kl-divergence
%% math operators
\DeclareMathOperator*{\argmax}{arg\,max} % argmax
\DeclareMathOperator*{\argmin}{arg\,min} % argmin
\DeclareMathOperator*{\var}{var} % variance
\DeclareMathOperator*{\cov}{cov} % covariance
% https://tex.stackexchange.com/a/68357/203421
\DeclareMathOperator*{\sumint}{%
\mathchoice%
{\ooalign{$\displaystyle\sum$\cr\hidewidth$\displaystyle\int$\hidewidth\cr}}
{\ooalign{\raisebox{.14\height}{\scalebox{.7}{$\textstyle\sum$}}\cr\hidewidth$\textstyle\int$\hidewidth\cr}}
{\ooalign{\raisebox{.2\height}{\scalebox{.6}{$\scriptstyle\sum$}}\cr$\scriptstyle\int$\cr}}
{\ooalign{\raisebox{.2\height}{\scalebox{.6}{$\scriptstyle\sum$}}\cr$\scriptstyle\int$\cr}}
} % sumintegral