SourceXtractorPlusPlus  0.13
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SamplingConfig.cpp
Go to the documentation of this file.
1 
18 #include <boost/algorithm/string.hpp>
19 
21 
22 using namespace Euclid::Configuration;
23 namespace po = boost::program_options;
24 
25 namespace SourceXtractor {
26 
27 static const std::string SAMPLING_ADAPTIVE_TARGET {"sampling-adaptive-target"};
28 static const std::string SAMPLING_SCALE_FACTOR {"sampling-scale-factor"};
29 
30 SamplingConfig::SamplingConfig(long manager_id) : Configuration(manager_id),
31  m_adaptive_target(0.001), m_scale_factor(1.0) {}
32 
34  return {{"Model Fitting Sampling",
35  {
36 // {SAMPLING_ADAPTIVE_TARGET.c_str(), po::value<double>()->default_value(0.001),
37 // "Adaptive sampling will stop when difference is less than this"},
38  {SAMPLING_SCALE_FACTOR.c_str(), po::value<double>()->default_value(1.0),
39  "Scaling factor for the rendering of models (e.g. 2 = twice the resolution)"}
40  }
41  }};
42 }
43 
44 void SamplingConfig::preInitialize(const UserValues& args) {
45 }
46 
47 void SamplingConfig::initialize(const UserValues& args) {
48 // m_adaptive_target = args.at(SAMPLING_ADAPTIVE_TARGET).as<double>();
49  m_scale_factor = args.at(SAMPLING_SCALE_FACTOR).as<double>();
50 }
51 
52 } /* namespace SourceXtractor */
std::map< std::string, OptionDescriptionList > getProgramOptions() override
static const std::string SAMPLING_ADAPTIVE_TARGET
STL class.
STL class.
static const std::string SAMPLING_SCALE_FACTOR
T c_str(T...args)
void preInitialize(const UserValues &args) override
void initialize(const UserValues &args) override