本文整理汇总了C++中ptr_vector::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ ptr_vector::begin方法的具体用法?C++ ptr_vector::begin怎么用?C++ ptr_vector::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ptr_vector
的用法示例。
在下文中一共展示了ptr_vector::begin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dealloc_ptr_vector_content
void dealloc_ptr_vector_content(ptr_vector<relation_base> & v) {
ptr_vector<relation_base>::iterator it = v.begin();
ptr_vector<relation_base>::iterator end = v.end();
for(; it!=end; ++it) {
(*it)->deallocate();
}
}
示例2: display_clauses
void context::display_clauses(std::ostream & out, ptr_vector<clause> const & v) const {
ptr_vector<clause>::const_iterator it = v.begin();
ptr_vector<clause>::const_iterator end = v.end();
for (; it != end; ++it) {
display_clause(out, *it);
out << "\n";
}
}
示例3: del_monomials
void grobner::del_monomials(ptr_vector<monomial>& ms) {
ptr_vector<monomial>::iterator it = ms.begin();
ptr_vector<monomial>::iterator end = ms.end();
for (; it != end; ++it) {
del_monomial(*it);
}
ms.reset();
}
示例4: get_common_spec
void product_relation_plugin::get_common_spec(const ptr_vector<const product_relation> & rels,
rel_spec & res) {
vector<rel_spec> specs;
ptr_vector<const product_relation>::const_iterator rit = rels.begin();
ptr_vector<const product_relation>::const_iterator rend = rels.end();
for(; rit!=rend; ++rit) {
specs.push_back((*rit)->m_spec);
}
vector<rel_spec>::iterator sit = specs.begin();
vector<rel_spec>::iterator send = specs.end();
for(; sit!=send; ++sit) {
rel_spec & s = *sit;
std::sort(s.begin(), s.end());
}
res.reset();
for(;;) {
family_id next = -1;
sit = specs.begin();
for(; sit!=send; ++sit) {
rel_spec & s = *sit;
if(!s.empty() && s.back()>next) {
next = s.back();
}
}
if(next==-1) {
//we're done
break;
}
res.push_back(next);
sit = specs.begin();
for(; sit!=send; ++sit) {
rel_spec & s = *sit;
if(!s.empty() && s.back()==next) {
s.pop_back();
}
}
}
}
示例5: collect
static void collect() {
std::for_each(g_datas.begin(), g_datas.end(), delete_proc<data>());
}
示例6:
~datatype_decl() {
std::for_each(m_constructors.begin(), m_constructors.end(), delete_proc<constructor_decl>());
}