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_;
70 virtual void update();
78 virtual void set_is_optimizing(
bool);
82 "Must call set_optimizer before get_optimizer on state");
83 return optimizer_.get();
94 void set_period(
unsigned int p);
103 virtual void reset();
106 void update_always();
122 virtual void do_set_is_optimizing(
bool) {}
136 IMPKERNEL_END_NAMESPACE
#define IMP_FINAL
Have the compiler report an error if anything overrides this method.
unsigned int get_period() const
Get the periodicity of this state.
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.
A more IMP-like version of the std::vector.
#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 of number of times do_update() has been called.
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 do_update() has been called.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.