Code cleanup: fix no previous declaration warnings

Move internally used functions to an anonymous namespace,

Change-Id: I84c98facf901e64771d131b088e20e2c033cab70
Added epsilon() method to NumTraits<ceres::Jet<T, N> >.

Change-Id: Ie849b4ae5c7260976ebf2fb21a00f13d1e6bb647
Move operator<< for FunctionSample back into ceres::internal.

This is undoing a change that Sergey submitted earlier moving
this into an anonymous namespace. This caused build breakage
internally at Google due to a namespace lookup error.

The original reason for Sergey's change was a lack of a
function declaration. I have added it before the function.

Change-Id: Iea88d1123215035e9f03022912078a2566ecde82
Fix a leak in SchurComplementSolver.

cholmod_lhs was not being freed before
the SolveImpl function returned if the
underlying linear solver failed.

Change-Id: Id45db4f69a2821e43dc00fc975718584d426f44d
Validate ParameterBlocks before solve.

Ensure that all parameter blocks have finite values
before the minimizer is called.

Change-Id: I15fd9c487247989626f799496bb8f5ea8728d6f0
Remove all references to int16.

Change-Id: Iab87463dd32f64ee371e6cc7d1f5e30128412a10
Add Problem::GetParameterization.

This allows the user to query the local parameterization associated
with a parameter block.

Change-Id: I3ab274aa88221c8e2def7c463825bf3927b1fdc9
Add line search to the trust region minimizer.

If enabled, the TrustRegionMinimizer can now further improve the
quality of the step with a Armijo line search.

This is the first step towards adding support for bounds on
variables.

Change-Id: I453b42853cfa6ca4f75812900c13d286a473c2df
Add support for bounds to ParameterBlock.

Add setters and getters for lower and upper bounds.
Generalize the Plus operation to include projection onto the
hypercube implied by the bounds.

Change-Id: I1e4028a9886c4064f31bbc5b7c22b0341a56c15d
Deal with bounds constrained problems in the Solver.

1. Detect if the problem is bounds constrained.
2. Detect if the problem is infeasible due to
   constant infeasible parameter blocks.
3. Simplify the interface to TrustRegionMinimize and
   LineSearchMinimize. In the process fix a bug related
   to early return and the way user state pointers
   were being dealt with in parameter blocks.

Change-Id: Ie7e70862029d3e0734636882c21ea594516119d1
Add Problem::SetParameterLowerBound and Problem::SetParameterUpperBound.

These two methods allow the user to associate upper and lower bounds
with individual parameters inside parameter blocks.

Change-Id: I68dc37f20b64408da510ba06b89a4f08df54ddad
Add Problem::SetParameterLowerBound and Problem::SetParameterUpperBound.

These two methods allow the user to associate upper and lower bounds
with individual parameters inside parameter blocks.

Change-Id: I68dc37f20b64408da510ba06b89a4f08df54ddad
Improve infeasibility detection for constant and
variable parameter blocks.

1. Check if constant parameter blocks have infeasible values.
2. Check if variable parameter blocks have impossible bounds.

Change-Id: I0a58bc3eba42f0655fe90b58ea6ee21fae8c8f61
Add tests for feasibility testing of bounds constrained problems.

Change-Id: Ib86f73cc121c893d4bcfa1c8e393ef2ddddfe348
Add test problems from More, Garbow and Hillstrom.

Change-Id: I50f1fec377ad020bd1537e65bed5ff08d2d8f4e7
Extend more_garbow_hillstrom to include unconstrained solves.

Change-Id: If855b0fff26898a61b701a1b7fcd02337614d108
METIS_FOUND is never set.
Changed the commit to fit the setting of the other *_FOUND definitions.

Change-Id: I3f0d11a9a65a0decd1a6a6b28a4a4823eb74c9c3
Add more problems to more_garbow_hillstrom.cc.

Change-Id: Iffef76c22629747909f820be354cf8080da33a69
Changes to how gradient based convergence is diagnosed.

The original implementation for computing the norm of the gradient was

gradient_norm = norm(gradient)

when the gradient vector lies in the same space as the parameter
vector, this value is meaningful. When there is a local parameterization
involved, interpreting this value and diagnosing convergence using it
is hard.

Further, this expression does not respect the bounds constraints
on the parmeters. Measuring the norm of the gradient only makes
sense when the optimization being performed is unconstrained.

A better solution, used by LANCELOT is the expression
gradient_norm = norm(x - P(x - gradient))

Here, P is the projection operator onto the bounds constraints.
x - gradient is computed by computing Plus(x, -gradient), thus the
actual expression becomes

gradient_norm = norm(x - P(Plus(x, -gradient)));

Which in the case where there are no bounds constraints, and there
are no local parameterizations, reduces to the usual Euclidean
expression from above, since

Plus(x, -gradient) = x - gradient

and P(x - gradient) = x - gradient.

This change implements this change. Further, the convergence
test using the gradient tolerance now uses an absolute measure
rather than a relative measure. This is a forward looking change
as we start implementing the Augmented Lagrangian solver.

Last but not the least, various "Terminating: Foo" messages
have been changed so that "Terminating: " is logged but is
not part of the Solver::Summary::message string as it is
pointless.

Change-Id: I943146f71a1da47c8c7592986039b4112781b99b
Fix a type bug in more_garbow_hillstrom.cc.

Change-Id: Ia830db6cdfd15b8e90d7a3655eeab8cf6a463817