package ${pkgName}.impl; import ${pkgName}.${pyName}; import iail.mdk.model.utils.AlgsUtils; import java.util.HashMap; public class ${pyName}Impl extends ${pyName} { private AlgsUtils utils = new AlgsUtils(); //输出map private HashMap result; //predict输入模型 private HashMap model; #{foreach} ($entity in $modelMethods) public native HashMap ${pyName}${entity.methodName}(#foreach ($column in [1..$entity.dataLength])double data${column}[][], #{end}#{if}($entity.model==1)HashMap models, #{end}HashMap settings); @Override public HashMap ${entity.methodName}(#foreach ($column in [1..$entity.dataLength])double data${column}[][], #{end}#{if}($entity.model==1)HashMap models, #{end}HashMap settings) { #{if}($entity.model==1) model = utils.createPredictHashmapplus(models); #{end} if (#{foreach} ($column in [1..$entity.dataLength])#{if}($column==1)data${column} == null || data${column}.length == 0 || data${column}[0].length == 0#{else} || data${column} == null || data${column}.length == 0 || data${column}[0].length == 0#{end}#{end}) { result = new HashMap(); result.put("status_code", "400"); return result; } result = ${pyName}${entity.methodName}(#foreach ($column in [1..$entity.dataLength])data${column}, #{end}#{if}($entity.model==1)model, #{end}settings); return utils.reverseResult(this.result); } #{end} }