Files
ceres-solver/internal/ceres/trust_region_strategy.cc
T
Keir Mierle efe7ac60a0 Port Ceres to Windows
This is a preliminary, but full, port of Ceres to Windows.
Currently all tests compile and run, with only system_test
failing to work correctly due to a path issue.

Change-Id: I4152c1588bf51ffd7f4d9401ef9759f5d28c299c
2012-06-24 23:22:04 -07:00

28 lines
774 B
C++

#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;
return NULL;
}
} // namespace internal
} // namespace ceres