Home | History | Annotate | Download | only in ceres
      1 #include "ceres/trust_region_strategy.h"
      2 #include "ceres/dogleg_strategy.h"
      3 #include "ceres/levenberg_marquardt_strategy.h"
      4 
      5 namespace ceres {
      6 namespace internal {
      7 
      8 TrustRegionStrategy::~TrustRegionStrategy() {}
      9 
     10 TrustRegionStrategy* TrustRegionStrategy::Create(const Options& options) {
     11   switch (options.trust_region_strategy_type) {
     12     case LEVENBERG_MARQUARDT:
     13       return new LevenbergMarquardtStrategy(options);
     14     case DOGLEG:
     15       return new DoglegStrategy(options);
     16     default:
     17       LOG(FATAL) << "Unknown trust region strategy: "
     18                  << options.trust_region_strategy_type;
     19   }
     20 
     21   LOG(FATAL) << "Unknown trust region strategy: "
     22              << options.trust_region_strategy_type;
     23   return NULL;
     24 }
     25 
     26 }  // namespace internal
     27 }  // namespace ceres
     28