remove unnecessary includes, add environment for pseudocode

This commit is contained in:
Yu Cong 2024-10-30 19:40:44 +08:00
parent 7a5312a468
commit aa617f9d0c
4 changed files with 43 additions and 8 deletions

Binary file not shown.

View File

@ -99,7 +99,7 @@ However, observe that in our problem the piecewise linear convex function is not
} }
The dimension $d$ (in our problem, the dimension of $x$) is small while the number of constraints are huge. We need only $d$ linearly independent tight constraints to identify the optimal solution $x^*$. The dimension $d$ (in our problem, the dimension of $x$) is small while the number of constraints are huge. We need only $d$ linearly independent tight constraints to identify the optimal solution $x^*$.
Thus most of the constraints are useless. Thus most of the constraints are useless.
\BlankLine
\textbf{For one constraint, how can we know where does $x^*$ locate with respect to it?} \textbf{For one constraint, how can we know where does $x^*$ locate with respect to it?}
@ -234,5 +234,13 @@ However, observe that in our problem the piecewise linear convex function is not
\end{align*} \end{align*}
However, this is not possible for general pwl convex functions in $\R^d$.\footnote{see this \href{https://talldoor.uk/posts/2024-09-16-piecewise-linear.html}{blog post} for detail.} However, this is not possible for general pwl convex functions in $\R^d$.\footnote{see this \href{https://talldoor.uk/posts/2024-09-16-piecewise-linear.html}{blog post} for detail.}
\end{frame} \end{frame}
\begin{frame}{test algo}
\begin{algo}
$s\gets 1$\\
asdf\\
sdddddddddddddddddddddddddddddddd\\
\textbf{Return} $\textsc{CallOracle}$
\end{algo}
\end{frame}
\end{document} \end{document}

14
algo.sty Normal file
View File

@ -0,0 +1,14 @@
\def\begin@lg{\begin{minipage}{1in}\begin{tabbing}
\quad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\kill}
\def\end@lg{\end{tabbing}\end{minipage}}
\newenvironment{algorithm}
{\begin{tabular}{|l|}\hline\begin@lg}
{\end@lg\\\hline\end{tabular}}
\newenvironment{algo}
{\begin{center}\begin{algorithm}}
{\end{algorithm}\end{center}}
\def\argmax{\operatornamewithlimits{arg\,max}}
\def\argmin{\operatornamewithlimits{arg\,min}}

View File

@ -9,17 +9,30 @@
\RequirePackage{hyperref}[colorlinks=true,urlcolor=Blue,citecolor=Green,linkcolor=BrickRed,unicode] \RequirePackage{hyperref}[colorlinks=true,urlcolor=Blue,citecolor=Green,linkcolor=BrickRed,unicode]
\RequirePackage{graphicx} % Allows including images \RequirePackage{graphicx} % Allows including images
\RequirePackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables \RequirePackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\RequirePackage{tikz} % \RequirePackage{tikz}
\usetikzlibrary{backgrounds} % \usetikzlibrary{backgrounds}
\usetikzlibrary{arrows,shapes} % \usetikzlibrary{arrows,shapes}
\usetikzlibrary{tikzmark} % for \tikzmarknode % \usetikzlibrary{tikzmark} % for \tikzmarknode
\usetikzlibrary{calc} % for computing the midpoint between two nodes, e.g. at ($(p1.north)!0.5!(p2.north)$) % \usetikzlibrary{calc} % for computing the midpoint between two nodes, e.g. at ($(p1.north)!0.5!(p2.north)$)
\RequirePackage[ruled,linesnumbered]{algorithm2e} % \RequirePackage[ruled,linesnumbered]{algorithm2e}
\RequirePackage{adjustbox} % \RequirePackage{adjustbox}
\RequirePackage{subcaption} \RequirePackage{subcaption}
\RequirePackage{amsmath} \RequirePackage{amsmath}
\RequirePackage{amsthm} \RequirePackage{amsthm}
% copied from one of UIUC courses by Chandra Chekuri. I can't find the exact link now...https://courses.grainger.illinois.edu/cs598cci/sp2020/
\def\begin@lg{\begin{minipage}{1in}\begin{tabbing}
\quad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\qquad\=\kill}
\def\end@lg{\end{tabbing}\end{minipage}}
\newenvironment{algorithm}
{\begin{tabular}{|l|}\hline\begin@lg}
{\end@lg\\\hline\end{tabular}}
\newenvironment{algo}
{\begin{center}\begin{algorithm}}
{\end{algorithm}\end{center}}
% a color box % a color box
\RequirePackage[breakable, theorems, skins]{tcolorbox} \RequirePackage[breakable, theorems, skins]{tcolorbox}
\tcbset{enhanced} \tcbset{enhanced}