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


C++ VecStr::end方法代码示例

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


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

示例1: icd9ChildrenShortUnordered

// [[Rcpp::export]]
CV icd9ChildrenShortUnordered(const CV &icd9Short,
                              const VecStr &icd9cmReal,
                              const bool onlyReal) {
  icd_set out;
  if (icd9Short.size() == 0) {
    CV out;
    out.attr("icd_short_diag") = true;
    return out;
  }
  List parts         = icd9ShortToParts(icd9Short, "");
  CV mjr             = parts[0];
  CV mnr             = parts[1];
  CV::iterator itmjr = mjr.begin();
  CV::iterator itmnr = mnr.begin();
  for (; itmjr != mjr.end(); ++itmjr, ++itmnr) {
    Str thismjr = as<Str>(*itmjr);
    Str thismnr = as<Str>(*itmnr);
    const CV newminors =
      icd9ExpandMinor(thismnr, icd9IsASingleE(thismjr.c_str()));
    VecStr newshort = as<VecStr>(icd9MajMinToShort(thismjr, newminors));
    out.insert(newshort.begin(), newshort.end());
  }
  if (onlyReal) {
    icd_set out_real;
    icd_set reals(icd9cmReal.begin(), icd9cmReal.end());
    for (icd_set::iterator j = out.begin(); j != out.end(); ++j) {
      if (reals.find(*j) != reals.end()) out_real.insert(*j);
    }
    out = out_real;
  }
  CV rcppOut                     = wrap(out);
  rcppOut.attr("icd_short_diag") = true;
  return rcppOut;
}
开发者ID:anobel,项目名称:icd,代码行数:35,代码来源:ranges.cpp

示例2: icd9ChildrenShort

// [[Rcpp::export]]
CV icd9ChildrenShort(CV icd9Short, const VecStr &icd9cmReal, bool onlyReal) {
  std::set<Str> out;
  if (icd9Short.size() == 0) {
    icd9Short.attr("icd_short_diag") = true;
    return icd9Short;
  }
  List parts         = icd9ShortToParts(icd9Short, "");
  CV mjr             = parts[0];
  CV mnr             = parts[1];
  CV::iterator itmjr = mjr.begin();
  CV::iterator itmnr = mnr.begin();
  for (; itmjr != mjr.end(); ++itmjr, ++itmnr) {
    Str thismjr = as<Str>(*itmjr);
    Str thismnr = as<Str>(*itmnr);
    const CV newminors =
      icd9ExpandMinor(thismnr, icd9IsASingleE(thismjr.c_str()));
    VecStr newshort = as<VecStr>(icd9MajMinToShort(thismjr, newminors));
    out.insert(newshort.begin(), newshort.end());
  }
  if (onlyReal) {
    std::set<Str> out_real;
    const std::set<Str> reals(icd9cmReal.begin(), icd9cmReal.end());
    std::set_intersection(out.begin(),
                          out.end(),
                          reals.begin(),
                          reals.end(),
                          std::inserter(out_real, out_real.begin()));
    out = out_real;
  }
  CV rcppOut                     = wrap(out);
  rcppOut.attr("icd_short_diag") = true;
  return rcppOut;
}
开发者ID:anobel,项目名称:icd,代码行数:34,代码来源:ranges.cpp

示例3: InitParsers

void ParserMgr::InitParsers()
{
#ifdef DEBUG_PM_FUNC
    ScopeTracker st("ParserMgr::InitParsers", std::this_thread::get_id());
#endif
    try
    {
        VecStr expressions;
        for (size_t i=0; i<ds::NUM_MODELS; ++i)
        {
            const ParamModelBase* model = _modelMgr->Model((ds::PMODEL)i);
            if (model->DoEvaluate())
            {
                VecStr model_exprns = model->Expressions();
                expressions.insert(expressions.end(),
                                       model_exprns.begin(),
                                       model_exprns.end());
            }
        }
        SetExpression(expressions);
            //Note that the expressions are not actually evaluated at this point
    }
    catch (mu::ParserError& e)
    {
        _log->AddExcept("ParserMgr::InitParsers: " + std::string(e.GetMsg()));
    }
}
开发者ID:mattphillipsphd,项目名称:DynaSys,代码行数:27,代码来源:parsermgr.cpp

示例4: set_hint

void GameplayChat::set_hint(const std::string& hi)
{
    set_draw_required();
    hints.clear();
    if (hi.empty()) return;

    const std::string replaced = hint_replace_keywords_except_newlines(hi);

    typedef std::vector <std::string> VecStr;
    VecStr lines;
    Console::break_lines(lines, replaced, font_med, LEMSCR_X - 6);

    for (VecStr::iterator itr = lines.begin(); itr != lines.end(); ++itr) {
        Api::Label lab(3, y_hint_first + y_hint_plus * hints.size());
        hints.push_back(lab);
        hints.back().set_text(*itr);
        hints.back().set_undraw_color(color[COL_PINK]);
    }
}
开发者ID:Lucki,项目名称:Lix,代码行数:19,代码来源:tutorial.cpp


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