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<String, Object> result;
|
//predict输入模型
|
private HashMap<String, Object> model;
|
|
#{foreach} ($entity in $modelMethods)
|
public native HashMap<String, Object> ${pyName}${entity.methodName}(#foreach ($column in [1..$entity.dataLength])double data${column}[][], #{end}#{if}($entity.model==1)HashMap<String, Object> models, #{end}HashMap<String, Object> settings);
|
|
@Override
|
public HashMap<String, Object> ${entity.methodName}(#foreach ($column in [1..$entity.dataLength])double data${column}[][], #{end}#{if}($entity.model==1)HashMap<String, Object> models, #{end}HashMap<String, Object> settings) {
|
#{if}($entity.model==1)
|
//model = utils.createPredictHashmapplus(models);
|
model = 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<String, Object>();
|
result.put("status_code", "998");
|
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}
|
}
|