本文整理汇总了C++中Param::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ Param::clear方法的具体用法?C++ Param::clear怎么用?C++ Param::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Param
的用法示例。
在下文中一共展示了Param::clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDefaultParameters
void TransformationModelLinear::getDefaultParameters(Param& params)
{
params.clear();
params.setValue("symmetric_regression", "false", "Perform linear regression"
" on 'y - x' vs. 'y + x', instead of on 'y' vs. 'x'.");
params.setValidStrings("symmetric_regression",
ListUtils::create<String>("true,false"));
}
示例2: getDefaultParameters
void TransformationModelBSpline::getDefaultParameters(Param & params)
{
params.clear();
params.setValue("num_breakpoints", 5, "Number of breakpoints of the cubic spline in the smoothing step. More breakpoints mean less smoothing. Reduce this number if the transformation has an unexpected shape.");
params.setMinInt("num_breakpoints", 2);
params.setValue("break_positions", "uniform", "How to distribute the breakpoints on the retention time scale. 'uniform': intervals of equal size; 'quantiles': equal number of data points per interval.");
params.setValidStrings("break_positions", StringList::create("uniform,quantiles"));
}
示例3: getDefaultParameters
void PeakIntegrator::getDefaultParameters(Param& params)
{
params.clear();
params.setValue("integration_type", INTEGRATION_TYPE_INTENSITYSUM, "The integration technique to use in integratePeak() and estimateBackground() which uses either the summed intensity, integration by Simpson's rule or trapezoidal integration.");
params.setValidStrings("integration_type", ListUtils::create<String>("intensity_sum,simpson,trapezoid"));
params.setValue("baseline_type", BASELINE_TYPE_BASETOBASE, "The baseline type to use in estimateBackground() based on the peak boundaries. A rectangular baseline shape is computed based either on the minimal intensity of the peak boundaries, the maximum intensity or the average intensity (base_to_base).");
params.setValidStrings("baseline_type", ListUtils::create<String>("base_to_base,vertical_division,vertical_division_min,vertical_division_max"));
params.setValue("fit_EMG", "false", "Fit the chromatogram/spectrum to the EMG peak model.");
params.setValidStrings("fit_EMG", ListUtils::create<String>("false,true"));
}
示例4: retrieve
bool retrieve(Param& instance, int& id, net::MessageProtocol::Type type, int& port)
{
instance.clear();
std::string address("127.0.0.1");
net::Socket socket(address, port);
iostream::XdrOutputStream& ostream = socket.getXdrOutputStream();
ostream.write(type);
ostream.flush();
ostream.write(id);
ostream.flush();
checkResponse(socket);
instance.clear();
iostream::XdrInputStream& istream = socket.getXdrInputStream();
instance.decode(istream);
// TODO: Change this
return true;
}
示例5: getDefaultParameters
void TransformationModelLinear::getDefaultParameters(Param& params)
{
params.clear();
params.setValue("symmetric_regression", "false", "Perform linear regression"
" on 'y - x' vs. 'y + x', instead of on 'y' vs. 'x'.");
params.setValidStrings("symmetric_regression",
ListUtils::create<String>("true,false"));
params.setValue("x_weight", "", "Weight x values");
params.setValidStrings("x_weight",
ListUtils::create<String>("1/x,1/x2,ln(x),"));
params.setValue("y_weight", "", "Weight y values");
params.setValidStrings("y_weight",
ListUtils::create<String>("1/y,1/y2,ln(y),"));
params.setValue("x_datum_min", 1e-15, "Minimum x value");
params.setValue("x_datum_max", 1e15, "Maximum x value");
params.setValue("y_datum_min", 1e-15, "Minimum y value");
params.setValue("y_datum_max", 1e15, "Maximum y value");
}
示例6: getDefaultParameters
void TransformationModelLowess::getDefaultParameters(Param& params)
{
params.clear();
params.setValue("span", 2/3.0, "Fraction of datapoints (f) to use for each local regression (determines the amount of smoothing). Choosing this parameter in the range .2 to .8 usually results in a good fit.");
params.setMinFloat("span", 0.0);
params.setMaxFloat("span", 1.0);
params.setValue("num_iterations", 3, "Number of rubstifying iterations for lowess fitting.");
params.setMinInt("num_iterations", 0);
params.setValue("delta", -1.0, "Nonnegative parameter which may be used to save computations (recommended value is 0.01 of the range of the input, e.g. for data ranging from 1000 seconds to 2000 seconds, it could be set to 10). Setting a negative value will automatically do this.");
params.setValue("interpolation_type", "cspline", "Method to use for interpolation between datapoints computed by lowess. 'linear': Linear interpolation. 'cspline': Use the cubic spline for interpolation. 'akima': Use an akima spline for interpolation");
params.setValidStrings("interpolation_type", ListUtils::create<String>("linear,cspline,akima"));
params.setValue("extrapolation_type", "four-point-linear", "Method to use for extrapolation outside the data range. 'two-point-linear': Uses a line through the first and last point to extrapolate. 'four-point-linear': Uses a line through the first and second point to extrapolate in front and and a line through the last and second-to-last point in the end. 'global-linear': Uses a linear regression to fit a line through all data points and use it for interpolation.");
StringList etypes = ListUtils::create<String>("two-point-linear,four-point-linear,global-linear");
params.setValidStrings("extrapolation_type", etypes);
}