void update(const string& key,double val) { int idx = -1; bool found = da.exactMatchExists(key.c_str(),key.size(),&idx); if(found) { data[idx] = val; return; } insert(key,val); }
bool exists(const string& key,double &old) { int idx = -1; bool found = da.exactMatchExists(key.c_str(),key.size(),&idx); if(found) old = data[idx]; return found; }