blob: 2e058b27a85c1ba613a891de63e9bee4479b8741 [file] [log] [blame]
#include "ceres/trust_region_strategy.h"
#include "ceres/dogleg_strategy.h"
#include "ceres/levenberg_marquardt_strategy.h"
namespace ceres {
namespace internal {
TrustRegionStrategy::~TrustRegionStrategy() {}
TrustRegionStrategy* TrustRegionStrategy::Create(const Options& options) {
switch (options.trust_region_strategy_type) {
case LEVENBERG_MARQUARDT:
return new LevenbergMarquardtStrategy(options);
case DOGLEG:
return new DoglegStrategy(options);
default:
LOG(FATAL) << "Unknown trust region strategy: "
<< options.trust_region_strategy_type;
}
LOG(FATAL) << "Unknown trust region strategy: "
<< options.trust_region_strategy_type;
}
} // namespace internal
} // namespace ceres