26 #include <boost/optional.hpp> 38 SILENT, TERMINATION, ERROR,
VALUES, DELTA, LINEAR
42 double relativeErrorTol = 1
e-5;
43 double absoluteErrorTol = 1
e-5;
44 double errorTol = 0.0;
52 std::string
getVerbosity()
const {
return verbosityTranslator(verbosity); }
59 verbosity = verbosityTranslator(src);
62 static Verbosity verbosityTranslator(
const std::string &
s) ;
68 void(
size_t ,
double,
double)>;
114 virtual void print(
const std::string&
str =
"")
const;
121 && verbosityTranslator(verbosity) == other.
getVerbosity();
128 return (linearSolverType == MULTIFRONTAL_CHOLESKY)
129 || (linearSolverType == MULTIFRONTAL_QR);
133 return (linearSolverType == SEQUENTIAL_CHOLESKY)
134 || (linearSolverType == SEQUENTIAL_QR);
138 return (linearSolverType == CHOLMOD);
142 return (linearSolverType == Iterative);
146 switch (linearSolverType) {
147 case MULTIFRONTAL_CHOLESKY:
148 case SEQUENTIAL_CHOLESKY:
151 case MULTIFRONTAL_QR:
156 throw std::runtime_error(
157 "Nonlinear optimization parameter \"factorization\" is invalid");
162 return linearSolverTranslator(linearSolverType);
166 linearSolverType = linearSolverTranslator(solver);
169 void setIterativeParams(
const boost::shared_ptr<IterativeOptimizationParameters>
params);
177 return orderingTypeTranslator(orderingType);
182 orderingType = orderingTypeTranslator(ordering);
186 std::string linearSolverTranslator(
LinearSolverType linearSolverType)
const;
187 LinearSolverType linearSolverTranslator(
const std::string& linearSolverType)
const;
void print(const Matrix &A, const string &s, ostream &stream)
void setMaxIterations(int value)
void setLinearSolverType(const std::string &solver)
std::string getOrderingType() const
IterationHook iterationHook
NonlinearOptimizerParams SuccessiveLinearizationParams
static enum @843 ordering
Subgraph Solver from IROS 2010.
std::function< void(size_t, double, double)> IterationHook
BiCGSTAB< SparseMatrix< double > > solver
std::string getVerbosity() const
std::pair< boost::shared_ptr< GaussianConditional >, boost::shared_ptr< GaussianFactor > > EliminatePreferCholesky(const GaussianFactorGraph &factors, const Ordering &keys)
double getErrorTol() const
bool equals(const NonlinearOptimizerParams &other, double tol=1e-9) const
size_t getMaxIterations() const
std::string getLinearSolverType() const
void setVerbosity(const std::string &src)
void setOrderingType(const std::string &ordering)
void setOrdering(const Ordering &ordering)
GaussianFactorGraph::Eliminate getEliminationFunction() const
double getRelativeErrorTol() const
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double getAbsoluteErrorTol() const
boost::optional< Ordering > ordering
The optional variable elimination ordering, or empty to use COLAMD (default: empty) ...
Linear Factor Graph where all factors are Gaussians.
IterativeOptimizationParameters::shared_ptr iterativeParams
The container for iterativeOptimization parameters. used in CG Solvers.
OrderingType
Type of ordering to use.
static SmartStereoProjectionParams params
bool isSequential() const
void setAbsoluteErrorTol(double value)
void setRelativeErrorTol(double value)
boost::shared_ptr< IterativeOptimizationParameters > shared_ptr
bool isMultifrontal() const
boost::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
void setErrorTol(double value)
virtual ~NonlinearOptimizerParams()
std::pair< GaussianConditional::shared_ptr, JacobianFactor::shared_ptr > EliminateQR(const GaussianFactorGraph &factors, const Ordering &keys)