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


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

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


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

示例1: remove_if_not_equal

void SingletonPredicate::remove_if_not_equal(Model *m,
                                             ParticleIndexes& ps,
                                             int value) const {
  ps.erase(std::remove_if(ps.begin(), ps.end(),
                          make_predicate_not_equal(this, m, value)),
           ps.end());

}
开发者ID:andreyto,项目名称:imp-fork-proddl,代码行数:8,代码来源:SingletonPredicate.cpp

示例2: get_bond

/* This is implemented like this so that it doesn't read any particles other
   than a and b. To do otherwise would make it rather annoying to use in
   evaluate.
*/
Bond get_bond(Bonded a, Bonded b) {
  if (a == b) return Bond();
  ParticleIndexes ba = a.get_bond_indexes();
  ParticleIndexes bb = b.get_bond_indexes();
  std::sort(bb.begin(), bb.end());
  for (unsigned int i = 0; i < ba.size(); ++i) {
    if (std::binary_search(bb.begin(), bb.end(), ba[i])) {
      return Bond(a.get_model(), ba[i]);
    }
  }
  return Bond();
}
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:16,代码来源:bond_decorators.cpp

示例3: get_close_pairs

ParticleIndexPairs GridClosePairsFinder::get_close_pairs(
    Model *m, const ParticleIndexes &ca,
    const ParticleIndexes &cb) const {
  IMP_OBJECT_LOG;
  set_was_used(true);
  ParticleIndexPairs out;
  internal::ParticleIndexHelper::fill_close_pairs(
      internal::ParticleIndexHelper::get_particle_set(ca.begin(), ca.end(), 0),
      internal::ParticleIndexHelper::get_particle_set(cb.begin(), cb.end(), 1),
      internal::ParticleIndexTraits(m, get_distance()),
      internal::ParticleIndexPairSink(m, access_pair_filters(), out));
  return out;
}
开发者ID:salilab,项目名称:imp,代码行数:13,代码来源:GridClosePairsFinder.cpp

示例4: get_all_possible_indexes

ParticleIndexes SingletonContainerSet::get_all_possible_indexes() const {
  ParticleIndexes sum;
  for (SingletonContainerConstIterator it= singleton_containers_begin();
       it != singleton_containers_end(); ++it) {
    ParticleIndexes cur=(*it)->get_all_possible_indexes();
    sum.insert(sum.end(), cur.begin(), cur.end());
  }
  return sum;
}
开发者ID:andreyto,项目名称:imp-fork-proddl,代码行数:9,代码来源:SingletonContainerSet.cpp

示例5: all

bool InternalDynamicListTripletContainer::
check_list(const ParticleIndexes& cp) const {
  ParticleIndexes app
    = IMP::internal::get_index(scope_->get_all_possible_particles());

  compatibility::set<ParticleIndex> all(app.begin(),
                                    app.end());
  for (unsigned int i=0; i< cp.size(); ++i) {
    IMP_USAGE_CHECK(all.find(cp[i]) != all.end(),
                    "Particle " << cp[i]
                    << " is not in the list of all possible particles");
  }
  return true;
}
开发者ID:andreyto,项目名称:imp-fork-proddl,代码行数:14,代码来源:InternalDynamicListTripletContainer.cpp

示例6: get_simulation_particle_indexes

ParticleIndexes Simulator::get_simulation_particle_indexes() const {
  IMP_OBJECT_LOG;
  ParticleIndexes ps;
  if (get_number_of_particles() == 0) {
    Model *m = get_model();
    ParticleIndexes pis = m->get_particle_indexes();
    for (ParticleIndexes::const_iterator it = pis.begin();
         it != pis.end(); ++it) {
      if (get_is_simulation_particle(*it)) {
        ps.push_back(*it);
      }
    }
  } else {
    ps = IMP::internal::get_index(
        ParticlesTemp(particles_begin(), particles_end()));
  }
  return ps;
}
开发者ID:AljGaber,项目名称:imp,代码行数:18,代码来源:Simulator.cpp


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