blob: ca839ea4fca3ce2a36aed55c445e1191638e3b07 [file] [log] [blame]
Keir Mierle8ebb0732012-04-30 23:09:08 -07001%%% Build instructions
2%%% pdflatex -shell-escape ceres && bibtex ceres && pdflatex -shell-escape ceres && pdflatex -shell-escape ceres
3
4\documentclass[11pt,letterpaper,oneside]{memoir}
5\usepackage{fouriernc}
6\usepackage[T1]{fontenc}
7\usepackage{minted,amsmath,amssymb,amsthm,url,booktabs}
8\usepackage[pdftex]{graphicx}
9\usepackage[sort&compress]{natbib}
10\usepackage[breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref}
Sameer Agarwal97fb6d92012-06-17 10:08:19 -070011\usepackage{algorithm}
12\usepackage{algorithmic}
Keir Mierle8ebb0732012-04-30 23:09:08 -070013
14% page dimensions
Sameer Agarwald3eaa482012-05-29 23:47:57 -070015\addtolength{\textwidth}{1.5in}
16\addtolength{\oddsidemargin}{-0.75in}
17\addtolength{\evensidemargin}{-0.75in}
18\addtolength{\spinemargin}{-0.75in}
19\addtolength{\foremargin}{-0.75in}
Keir Mierle8ebb0732012-04-30 23:09:08 -070020\setlength{\parindent}{0.0in}
21\setlength{\parskip}{0.12in}
22
23% Our pagestyle
24\copypagestyle{ceres}{headings}
25\makeevenhead{ceres}{\thepage}{}{\scshape\rightmark}
26\makeoddhead{ceres}{\scshape\rightmark}{}{\thepage}
27
28%% ceres chapter style
29\makechapterstyle{ceres}{%
30\renewcommand{\chapterheadstart}{}%
31\renewcommand{\printchaptername}{}%
32\renewcommand{\chapternamenum}{}%
33\renewcommand{\printchapternum}{}%
34\renewcommand{\afterchapternum}{}%
35\renewcommand{\printchaptertitle}[1]{%
36\raggedright\Large\scshape\MakeLowercase{##1}}%
37\renewcommand{\afterchaptertitle}{%
38\vskip\onelineskip \hrule\vskip\onelineskip}%
39}%
40\renewcommand{\cftchapterfont}{\normalfont}%
41\renewcommand{\cftchapterpagefont}{\normalfont}%
42\renewcommand{\cftchapterpresnum}{\bfseries}%
43\renewcommand{\cftchapterleader}{}%
44\renewcommand{\cftchapterafterpnum}{\cftparfillskip}%
45
46
47%% Section title style
48\setsecheadstyle{\raggedright\scshape\MakeLowercase}%
49\setbeforesecskip{-\onelineskip}%
50\setaftersecskip{\onelineskip}%
51
52%% Subsection title style
53
54\setsubsecheadstyle{\sethangfrom{\noindent ##1}\raggedright\itshape}%
55\setbeforesubsecskip{-\onelineskip}%
56\setaftersubsecskip{\onelineskip}%
57
58\captiontitlefont{\small\sffamily}%
59\let\caption\legend
60
61
62\title{\Huge\scshape
Sameer Agarwal0e99e9c2012-05-10 09:45:05 -070063\MakeLowercase{Ceres Solver: Tutorial \& Reference}
Keir Mierle8ebb0732012-04-30 23:09:08 -070064}
65\author{
Sameer Agarwald3eaa482012-05-29 23:47:57 -070066\scshape\MakeLowercase{Sameer Agarwal} \\ \texttt{sameeragarwal@google.com}
Keir Mierle8ebb0732012-04-30 23:09:08 -070067\and
68\scshape\MakeLowercase{Keir Mierle} \\ \texttt{ keir@google.com}
69}
70\checkandfixthelayout
71
72\pagestyle{ceres}
73
74\newcommand{\ceres}{{Ceres }}
75\newcommand{\reals}{\mathbb{R} }
76\def\eg{\emph{e.g. }}
77\def\ie{\emph{i.e. }}
78\newcommand{\glog}{\texttt{google-glog}}
79\newcommand{\gflags}{\texttt{gflags}}
80\newcommand{\eigen}{\texttt{Eigen3}}
81\newcommand{\suitesparse}{\texttt{SuiteSparse}}
82\newcommand{\cholmod}{\texttt{CHOLMOD}}
83\newcommand{\amd}{\texttt{AMD}}
84\newcommand{\colamd}{\texttt{COLAMD}}
85\newcommand{\lapack}{\texttt{LAPACK}}
86\newcommand{\blas}{\texttt{BLAS}}
87\newcommand{\denseschur}{\texttt{DENSE\_SCHUR}}
88\newcommand{\sparseschur}{\texttt{SPARSE\_SCHUR}}
Sameer Agarwal17fbc8e2012-05-01 00:21:19 -070089\newcommand{\iterativeschur}{\texttt{ITERATIVE\_SCHUR}}
Keir Mierle8ebb0732012-04-30 23:09:08 -070090\newcommand{\cmake}{\texttt{cmake}}
91\newcommand{\protobuf}{\texttt{protobuf}}
Sameer Agarwald3eaa482012-05-29 23:47:57 -070092\settocdepth{chapter}
Keir Mierle8ebb0732012-04-30 23:09:08 -070093
94\begin{document}
95\chapterstyle{ceres}
Keir Mierle8ebb0732012-04-30 23:09:08 -070096\maketitle
97\thispagestyle{empty}
98\newpage
99\pagestyle{ceres}
100\tableofcontents
Sameer Agarwal17fbc8e2012-05-01 00:21:19 -0700101\newpage
Sameer Agarwald3eaa482012-05-29 23:47:57 -0700102
103\chapter{A Note to the Reader}
Sameer Agarwal17fbc8e2012-05-01 00:21:19 -0700104Building this pdf from source requires a relatively recent installation of \texttt{LaTeX}~\footnote{\url{http://www.tug.org/texlive/}}, \texttt{minted.sty}\footnote{\url{http://code.google.com/p/minted/}} and \texttt{pygments}\footnote{\url{http://pygments.org/}}.
Keir Mierle8ebb0732012-04-30 23:09:08 -0700105
Sameer Agarwald3eaa482012-05-29 23:47:57 -0700106Despite our best efforts, this manual remains a work in progress and the source code for Ceres Solver remains the ultimate reference.
Sameer Agarwal17fbc8e2012-05-01 00:21:19 -0700107
Sameer Agarwal8ed29a72012-06-07 17:04:25 -0700108\input{changes}
Keir Mierle8ebb0732012-04-30 23:09:08 -0700109\input{introduction}
110\input{build}
Sameer Agarwald3eaa482012-05-29 23:47:57 -0700111
112%% Tutorial
113\part{Tutorial}
114\label{part:tutorial}
115\input{nnlsq}
116\input{helloworld}
117\input{powell}
118\input{curvefitting}
119\input{bundleadjustment}
120
121%% Reference
122\part{Reference}
123\label{part:reference}
124\input{reference-overview}
125\input{modeling}
126\input{solving}
127
Keir Mierle8ebb0732012-04-30 23:09:08 -0700128\input{faq}
129\input{further}
130\bibliographystyle{plain}
131\bibliography{ceres}
132\end{document}