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


C++ svector::push_back方法代码示例

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


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

示例1: get_assignment

/**
   \brief return the complement of variables that are currently assigned.
*/
void theory_wmaxsat::get_assignment(svector<bool>& result) {
    result.reset();
    
    if (!m_found_optimal) {
        for (unsigned i = 0; i < m_vars.size(); ++i) {
            result.push_back(false);
        }
    }
    else {
        std::sort(m_cost_save.begin(), m_cost_save.end());
        for (unsigned i = 0,j = 0; i < m_vars.size(); ++i) {
            if (j < m_cost_save.size() && m_cost_save[j] == static_cast<theory_var>(i)) {
                result.push_back(false);
                ++j;
            }
            else {
                result.push_back(true);
            }
        }
    }
    TRACE("opt",
          tout << "cost save: ";
          for (unsigned i = 0; i < m_cost_save.size(); ++i) {
              tout << m_cost_save[i] << " ";
          }
          tout << "\nvars: ";
          for (unsigned i = 0; i < m_vars.size(); ++i) {
              tout << mk_pp(m_vars[i].get(), get_manager()) << " ";
          }
          tout << "\nassignment: ";
          for (unsigned i = 0; i < result.size(); ++i) {
              tout << result[i] << " ";
          }
          tout << "\n";);                  
开发者ID:MyOwnClone,项目名称:z3,代码行数:37,代码来源:theory_wmaxsat.cpp

示例2:

void proof_checker::hyp_decl_plugin::get_op_names(svector<builtin_name> & op_names, symbol const & logic) {
    if (logic == symbol::null) {
        op_names.push_back(builtin_name("cons", OP_CONS));
        op_names.push_back(builtin_name("atom", OP_ATOM));
        op_names.push_back(builtin_name("nil", OP_NIL));
    }
}
开发者ID:chadbrewbaker,项目名称:z3,代码行数:7,代码来源:proof_checker.cpp

示例3: get_op_names

void special_relations_decl_plugin::get_op_names(svector<builtin_name> & op_names, symbol const & logic) {
    if (logic == symbol::null) {
        op_names.push_back(builtin_name(m_po.bare_str(), OP_SPECIAL_RELATION_PO));
        op_names.push_back(builtin_name(m_po_ao.bare_str(), OP_SPECIAL_RELATION_PO_AO));
        op_names.push_back(builtin_name(m_lo.bare_str(), OP_SPECIAL_RELATION_LO));
        op_names.push_back(builtin_name(m_plo.bare_str(), OP_SPECIAL_RELATION_PLO));
        op_names.push_back(builtin_name(m_to.bare_str(), OP_SPECIAL_RELATION_TO));
    }
}
开发者ID:thorstent,项目名称:TARA,代码行数:9,代码来源:special_relations_decl_plugin.cpp

示例4: get_op_names

void pb_decl_plugin::get_op_names(svector<builtin_name> & op_names, symbol const & logic) {
    if (logic == symbol::null) {
        op_names.push_back(builtin_name(m_at_most_sym.bare_str(), OP_AT_MOST_K));
        op_names.push_back(builtin_name(m_at_least_sym.bare_str(), OP_AT_LEAST_K));
        op_names.push_back(builtin_name(m_pble_sym.bare_str(), OP_PB_LE));
        op_names.push_back(builtin_name(m_pbge_sym.bare_str(), OP_PB_GE));
        op_names.push_back(builtin_name(m_pbeq_sym.bare_str(), OP_PB_EQ));
    }
}
开发者ID:EinNarr,项目名称:z3,代码行数:9,代码来源:pb_decl_plugin.cpp

示例5: get_sort_names

void float_decl_plugin::get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) {
    sort_names.push_back(builtin_name("FloatingPoint", FLOAT_SORT));
    sort_names.push_back(builtin_name("RoundingMode", ROUNDING_MODE_SORT));

    // The final theory supports three common FloatingPoint sorts
    sort_names.push_back(builtin_name("Float16", FLOAT16_SORT));
    sort_names.push_back(builtin_name("Float32", FLOAT32_SORT));
    sort_names.push_back(builtin_name("Float64", FLOAT64_SORT));
    sort_names.push_back(builtin_name("Float128", FLOAT128_SORT));
}
开发者ID:jackluo923,项目名称:juxta,代码行数:10,代码来源:float_decl_plugin.cpp

示例6: prepare

 void prepare(svector<iovec>& v, void* ptr, const int sender=-1) {
     Task<Image> * task = (Task<Image> *) ptr;
     Blob* blob = task->getBlob();
     task->get()->magick("BMP");
     task->get()->write(blob);
     struct iovec iov={const_cast<void*>(blob->data()),blob->length()};
     v.push_back(iov);
     setCallbackArg(ptr);
     const char * imagename = task->name().c_str();
     struct iovec iov2={const_cast<char*>(imagename),strlen(imagename)+1};
     v.push_back(iov2);
     setCallbackArg(nullptr);
 }    
