bool TableFunction::SetVal(const Assignment &a, double val) { int idx = a.GetIndex(); if (idx < 0 || idx == UNKNOWN_VAL || idx >= (int) values.size()) return false; values[idx] = val; return true; }
double TableFunction::GetValForceOldOrder(const Assignment &a, bool logOut) const { int idx = a.GetIndex(); if (idx == UNKNOWN_VAL || idx >= (int) values.size()) { cout << idx << ", Max is: " << values.size() << std::endl; // throw GenericException("Invalid indexing of function: " + idx); } return !logOut ? values[idx] : log10(values[idx]); }