mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
efe7ac60a0
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
28 lines
774 B
C++
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
|