public static ValueEval evaluate(OperationPtg ptg, ValueEval[] args,
OperationEvaluationContext ec) {
if(ptg == null) {
throw new IllegalArgumentException("ptg must not be null");
}
Function result = _instancesByPtgClass.get(ptg);
if (result != null) {
return result.evaluate(args, ec.getRowIndex(), (short) ec.getColumnIndex());
}
if (ptg instanceof AbstractFunctionPtg) {
AbstractFunctionPtg fptg = (AbstractFunctionPtg)ptg;
int functionIndex = fptg.getFunctionIndex();