16 "Linear function created in the form y = m*x + b, with";
30 "Exponential function created in the form y = a*exp(b*x) + c, with";
47 throw Error(
"Piecewise Functions cannot be created with a list of parameters");
50 LOG(
LEV_DEBUG2,
"Funct") <<
"A piecewise function has been created: "
51 << function_->Print();
59 if (!function_->functions_.empty()) {
60 const PiecewiseFunction::PiecewiseFunctionInfo&
last =
61 function_->functions_.back();
63 throw Error(
"Cannot append a function before the last registered function");
72 function_->functions_.push_back(PiecewiseFunction::PiecewiseFunctionInfo(
77std::map<std::string, BasicFunctionFactory::FunctionType>
78BasicFunctionFactory::enum_names_ =
79 std::map<std::string, BasicFunctionFactory::FunctionType>();
83 if (enum_names_.empty()) {
84 enum_names_[
"lin"] =
LIN;
85 enum_names_[
"linear"] =
LIN;
86 enum_names_[
"exp"] =
EXP;
87 enum_names_[
"exponential"] =
EXP;
94 if (enum_names_.count(type) == 0) {
95 std::stringstream
err(
"");
96 err << type <<
" is not a registered function type"
97 <<
" of the basic function factory.";
101 switch (enum_names_.at(type)) {
113 throw Error(
"Function type " + type +
" not yet supported.");
A generic mechanism to manually manage exceptions.
Code providing rudimentary logging capability for the Cyclus core.
#define LOG(level, prefix)
allows easy logging via the streaming operator similar to std::cout; this is the primary way to use t...
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
@ LEV_DEBUG2
debugging information
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters