123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- #ifndef CERES_PUBLIC_ITERATION_CALLBACK_H_
- #define CERES_PUBLIC_ITERATION_CALLBACK_H_
- #include "ceres/internal/disable_warnings.h"
- #include "ceres/internal/export.h"
- #include "ceres/types.h"
- namespace ceres {
- struct CERES_EXPORT IterationSummary {
-
- int iteration = 0;
-
-
-
-
- bool step_is_valid = false;
-
-
-
-
-
-
- bool step_is_nonmonotonic = false;
-
-
-
-
-
-
-
-
-
-
- bool step_is_successful = false;
-
- double cost = 0.0;
-
-
- double cost_change = 0.0;
-
- double gradient_max_norm = 0.0;
-
- double gradient_norm = 0.0;
-
-
- double step_norm = 0.0;
-
-
- double relative_decrease = 0.0;
-
-
-
- double trust_region_radius = 0.0;
-
-
-
-
-
- double eta = 0.0;
-
- double step_size = 0.0;
-
- int line_search_function_evaluations = 0;
-
- int line_search_gradient_evaluations = 0;
-
- int line_search_iterations = 0;
-
-
- int linear_solver_iterations = 0;
-
-
-
- double iteration_time_in_seconds = 0.0;
-
- double step_solver_time_in_seconds = 0.0;
-
- double cumulative_time_in_seconds = 0.0;
- };
- class CERES_EXPORT IterationCallback {
- public:
- virtual ~IterationCallback();
- virtual CallbackReturnType operator()(const IterationSummary& summary) = 0;
- };
- }
- #include "ceres/internal/reenable_warnings.h"
- #endif
|