开发者ID:dido18,项目名称:SPMWorkspace,代码行数:13,代码来源:img_d.cpp

示例7: mk_negations

 void rule_manager::mk_negations(app_ref_vector& body, svector<bool>& is_negated) {
     for (unsigned i = 0; i < body.size(); ++i) {
         expr* e = body[i].get(), *e1;
         if (m.is_not(e, e1) && m_ctx.is_predicate(e1)) {
             check_app(e1);
             body[i] = to_app(e1);
             is_negated.push_back(true);
         }
         else {
             is_negated.push_back(false);
         }
     }        
 }
开发者ID:AleksandarZeljic,项目名称:z3,代码行数:13,代码来源:dl_rule.cpp

示例8: visit

 void visit(expr * n, unsigned delta, bool & visited) {
     expr_delta_pair e(n, delta);
     if (!m_cache.contains(e)) {
         m_todo.push_back(e);
         visited = false;
     }
 }
开发者ID:jackluo923,项目名称:juxta,代码行数:7,代码来源:has_free_vars.cpp

示例9: set_value_p

 void set_value_p(app* e, expr* v) {
     SASSERT(e->get_num_args() == 0);  
     SASSERT(is_uninterp_const(e));
     m_const.push_back(std::make_pair(e, v));
     m_refs.push_back(e);
     m_refs.push_back(v);
 }
开发者ID:AleksandarZeljic,项目名称:z3,代码行数:7,代码来源:pb_preprocess_tactic.cpp

示例10: set_next_arg

 void set_next_arg(cmd_context & ctx, symbol const & s) override {
     cmd * c = ctx.find_cmd(s);
     if (c == nullptr) {
         std::string err_msg("unknown command '");
         err_msg = err_msg + s.bare_str() + "'";
         throw cmd_exception(std::move(err_msg));
     }
     m_cmds.push_back(s);
 }
开发者ID:NikolajBjorner,项目名称:z3,代码行数:9,代码来源:basic_cmds.cpp

示例11: set_next_arg

 virtual void set_next_arg(cmd_context & ctx, symbol const & s) {
     cmd * c = ctx.find_cmd(s);
     if (c == 0) {
         std::string err_msg("unknown command '");
         err_msg = err_msg + s.bare_str() + "'";
         throw cmd_exception(err_msg);
     }
     m_cmds.push_back(s);
 }
开发者ID:sukwon0709,项目名称:byterun,代码行数:9,代码来源:basic_cmds.cpp

示例12: set_next_arg

 virtual void set_next_arg(cmd_context & ctx, symbol const & s) {
     if(m_arg_idx==0) {
         m_rel_name = s;
     }
     else {
         SASSERT(m_arg_idx>1);
         m_kinds.push_back(s);
     }
     m_arg_idx++;
 }
开发者ID:sukwon0709,项目名称:byterun,代码行数:10,代码来源:dl_cmds.cpp

示例13: insert

 void insert(symbol const & name, param_kind k, char const * descr) {
     SASSERT(!name.is_numerical());
     info i;
     if (m_info.find(name, i)) {
         SASSERT(i.first == k);
         return;
     }
     m_info.insert(name, info(k, descr));
     m_names.push_back(name);
 }
开发者ID:sukwon0709,项目名称:byterun,代码行数:10,代码来源:params.cpp

示例14: Load

void SArtefactActivation::Load()
{
	for(int i=0; i<(int)eMax; ++i)
		m_activation_states.push_back(SStateDef());

	LPCSTR activation_seq = pSettings->r_string(*m_af->cNameSect(),"artefact_activation_seq");


	m_activation_states[(int)eStarting].Load(activation_seq,	"starting");
	m_activation_states[(int)eFlying].Load(activation_seq,		"flying");
	m_activation_states[(int)eBeforeSpawn].Load(activation_seq,	"idle_before_spawning");
	m_activation_states[(int)eSpawnZone].Load(activation_seq,	"spawning");

}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:14,代码来源:Artifact.cpp

示例15: operator

 // return true if n contains a variable in the range [begin, end]
 bool operator()(expr * n, unsigned begin = 0, unsigned end = UINT_MAX) {
     m_contains   = false;
     m_window     = end - begin;
     m_todo.reset();
     m_cache.reset();
     m_todo.push_back(expr_delta_pair(n, begin));
     while (!m_todo.empty()) {
         expr_delta_pair e = m_todo.back();
         if (visit_children(e.m_node, e.m_delta)) {
             m_cache.insert(e);
             m_todo.pop_back();
         }
         if (m_contains) {
             return true;
         }
     }
     SASSERT(!m_contains);
     return false;
 }
开发者ID:jackluo923,项目名称:juxta,代码行数:20,代码来源:has_free_vars.cpp


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