I have many objects with different metrics. I am building a formula based on the user input.
class Object{
double metrics1;
double metrics2;
.. double metricsN; //number of metrics is knowned
}
Users can input
formula=metrics1
or
formula=(metrics1+metrics2)/metrics3
I already have a parser to parse the formula, but I do not know how to store this expression for further calculation.
I want to avoid parsing the formula again and again for every single object (I can have up to a few hundred thousands).