提交 | 用户 | 时间
|
449017
|
1 |
package ${pkgName}.impl; |
D |
2 |
|
|
3 |
import ${pkgName}.${pyName}; |
c7009e
|
4 |
import iail.mdk.model.utils.AlgsUtils; |
449017
|
5 |
|
D |
6 |
import java.util.HashMap; |
|
7 |
|
|
8 |
public class ${pyName}Impl extends ${pyName} { |
|
9 |
private AlgsUtils utils = new AlgsUtils(); |
|
10 |
//输出map |
|
11 |
private HashMap<String, Object> result; |
|
12 |
//predict输入模型 |
|
13 |
private HashMap<String, Object> model; |
|
14 |
|
|
15 |
#{foreach} ($entity in $modelMethods) |
|
16 |
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); |
|
17 |
|
|
18 |
@Override |
|
19 |
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) { |
|
20 |
#{if}($entity.model==1) |
a8c6a6
|
21 |
//model = utils.createPredictHashmapplus(models); |
D |
22 |
model = models; |
449017
|
23 |
#{end} |
D |
24 |
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}) { |
|
25 |
result = new HashMap<String, Object>(); |
a18610
|
26 |
result.put("status_code", "998"); |
449017
|
27 |
return result; |
D |
28 |
} |
|
29 |
result = ${pyName}${entity.methodName}(#foreach ($column in [1..$entity.dataLength])data${column}, #{end}#{if}($entity.model==1)model, #{end}settings); |
600fd0
|
30 |
return utils.reverseResult(this.result); |
449017
|
31 |
} |
D |
32 |
#{end} |
|
33 |
} |