8 #ifndef IMPKERNEL_OPTIMIZER_STATE_H
9 #define IMPKERNEL_OPTIMIZER_STATE_H
11 #include <IMP/kernel/kernel_config.h>
18 IMPKERNEL_BEGIN_NAMESPACE
45 unsigned int period_, call_number_, update_number_;
62 IMPKERNEL_DEPRECATED_FUNCTION_DECL(2.1)
73 virtual
void update();
80 virtual
void set_is_optimizing(
bool);
84 "Must call set_optimizer before get_optimizer on state");
85 return optimizer_.get();
95 void set_period(
unsigned int p);
104 virtual void reset();
109 void update_always();
125 virtual void do_set_is_optimizing(
bool) {}
139 IMPKERNEL_END_NAMESPACE
A weak pointer to an Object or RefCountedObject.
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
virtual void do_update(unsigned int)
unsigned int get_period() const
Shared optimizer state that is invoked upon commitment of new coordinates.
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Ref counted objects should have private destructors.
IMP::kernel::Optimizer Optimizer
virtual ModelObjectsTemp do_get_inputs() const
Single variable function.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
Base class for all optimizers.
A nullptr-initialized pointer to an Object.
unsigned int get_number_of_updates() const
Return the number of times update has been called.
virtual ModelObjectsTemp do_get_outputs() const
IMP::kernel::OptimizerState OptimizerState
A shared base class to help in debugging and things.
Class for storing model, its restraints, constraints, and particles.
void set_number_of_updates(unsigned int n)
Set the counter.