8 #ifndef IMPKINEMATICS_DO_FS_SAMPLER_H
9 #define IMPKINEMATICS_DO_FS_SAMPLER_H
11 #include "kinematics_config.h"
14 IMPKINEMATICS_BEGIN_NAMESPACE
26 : IMP::base::Object(
"IMP_KINEMATICS_DOFSSAMPLER"),
28 last_sample_(DOFValues(dofs)) {}
34 last_sample_ = do_get_sample();
44 virtual void apply(
const DOFValues& values) = 0;
66 "Accessing out-of-range dof in DOFsSampler");
70 unsigned int get_number_of_dofs()
const {
return dofs_.size(); }
73 virtual DOFValues do_get_sample()
const = 0;
81 mutable DOFValues last_sample_;
86 IMPKINEMATICS_END_NAMESPACE
a simple class for storage of DOF values.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
DOF const * get_dof(unsigned int i) const
Returns the i'th dof over which this sampler works.
Common base class for heavy weight IMP objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
DOFValues get_sample() const
DOFs const & get_dofs() const
Returns the dofs over which this sampler works.
IMP::base::Vector< IMP::base::Pointer< DOF > > DOFs