18#ifndef VOTCA_CSG_NBLIST_H
19#define VOTCA_CSG_NBLIST_H
46 bool do_exclusions =
true);
73 bool (T::*fkt)(
Bead *,
Bead *,
const Eigen::Vector3d &,
86 template <
typename pair_type>
96 template <
typename pair_type>
98 const Eigen::Vector3d &r) {
99 return dynamic_cast<BeadPair *
>(
new pair_type(bead1, bead2, r));
113 const double dist) = 0;
118 template <
typename T>
126 double dist)
override {
127 return (
cls_->*
fkt_)(b1, b2, r, dist);
142 double dist)
override {
143 return (*
fkt_)(b1, b2, r, dist);
153template <
typename pair_type>
161 const Eigen::Vector3d &,
167 const Eigen::Vector3d &,
Functor for member functions.
bool operator()(Bead *b1, Bead *b2, const Eigen::Vector3d &r, double dist) override
bool(T::*)(Bead *, Bead *, const Eigen::Vector3d &, double) fkt_t
FunctorMember(T *cls, fkt_t fkt)
Functor for non-member functions.
FunctorNonMember(fkt_t fkt)
bool(*)(Bead *, Bead *, const Eigen::Vector3d &, double) fkt_t
bool operator()(Bead *b1, Bead *b2, const Eigen::Vector3d &r, double dist) override
virtual ~Functor()=default
virtual bool operator()(Bead *, Bead *, const Eigen::Vector3d &, const double dist)=0
virtual void Generate(BeadList &list1, BeadList &list2, bool do_exclusions=true)
Generate the neighbour list based on two bead lists (e.g. bead types)
std::unique_ptr< Functor > match_function_
virtual void Generate(BeadList &list, bool do_exclusions=true)
Generate the neighbour list based on a single bead list.
bool do_exclusions_
take into account exclusions from topolgoy
BeadPair *(*)(Bead *, Bead *, const Eigen::Vector3d &) pair_creator_t
void setPairType()
function to use a user defined pair type
double getCutoff() const
get the cutoff for the neighbour search
void SetMatchFunction(T *object, bool(T::*fkt)(Bead *, Bead *, const Eigen::Vector3d &, double dist))
match function for class member functions
void setCutoff(double cutoff)
set the cutoff for the neighbour search
static BeadPair * beadpair_create_policy(Bead *bead1, Bead *bead2, const Eigen::Vector3d &r)
policy function to create new bead types
static bool match_always(Bead *, Bead *, const Eigen::Vector3d &, double)
standard match function
pair_creator_t pair_creator_
the current bead pair creator function
base class for all analysis tools