39 SILENT, TERMINATION, ERROR,
VALUES, DELTA, LINEAR
42 size_t maxIterations = 100;
43 double relativeErrorTol = 1
e-5;
44 double absoluteErrorTol = 1
e-5;
45 double errorTol = 0.0;
53 std::string
getVerbosity()
const {
return verbosityTranslator(verbosity); }
60 verbosity = verbosityTranslator(src);
63 static Verbosity verbosityTranslator(
const std::string &
s) ;
69 void(
size_t ,
double,
double)>;
115 virtual void print(
const std::string&
str =
"")
const;
122 && verbosityTranslator(verbosity) == other.
getVerbosity();
129 return (linearSolverType == MULTIFRONTAL_CHOLESKY)
130 || (linearSolverType == MULTIFRONTAL_QR);
134 return (linearSolverType == SEQUENTIAL_CHOLESKY)
135 || (linearSolverType == SEQUENTIAL_QR);
139 return (linearSolverType == CHOLMOD);
143 return (linearSolverType == Iterative);
147 switch (linearSolverType) {
148 case MULTIFRONTAL_CHOLESKY:
149 case SEQUENTIAL_CHOLESKY:
152 case MULTIFRONTAL_QR:
157 throw std::runtime_error(
158 "Nonlinear optimization parameter \"factorization\" is invalid");
163 return linearSolverTranslator(linearSolverType);
167 linearSolverType = linearSolverTranslator(solver);
170 void setIterativeParams(
const std::shared_ptr<IterativeOptimizationParameters>
params);
178 return orderingTypeTranslator(orderingType);
183 orderingType = orderingTypeTranslator(ordering);
187 std::string linearSolverTranslator(
LinearSolverType linearSolverType)
const;
188 LinearSolverType linearSolverTranslator(
const std::string& linearSolverType)
const;
void print(const Matrix &A, const string &s, ostream &stream)
bool isMultifrontal() const
void setMaxIterations(int value)
std::string getVerbosity() const
void setLinearSolverType(const std::string &solver)
IterationHook iterationHook
std::string getOrderingType() const
NonlinearOptimizerParams SuccessiveLinearizationParams
Subgraph Solver from IROS 2010.
std::function< void(size_t, double, double)> IterationHook
std::pair< std::shared_ptr< GaussianConditional >, std::shared_ptr< GaussianFactor > > EliminatePreferCholesky(const GaussianFactorGraph &factors, const Ordering &keys)
BiCGSTAB< SparseMatrix< double > > solver
bool isSequential() const
std::string getLinearSolverType() const
static enum @1107 ordering
double getErrorTol() const
static const SmartProjectionParams params
void setVerbosity(const std::string &src)
std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
void setOrderingType(const std::string &ordering)
void setOrdering(const Ordering &ordering)
size_t getMaxIterations() const
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Linear Factor Graph where all factors are Gaussians.
std::pair< GaussianConditional::shared_ptr, JacobianFactor::shared_ptr > EliminateQR(const GaussianFactorGraph &factors, const Ordering &keys)
IterativeOptimizationParameters::shared_ptr iterativeParams
The container for iterativeOptimization parameters. used in CG Solvers.
OrderingType
Type of ordering to use.
void setAbsoluteErrorTol(double value)
GaussianFactorGraph::Eliminate getEliminationFunction() const
void setRelativeErrorTol(double value)
std::shared_ptr< IterativeOptimizationParameters > shared_ptr
void setErrorTol(double value)
virtual ~NonlinearOptimizerParams()
bool equals(const NonlinearOptimizerParams &other, double tol=1e-9) const
double getRelativeErrorTol() const
std::optional< Ordering > ordering
The optional variable elimination ordering, or empty to use COLAMD (default: empty) ...
double getAbsoluteErrorTol() const