提交 | 用户 | 时间
|
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) |
|
21 |
model = utils.createPredictHashmapplus(models); |
|
22 |
#{end} |
|
23 |
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}) { |
|
24 |
result = new HashMap<String, Object>(); |
600fd0
|
25 |
result.put("status_code", "400"); |
449017
|
26 |
return result; |
D |
27 |
} |
|
28 |
result = ${pyName}${entity.methodName}(#foreach ($column in [1..$entity.dataLength])data${column}, #{end}#{if}($entity.model==1)model, #{end}settings); |
|
29 |
|
600fd0
|
30 |
return utils.reverseResult(this.result); |
449017
|
31 |
} |
D |
32 |
#{end} |
|
33 |
} |