10ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong%!TEX root = ceres-solver.tex
20ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\chapter{Introduction}
30ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\label{chapter:introduction}
40ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongCeres Solver\footnote{For brevity, in the rest of this document we will just use the term Ceres.} is a non-linear least squares solver developed at Google. It is designed to solve small and large sparse problems accurately and efficiently~\footnote{For a gentle but brief introduction to non-liner least squares problems, please start by reading the~\hyperref[part:tutorial]{Tutorial}}. Amongst its various features is a simple but expressive API with support for automatic differentiation, robust norms, local parameterizations, automatic gradient checking, multithreading and automatic problem structure detection.
50ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
60ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongThe key computational cost when solving a non-linear least squares problem is the solution of a linear least squares problem in each iteration. To this end Ceres supports a number of different linear solvers suited for different needs. This includes dense QR factorization (using \eigen) for small scale problems, sparse Cholesky factorization (using \texttt{SuiteSparse}) for general sparse problems and specialized Schur complement based solvers for problems that arise in multi-view geometry~\cite{hartley-zisserman-book-2004}.
70ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
80ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongCeres has been used for solving a variety of problems in computer vision and machine learning at Google with sizes that range from a tens of variables and objective functions with a few hundred terms to problems with millions of variables and objective functions with tens of millions of terms. 
90ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
100ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
110ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\section{What's in a name?}
120ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongWhile there is some debate as to who invented of the method of Least Squares~\cite{stigler1981gauss}. There is no debate that it was Carl Friedrich Gauss's prediction of the orbit of the newly discovered asteroid Ceres based on just 41 days of observations that brought it to the attention of the world~\cite{tennenbaum-director}. We named our solver after Ceres to celebrate this seminal event in the history of astronomy, statistics and optimization.
130ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
140ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\section{Contributing to Ceres Solver}
150ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
160ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongWe welcome contributions to Ceres, whether they are new features, bug fixes or tests. The Ceres mailing list\footnote{\url{http://groups.google.com/group/ceres-solver}} is the best place for all development related discussions. Please consider joining it. If you have ideas on how you would like to contribute to Ceres, it is a good idea to let us know on the mailinglist before you start development. We may have suggestions that will save effort when trying to merge your work into the main branch. If you are looking for ideas, please let us know about your interest and skills and we will be happy to make a suggestion or three.
170ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
180ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongWe follow Google's C++ Style Guide~\footnote{\url{http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml}} and use \texttt{git} for version control.
190ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
200ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\section{Citing Ceres Solver}
210ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongIf you use Ceres for an academic publication, please cite this manual. e.g.,
220ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\begin{verbatim}
230ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong@manual{ceres-manual,
240ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong	Author = {Sameer Agarwal and Keir Mierle},
250ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong	Title = {Ceres Solver: Tutorial \& Reference},
260ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong	Organization = {Google Inc.}
270ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong}
280ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\end{verbatim}
290ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong	
300ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
310ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\section{Acknowledgements}
320ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongA number of people have helped with the development and open sourcing of Ceres. 
330ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
340ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongFredrik Schaffalitzky when he was at Google started the development of Ceres, and even though much has changed since then, many of the ideas from his original design are still present in the current code.
350ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
360ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongAmongst Ceres' users at Google two deserve special mention: William Rucklidge and James Roseborough. William was the first user of Ceres. He bravely took on the task of porting production code to an as-yet unproven optimization library, reporting bugs and helping fix them along the way. James is perhaps the most sophisticated user of Ceres at Google. He has reported and fixed bugs and helped evolve the API for the better.
370ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
380ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongNathan Wiegand contributed the MacOS port.
390ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
400ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
410ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\chapter{License}
420ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongCeres Solver is licensed under the New BSD license, whose terms are as follows.
430ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
440ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\begin{quotation}
450ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
460ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\noindent
470ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongCopyright (c) 2010, 2011, 2012, Google Inc. All rights reserved.
480ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
490ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\noindent
500ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongRedistribution and use in source and binary forms, with or without
510ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongmodification, are permitted provided that the following conditions are met:
520ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\begin{enumerate}
530ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\item Redistributions of source code must retain the above copyright notice,
540ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong      this list of conditions and the following disclaimer.
550ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\item Redistributions in binary form must reproduce the above copyright notice,
560ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong      this list of conditions and the following disclaimer in the documentation
570ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong      and/or other materials provided with the distribution.
580ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\item Neither the name of Google Inc.,  nor the names of its contributors may
590ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong      be used to endorse or promote products derived from this software without
600ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong      specific prior written permission.
610ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\end{enumerate}
620ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong
630ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\noindent
640ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus KongThis software is provided by the copyright holders and contributors "AS IS" and
650ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongany express or implied warranties, including, but not limited to, the implied
660ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongwarranties of merchantability and fitness for a particular purpose are
670ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongdisclaimed. In no event shall Google Inc. be liable for any direct, indirect,
680ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongincidental, special, exemplary, or consequential damages (including, but not
690ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Konglimited to, procurement of substitute goods or services; loss of use, data, or
700ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongprofits; or business interruption) however caused and on any theory of
710ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongliability, whether in contract, strict liability, or tort (including negligence
720ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongor otherwise) arising in any way out of the use of this software, even if
730ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kongadvised of the possibility of such damage.
740ae28bd5885b5daa526898fcf7c323dc2c3e1963Angus Kong\end{quotation}
75