mirror of https://github.com/CGAL/cgal
fix name of filtered_bond
This commit is contained in:
parent
7a340e9d8d
commit
9c2037dde3
|
|
@ -178,10 +178,10 @@ make_ca_range(Range r){
|
|||
}
|
||||
|
||||
|
||||
template <class OK_atom>
|
||||
struct Is_ok_bond {
|
||||
template <class Atom_filter>
|
||||
struct Filtered_atom_bond_filter {
|
||||
typedef bool result_type;
|
||||
Is_ok_bond(OK_atom ao): ao_(ao){}
|
||||
Filtered_atom_bond_filter(Atom_filter ao): ao_(ao){}
|
||||
|
||||
struct Atom_pair{
|
||||
Monomer::Atom_key k_;
|
||||
|
|
@ -205,14 +205,14 @@ struct Is_ok_bond {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
OK_atom ao_;
|
||||
Atom_filter ao_;
|
||||
};
|
||||
|
||||
//! Return an iterator range which returns skips non-backbone atoms
|
||||
template <class Range, class OKA>
|
||||
internal::rangelib::filtered_range<Range, Is_ok_bond<OKA> >
|
||||
make_backbone_range(OKA oka, Range r){
|
||||
return internal::rangelib::filtered(r, Is_ok_bond<OKA>(oka));
|
||||
template <class Range, class AtomFilter>
|
||||
internal::rangelib::filtered_range<Range, Filtered_atom_bond_filter<AtomFilter> >
|
||||
make_filtered_bond_range(AtomFilter oka, Range r){
|
||||
return internal::rangelib::filtered(r, Filtered_atom_bond_filter<AtomFilter>(oka));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ int main() {
|
|||
assert(bbi.size() < atoms.size());
|
||||
std::cout << bbi.size() << std::endl;
|
||||
std::vector<Bond> bbs;
|
||||
fill(bbs, make_bond_indices_range(make_ok_bond_range(Is_backbone(), p.bonds())));
|
||||
fill(bbs, make_bond_indices_range(make_filtered_bond_range(Is_backbone(), p.bonds())));
|
||||
std::cout << bbs.size() << std::endl;
|
||||
for (unsigned int i=0; i< bbs.size(); ++i) {
|
||||
assert(bbs[i].first < Index(bbi.size()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue