use of org.apache.sysml.parser.DataIdentifier in project incubator-systemml by apache.
the class ExternalFunctionProgramBlock method getParameterString.
/**
* Given a list of parameters as data identifiers, returns a string
* representation.
*
* @param params list of data identifiers
* @return parameter string
*/
protected String getParameterString(ArrayList<DataIdentifier> params) {
String parameterString = "";
for (int i = 0; i < params.size(); i++) {
if (i != 0)
parameterString += ",";
DataIdentifier param = params.get(i);
if (param.getDataType() == DataType.MATRIX) {
String s = getDataTypeString(DataType.MATRIX) + ":";
s = s + "" + param.getName() + "" + ":";
s = s + getValueTypeString(param.getValueType());
parameterString += s;
continue;
}
if (param.getDataType() == DataType.SCALAR) {
String s = getDataTypeString(DataType.SCALAR) + ":";
s = s + "" + param.getName() + "" + ":";
s = s + getValueTypeString(param.getValueType());
parameterString += s;
continue;
}
if (param.getDataType() == DataType.OBJECT) {
String s = getDataTypeString(DataType.OBJECT) + ":";
s = s + "" + param.getName() + "" + ":";
parameterString += s;
continue;
}
}
return parameterString;
}
Aggregations