8 noiWordIn (
const char*
_) { ostringstream inp; inp <<
_;
val = inp.str(); };
19 operator double () { istringstream iss (
val);
double rval; iss >> rval;
return rval; };
20 operator const char* () {
return val.c_str(); };
26 for (
auto W : words)
data.push_back(W.val);
33 auto iter = find(
data.begin(),
data.end(),key);
34 if (iter ==
data.end()) {
35 throw runtime_error(Form(
"Failed to find key \"%s\" in noiDict",key.c_str()));
38 int i_iter = iter-
data.begin();
40 throw runtime_error(Form(
"Failed to find value for key \"%s\" offset by %i in noiDict",key.c_str(),
offset));
51 for (
auto& val : opt.
data) cout << val <<
" "; cout << endl;