mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
*port the Cholesky module to the new solve() API
*improve documentation
This commit is contained in:
@@ -218,7 +218,7 @@ ALIASES = "only_for_vectors=This is only for vectors (either row-
|
||||
"nonstableyet=\warning This is not considered to be part of the stable public API yet. Changes may happen in future releases. See \ref Experimental \"Experimental parts of Eigen\"" \
|
||||
"note_about_arbitrary_choice_of_solution=If there exists more than one solution, this method will arbitrarily choose one." \
|
||||
"note_about_using_kernel_to_study_multiple_solutions=If you need a complete analysis of the space of solutions, take the one solution obtained by this method and add to it elements of the kernel, as determined by kernel()." \
|
||||
"note_about_checking_solutions=This method just tries to find as good a solution as possible. If you want to check whether a solution "exists" or if it is accurate, just call this function to get a solution and then compute the error margin, or use MatrixBase::isApprox() directly, for instance like this: \code bool a_solution_exists = (A*result).isApprox(b, precision); \endcode The non-existence of a solution doesn't by itself mean that you'll get \c inf or \c nan values."
|
||||
"note_about_checking_solutions=This method just tries to find as good a solution as possible. If you want to check whether a solution exists or if it is accurate, just call this function to get a result and then compute the error of this result, or use MatrixBase::isApprox() directly, for instance like this: \code bool a_solution_exists = (A*result).isApprox(b, precision); \endcode This method avoids dividing by zero, so that the non-existence of a solution doesn't by itself mean that you'll get \c inf or \c nan values."
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
|
||||
# sources only. Doxygen will then generate output that is more tailored for C.
|
||||
|
||||
@@ -3,6 +3,6 @@ typedef Matrix<float,Dynamic,2> DataMatrix;
|
||||
DataMatrix samples = DataMatrix::Random(12,2);
|
||||
VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1;
|
||||
// and let's solve samples * [x y]^T = elevations in least square sense:
|
||||
Matrix<float,2,1> xy;
|
||||
(samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations), &xy);
|
||||
Matrix<float,2,1> xy
|
||||
= (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations));
|
||||
cout << xy << endl;
|
||||
|
||||
Reference in New Issue
Block a user