Template Struct variable_map< double >

Struct Documentation

template<>
struct blackbird::variable_map<double>

get and set real values in the variable map

Public Static Functions

static inline double getVal(Visitor *V, std::string key)

Get value from the variable map corresponding to a name, and attempt to convert it into an double

Parameters
  • V – Blackbird Visitor

  • key – variable name

Throws
  • invalid_argument – Cannot convert a complex variable to an float

  • invalid_argument – Cannot convert a string variable to an float

  • invalid_argument – Cannot convert a bool variable to an float

  • invalid_argument – Variable key not defined

Returns

real value

static inline void setVal(Visitor *V, std::string key, double val)

Set a real value in the variable map corresponding to a name

Parameters
  • V – Blackbird Visitor

  • key – variable name

  • val – variable value