Function ADS::evaluate

Function Documentation

double ADS::evaluate(const BinaryTree<std::string> *t, const std::map<std::string, double> &env = {})

the value of the expression t, with the variables valued by env; a leaf is a number, possibly signed (e.g., -3, +2.5, .5), or a variable

Pre:

t is not nil, env values each variable, no division by 0