public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval lookup_value, ValueEval table_array,ValueEval col_index, ValueEval range_lookup) {try {ValueEval lookupValue = OperandResolver.getSingleValue(lookup_value, srcRowIndex, srcColumnIndex);TwoDEval tableArray = LookupUtils.resolveTableArrayArg(table_array);boolean isRangeLookup;try {isRangeLookup = LookupUtils.resolveRangeLookupArg(range_lookup, srcRowIndex, srcColumnIndex);} catch(RuntimeException e) {isRangeLookup = true;}int rowIndex = LookupUtils.lookupIndexOfValue(lookupValue, LookupUtils.createColumnVector(tableArray, 0), isRangeLookup);int colIndex = LookupUtils.resolveRowOrColIndexArg(col_index, srcRowIndex, srcColumnIndex);ValueVector resultCol = createResultColumnVector(tableArray, colIndex);return resultCol.getItem(rowIndex);} catch (EvaluationException e) {return e.getErrorEval();}}
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval lookup_value, ValueEval table_array,ValueEval col_index, ValueEval range_lookup){try{ValueEval lookupValue = OperandResolver.GetSingleValue(lookup_value, srcRowIndex, srcColumnIndex);TwoDEval tableArray = LookupUtils.ResolveTableArrayArg(table_array);bool isRangeLookup = LookupUtils.ResolveRangeLookupArg(range_lookup, srcRowIndex, srcColumnIndex);int rowIndex = LookupUtils.LookupIndexOfValue(lookupValue, LookupUtils.CreateColumnVector(tableArray, 0), isRangeLookup);int colIndex = LookupUtils.ResolveRowOrColIndexArg(col_index, srcRowIndex, srcColumnIndex);ValueVector resultCol = CreateResultColumnVector(tableArray, colIndex);return resultCol.GetItem(rowIndex);}catch (EvaluationException e){return e.GetErrorEval();}}