17 const std::string &src) {
31 if (s ==
"TERMINATION")
70 const std::shared_ptr<IterativeOptimizationParameters>
params) {
78 std::cout << str <<
"\n";
81 std::cout <<
" total error threshold: " <<
errorTol <<
"\n";
82 std::cout <<
" maximum iterations: " <<
maxIterations <<
"\n";
89 std::cout <<
" linear solver type: MULTIFRONTAL CHOLESKY\n";
92 std::cout <<
" linear solver type: MULTIFRONTAL QR\n";
95 std::cout <<
" linear solver type: SEQUENTIAL CHOLESKY\n";
98 std::cout <<
" linear solver type: SEQUENTIAL QR\n";
101 std::cout <<
" linear solver type: CHOLMOD\n";
104 std::cout <<
" linear solver type: ITERATIVE\n";
107 std::cout <<
" linear solver type: (invalid)\n";
113 std::cout <<
" ordering: COLAMD\n";
116 std::cout <<
" ordering: METIS\n";
119 std::cout <<
" ordering: custom\n";
129 switch (linearSolverType) {
131 return "MULTIFRONTAL_CHOLESKY";
133 return "MULTIFRONTAL_QR";
135 return "SEQUENTIAL_CHOLESKY";
137 return "SEQUENTIAL_QR";
143 throw std::invalid_argument(
144 "Unknown linear solver type in SuccessiveLinearizationOptimizer");
151 if (linearSolverType ==
"MULTIFRONTAL_CHOLESKY")
153 if (linearSolverType ==
"MULTIFRONTAL_QR")
155 if (linearSolverType ==
"SEQUENTIAL_CHOLESKY")
157 if (linearSolverType ==
"SEQUENTIAL_QR")
159 if (linearSolverType ==
"ITERATIVE")
161 if (linearSolverType ==
"CHOLMOD")
163 throw std::invalid_argument(
164 "Unknown linear solver type in SuccessiveLinearizationOptimizer");
179 throw std::invalid_argument(
180 "Invalid ordering type: You must provide an ordering for a custom ordering type. See setOrdering");
186 const std::string&
type)
const {
189 if (type ==
"COLAMD")
191 throw std::invalid_argument(
192 "Invalid ordering type: You must provide an ordering for a custom ordering type. See setOrdering");
static Verbosity verbosityTranslator(const std::string &s)
Verbosity verbosity
The printing verbosity during optimization (default SILENT)
std::string orderingTypeTranslator(Ordering::OrderingType type) const
virtual void print(const std::string &str="") const
double absoluteErrorTol
The maximum absolute error decrease to stop iterating (default 1e-5)
static const SmartProjectionParams params
double relativeErrorTol
The maximum relative error decrease to stop iterating (default 1e-5)
double errorTol
The maximum total error to stop iterating (default 0.0)
IterativeOptimizationParameters::shared_ptr iterativeParams
The container for iterativeOptimization parameters. used in CG Solvers.
OrderingType
Type of ordering to use.
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
void setIterativeParams(const std::shared_ptr< IterativeOptimizationParameters > params)
std::string linearSolverTranslator(LinearSolverType linearSolverType) const
Parameters for nonlinear optimization.
Ordering::OrderingType orderingType
The method of ordering use during variable elimination (default COLAMD)
std::optional< Ordering > ordering
The optional variable elimination ordering, or empty to use COLAMD (default: empty) ...
LinearSolverType linearSolverType
The type of linear solver to use in the nonlinear optimizer.
size_t maxIterations
The maximum iterations to stop iterating (default 100)