8 #ifndef IMPKERNEL_OPTIMIZER_STATE_H
9 #define IMPKERNEL_OPTIMIZER_STATE_H
11 #include <IMP/kernel_config.h>
18 IMPKERNEL_BEGIN_NAMESPACE
45 unsigned int period_, call_number_, update_number_;
69 virtual void update();
76 virtual void set_is_optimizing(
bool);
80 "Must call set_optimizer before get_optimizer on state");
81 return optimizer_.get();
91 void set_period(
unsigned int p);
100 virtual void reset();
105 void update_always();
121 virtual void do_set_is_optimizing(
bool) {}
135 IMPKERNEL_END_NAMESPACE
#define IMP_FINAL
Have the compiler report an error if anything overrides this method.
unsigned int get_period() const
virtual ModelObjectsTemp do_get_inputs() const
virtual void do_update(unsigned int)
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Ref counted objects should have private destructors.
A weak pointer to an Object or RefCountedObject.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Class for storing model, its restraints, constraints, and particles.
Base class for all optimizers.
A nullptr-initialized pointer to an Object.
Single variable function.
void set_number_of_updates(unsigned int n)
Set the counter.
A shared base class to help in debugging and things.
Shared optimizer state that is invoked upon commitment of new coordinates.
virtual ModelObjectsTemp do_get_outputs() const
unsigned int get_number_of_updates() const
Return the number of times update has been called.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.