aboutsummaryrefslogtreecommitdiff
path: root/internal/ceres/trust_region_strategy.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ceres/trust_region_strategy.h')
-rw-r--r--internal/ceres/trust_region_strategy.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/internal/ceres/trust_region_strategy.h b/internal/ceres/trust_region_strategy.h
index 391da97..0dcdbfe 100644
--- a/internal/ceres/trust_region_strategy.h
+++ b/internal/ceres/trust_region_strategy.h
@@ -31,6 +31,8 @@
#ifndef CERES_INTERNAL_TRUST_REGION_STRATEGY_H_
#define CERES_INTERNAL_TRUST_REGION_STRATEGY_H_
+#include <string>
+#include "ceres/internal/port.h"
#include "ceres/types.h"
namespace ceres {
@@ -52,14 +54,14 @@ class SparseMatrix;
// radius to scale the damping term, which controls the step size, but
// does not set a hard limit on its size.
class TrustRegionStrategy {
-public:
+ public:
struct Options {
Options()
: trust_region_strategy_type(LEVENBERG_MARQUARDT),
initial_radius(1e4),
max_radius(1e32),
- lm_min_diagonal(1e-6),
- lm_max_diagonal(1e32),
+ min_lm_diagonal(1e-6),
+ max_lm_diagonal(1e32),
dogleg_type(TRADITIONAL_DOGLEG) {
}
@@ -73,8 +75,8 @@ public:
// by LevenbergMarquardtStrategy. The DoglegStrategy also uses
// these bounds to construct a regularizing diagonal to ensure
// that the Gauss-Newton step computation is of full rank.
- double lm_min_diagonal;
- double lm_max_diagonal;
+ double min_lm_diagonal;
+ double max_lm_diagonal;
// Further specify which dogleg method to use
DoglegType dogleg_type;
@@ -82,8 +84,22 @@ public:
// Per solve options.
struct PerSolveOptions {
+ PerSolveOptions()
+ : eta(0),
+ dump_filename_base(""),
+ dump_format_type(TEXTFILE) {
+ }
+
// Forcing sequence for inexact solves.
double eta;
+
+ // If non-empty and dump_format_type is not CONSOLE, the trust
+ // regions strategy will write the linear system to file(s) with
+ // name starting with dump_filename_base. If dump_format_type is
+ // CONSOLE then dump_filename_base will be ignored and the linear
+ // system will be written to the standard error.
+ string dump_filename_base;
+ DumpFormatType dump_format_type;
};
struct Summary {