示例#1
0
ParticleIndexPairs AllPairContainer::get_range_indexes() const {
  ParticleIndexes ia = c_->get_range_indexes();
  ParticleIndexPairs ret;
  ret.reserve(ia.size() * (ia.size() - 1) / 2);
  for (unsigned int i = 0; i < ia.size(); ++i) {
    for (unsigned int j = 0; j < i; ++j) {
      ret.push_back(ParticleIndexPair(ia[i], ia[j]));
    }
  }
  return ret;
}
ParticleIndexPairs DummyPairContainer::get_range_indexes() const {
  ParticleIndexes pis = c_->get_range_indexes();
  ParticleIndexPairs ret;
  ret.reserve(pis.size() * (pis.size() - 1) / 2);
  for (unsigned int i = 0; i < pis.size(); ++i) {
    for (unsigned int j = 0; j < i; ++j) {
      ret.push_back(ParticleIndexPair(pis[i], pis[j]));
    }
  }
  return ret;
}
ParticleIndexPairs
CoreCloseBipartitePairContainer::get_all_possible_indexes() const {
  ParticleIndexes pis= sc_[0]->get_all_possible_indexes();
  ParticleIndexes pjs= sc_[1]->get_all_possible_indexes();
  ParticleIndexPairs ret; ret.reserve(pis.size()*pjs.size());
  for (unsigned int i=0; i< pis.size(); ++i) {
    for (unsigned int j=0; j< pjs.size(); ++j) {
      ret.push_back(ParticleIndexPair(pis[i], pjs[j]));
    }
  }
  return ret;
}
示例#4
0
ParticleIndexPairs BondPairContainer::get_range_indexes() const {
  ParticleIndexes ia = sc_->get_range_indexes();
  ParticleIndexPairs ret;
  ret.reserve(ia.size());
  for (unsigned int i = 0; i < ia.size(); ++i) {
    Bond b(get_model(), ia[i]);
    ret.push_back(
        ParticleIndexPair(b.get_bonded(0).get_particle_index(),
                                  b.get_bonded(1).get_particle_index()));
  }
  return ret;
}