package com.iailab.module.model.command;
|
|
import com.iailab.module.mcs.dto.StModelDTO;
|
import com.iailab.module.model.sample.dto.SampleData;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @author PanZhibao
|
* @Description
|
* @createTime 2023年05月17日 11:50:00
|
*/
|
@Slf4j
|
@Component
|
public class MLCommand {
|
|
public Object[] getCommand(StModelDTO stModel, List<Object> params, Map<String, Object> settings, List<SampleData> sampleDataList) {
|
|
int portLength = sampleDataList.size();
|
Object[] paramValues = new Object[portLength + 1];
|
for (int i = 0; i < portLength; i++) {
|
paramValues[i] = sampleDataList.get(i).getMatrix();
|
}
|
paramValues[portLength] = settings;
|
return paramValues;
|
}
|
|
public Object[] getCommand1(StModelDTO stModel, List<Object> params, Map<String, Object> settings, List<double[][]> sampleDataList) {
|
|
int portLength = sampleDataList.size();
|
Object[] paramValues = new Object[portLength + 1];
|
for (int i = 0; i < portLength; i++) {
|
paramValues[i] = sampleDataList.get(i);
|
}
|
paramValues[portLength] = settings;
|
return paramValues;
|
}
|
}
|