当前位置: 首页>>代码示例>>C++>>正文


C++ Param::setValidStrings方法代码示例

本文整理汇总了C++中Param::setValidStrings方法的典型用法代码示例。如果您正苦于以下问题:C++ Param::setValidStrings方法的具体用法?C++ Param::setValidStrings怎么用?C++ Param::setValidStrings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Param的用法示例。


在下文中一共展示了Param::setValidStrings方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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"));
  }
开发者ID:OpenMS,项目名称:OpenMS,代码行数:13,代码来源:PeakIntegrator.cpp

示例2: getParameters

  Param MSSim::getParameters() const
  {
    Param tmp;
    tmp.insert("", this->param_); // get non-labeling options

    vector<String> products = Factory<BaseLabeler>::registeredProducts();

    tmp.setValue("Labeling:type", "labelfree", "Select the labeling type you want for your experiment");
    tmp.setValidStrings("Labeling:type", products);

    for (vector<String>::iterator product_name = products.begin(); product_name != products.end(); ++product_name)
    {
      BaseLabeler* labeler = Factory<BaseLabeler>::create(*product_name);
      if (labeler)
      {
        tmp.insert("Labeling:" + *product_name + ":", labeler->getDefaultParameters());
        if (!tmp.copy("Labeling:" + *product_name).empty())
        {
          // if parameters of labeler are empty, the section will not exist and
          // the command below would fail
          tmp.setSectionDescription("Labeling:" + *product_name, labeler->getDescription());
        }
        delete(labeler);
      }
      else
      {
        throw Exception::InvalidValue(__FILE__, __LINE__, __PRETTY_FUNCTION__, "This labeler returned by the Factory is invalid!", product_name->c_str()); 
      }
    }

    return tmp;
  }
开发者ID:chahuistle,项目名称:OpenMS,代码行数:32,代码来源:MSSim.cpp

示例3: 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"));
 }
开发者ID:FabianAicheler,项目名称:OpenMS,代码行数:8,代码来源:TransformationModelLinear.cpp

示例4: 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"));
 }
开发者ID:aiche,项目名称:open-ms-mirror,代码行数:8,代码来源:TransformationModel.C

示例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");
 }
开发者ID:OpenMS,项目名称:OpenMS,代码行数:18,代码来源:TransformationModelLinear.cpp

示例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);
  }
开发者ID:chahuistle,项目名称:OpenMS,代码行数:19,代码来源:TransformationModelLowess.cpp


注:本文中的Param::setValidStrings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。