本文整理汇总了C++中Iter::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Iter::end方法的具体用法?C++ Iter::end怎么用?C++ Iter::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Iter
的用法示例。
在下文中一共展示了Iter::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: image_filter_short_run
inline void image_filter_short_run(Iter i, const Iter end, const int max_length, const Color& color) {
for (; i != end; i++)
filter_run(i.begin(), i.end(), max_length, std::less<size_t>(), color);
}
示例2: if
LiveWLdiagram::Status LiveWLdiagram :: walk (double dtime, Worm& worm, Iter& it_block)
{
#ifdef DEBUG_MODE
check_online (worm);
check_halt_time (worm);
#endif
// Get the block and the time-distance to the block
int site = worm.it()->site();
it_block = worm.up() ? ++Iter(worm.it()) : --Iter(worm.it());
const Iter& fix = (worm.it()->z.comp() == 0 ? fix_a : fix_b);
#ifdef NN_INTERACTION
// Check the neighbor kinks
int block_nbi = -1;
if (worm.up())
for(int nbi = 0; nbi < _latt(site).nbs(); ++nbi) {
Iter it_ass = worm.it()->assoc(nbi);
if (it_ass->time() < it_block->time()) {
it_block = it_ass;
block_nbi = nbi;
}
}
else
for(int nbi = 0; nbi < _latt(site).nbs(); ++nbi) {
Iter it_ass = --Iter(worm.it()->assoc(nbi));
if (it_ass->time() > it_block->time()) {
it_block = it_ass;
block_nbi = nbi;
}
}
#endif
double dtime_block = fabs (it_block->time() - worm.it()->time());
// Check force-halt
double dtime_halt = fabs (halt_times(worm.ti) - worm.it()->time());
double dtime_stop = (dtime_halt < dtime_block ? dtime_halt : dtime_block);
bool force_halt = (dtime_halt < dtime_block ? true : false);
// Free
if (dtime < dtime_stop) {
Wld::walk (worm, dtime);
return FREE;
}
// Force halt
else if (force_halt) {
Wld::walk (worm, dtime_stop);
if (worm.up())
worm.ti++;
else
worm.ti--;
return FORCED_HALTED;
}
#ifdef NN_INTERACTION
// Pass neighbor
else if (block_nbi != -1) {
Wld::pass_neighbor (worm.up(), worm.it(), it_block, block_nbi);
return PASS_NEIGHBOR;
}
#endif
// Cross end
else if (it_block->end()) {
this->cross_end (worm);
return CROSS_END;
}
// Cross node
else if (it_block->z.comp() != worm.it()->z.comp()
|| it_block->z.creat() == worm.it()->z.creat())
{
Wld::cross_node (worm);
return CROSS_NODE;
}
// Meet fix-worm
else if (it_block == fix) {
return CRASH;
}
// Halted
else {
Wld::halt (worm);
return HALTED;
}
}
示例3: image_filter_long_run
inline void image_filter_long_run(Iter i, const Iter end, const int min_length, const Color& color) {
for (; i != end; i++)
filter_run(i.begin(), i.end(), min_length, std::greater<size_t>(), color);
}