Use enum for LU or QR in GaussNewtonOptimizer

Changed the boolean useLu prarameter to an enum. This is benificial because:
1. user code is easier to read: new GNO(Decomposition.QR) instead of new GNO(false)
2. Allows other algorithms to be added in the future
3. developer code is easier to read. One less if statement in optimize()

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569352 13f79535-47bb-0310-9956-ffa450edef68
Use Evaluation instead of PointVectorValuePair

Use Evaluation instead of PointVectorValuePair in the ConvergenceChecker. This
gives the checkers access to more information, such as the rms and covariances.
The change also simplified the optimizer implementations since they no longer
have to keep track of the current function value.

A method was added to LeastSquaresFactory to convert between the two types of
checkers and a method added to LeastSquaresBuilder so that it can accept either
type. I would have prefered to do this through method overloading, but
overloading doesn't play well with generics.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569353 13f79535-47bb-0310-9956-ffa450edef68
Use Real{Vector,Matrix} in LeastSquares interfaces

Covered all of the interfaces in the leastsquares package to use RealVector and
RealMatrix instead of double[] and double[][]. This reduced some duplicated code.
For example Evaluation.computeResiduals() was a complete duplication of
RealVector.subtract(). It also presents a consistent interface and allows data
encapsulation.

Lastly, this change enables [math] to "eat our own dog food." It enables the
linear package to be used in the implementation of the optimization algorithms.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569354 13f79535-47bb-0310-9956-ffa450edef68
Clean up LeastSquaresFactory

* There are now 3 factory methods: one using the previous interfaces, one using
  the new interfaces with weights, and one using the new interfaces without
  weights.

* Make model(...) method public.

* Fix javadoc typo

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569355 13f79535-47bb-0310-9956-ffa450edef68
Clean up LeastSquaresBuilder

Provide methods for using old and new interfaces. Data is stored internally
using the new interfaces now.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569356 13f79535-47bb-0310-9956-ffa450edef68
Fix Javadoc and checkstyle errors.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569357 13f79535-47bb-0310-9956-ffa450edef68
Fixed errors introduced by few previous API changes.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569358 13f79535-47bb-0310-9956-ffa450edef68
JUnit directly executes least squares tests
    
Previously JUnit would make the call to test a specific optimizer, and
then that method would call all of the individual test cases relevant to
that optimizer.,Now JUnit will directly call each individual test case.
    
The same test coverage is preserved. The GaussNewtonOptimizerTest is
split into two classes, one for each decomposition algorithm it can use.
There is a significant amount of duplicated code between
GaussNewtonOptimizerWithLUTest and GaussNewtonOptimizerWithQRTest.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569359 13f79535-47bb-0310-9956-ffa450edef68
Qualify Evaluation in interfaces.
    
Use LeastSquaresProblem.Evaluation in the public interfaces for
readability.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1569360 13f79535-47bb-0310-9956-ffa450edef68