SourceXtractorPlusPlus
0.12
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
Configuration
SamplingConfig.cpp
Go to the documentation of this file.
1
18
#include <boost/algorithm/string.hpp>
19
20
#include "
SEImplementation/Configuration/SamplingConfig.h
"
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
33
auto
SamplingConfig::getProgramOptions
() ->
std::map<std::string, OptionDescriptionList>
{
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 */
SourceXtractor::SamplingConfig::getProgramOptions
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Definition:
SamplingConfig.cpp:33
Euclid::Configuration::Configuration
SourceXtractor::SAMPLING_ADAPTIVE_TARGET
static const std::string SAMPLING_ADAPTIVE_TARGET
Definition:
SamplingConfig.cpp:27
std::map
STL class.
std::string
STL class.
SourceXtractor::SamplingConfig::m_scale_factor
double m_scale_factor
Definition:
SamplingConfig.h:49
SourceXtractor::SAMPLING_SCALE_FACTOR
static const std::string SAMPLING_SCALE_FACTOR
Definition:
SamplingConfig.cpp:28
std::string::c_str
T c_str(T...args)
SourceXtractor::SamplingConfig::preInitialize
void preInitialize(const UserValues &args) override
Definition:
SamplingConfig.cpp:44
SourceXtractor::SamplingConfig::initialize
void initialize(const UserValues &args) override
Definition:
SamplingConfig.cpp:47
SamplingConfig.h
Generated by
1.8.5