mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Call EvaluationCallback before evaluating the fixed cost.
Fixe a subtle bug in Program::RemoveFixedBlocks, where we call ResidualBlock::Evaluate on residual blocks with all constant parameter blocks without paying attention to the presence of an EvaluationCallback. In the process also run clang-format on some of the files touched by this change. https://github.com/ceres-solver/ceres-solver/issues/482 Change-Id: I342b66f6f975fdee2eef139a31f24d4a3e568e84
This commit is contained in:
@@ -35,12 +35,11 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "ceres/internal/port.h"
|
||||
#include "ceres/evaluation_callback.h"
|
||||
|
||||
namespace ceres {
|
||||
|
||||
class EvaluationCallback;
|
||||
|
||||
namespace internal {
|
||||
|
||||
class ParameterBlock;
|
||||
@@ -76,8 +75,8 @@ class Program {
|
||||
// computation of the Jacobian of its local parameterization. If
|
||||
// this computation fails for some reason, then this method returns
|
||||
// false and the state of the parameter blocks cannot be trusted.
|
||||
bool StateVectorToParameterBlocks(const double *state);
|
||||
void ParameterBlocksToStateVector(double *state) const;
|
||||
bool StateVectorToParameterBlocks(const double* state);
|
||||
void ParameterBlocksToStateVector(double* state) const;
|
||||
|
||||
// Copy internal state to the user's parameters.
|
||||
void CopyParameterBlockStateToUserState();
|
||||
|
||||
Reference in New Issue
Block a user