You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/nmNum/nmCalculation/nmFitPlatformParameters.h

27 lines
887 B
C

#ifndef NMFITPLATFORMPARAMETERS_H
#define NMFITPLATFORMPARAMETERS_H
#include "nmDataAutomaticFitting.h"
#include "nmFitTypes.h"
/** @brief 将项目参数转换为独立模块的值对象,保留顺序和业务单位。 */
inline QVector<nmFitParameterValue> nmConvertFitParameters(const QVector<nmFitParameter>& source)
{
QVector<nmFitParameterValue> result;
for(int i = 0; i < source.size(); ++i) {
const nmFitParameter& p = source[i];
nmFitParameterValue v;
v.type = p.type;
v.selected = p.selected;
v.initial = p.initial;
v.lower = p.lower;
v.upper = p.upper;
v.wellCode = p.wellCode;
v.wellName = p.wellName;
v.label = p.name();
v.parameterCode = p.code();
v.parameterUnit = p.unit();
result.append(v);
}
return result;
}
#endif // NMFITPLATFORMPARAMETERS_H