コード例 #1
0
ファイル: FunctionUtil.java プロジェクト: nkhuyu/jpmml
  public static FieldValue evaluate(
      Apply apply, List<FieldValue> values, EvaluationContext context) {
    String name = apply.getFunction();

    Function function = getFunction(name);
    if (function == null) {
      DefineFunction defineFunction = context.resolveFunction(name);
      if (defineFunction == null) {
        throw new UnsupportedFeatureException(apply);
      }

      return evaluate(defineFunction, values, context);
    }

    return function.evaluate(values);
  }
コード例 #2
0
ファイル: Apply.java プロジェクト: phadej/uhc
 protected void eraseAllRefs() {
   if (nrNeededParams >= 0) return;
   if (funcOrVal instanceof Apply) ((Apply) funcOrVal).eraseAllRefs();
   eraseRefs();
 }