9 #ifndef IMPISD_WEIGHT_H
10 #define IMPISD_WEIGHT_H
12 #include <IMP/isd/isd_config.h>
19 IMPISD_BEGIN_NAMESPACE
21 static const int IMPISD_MAX_WEIGHTS = 1000;
58 static IntKey get_number_of_weights_key();
61 static FloatKey get_weight_key(
int i);
67 Float get_weight(
int i)
const;
74 void set_weight_lazy(
int i,
Float wi);
85 bool get_weights_are_optimized()
const;
88 void set_weights_are_optimized(
bool tf);
91 Float get_weight_derivative(
int i)
const;
97 void add_to_weight_derivative(
int i,
Float dwi,
110 void add_weight_lazy(
Float wi = 0);
116 void add_weight(
Float wi = 0);
119 Int get_number_of_weights()
const;
130 void set_number_of_weights_lazy(
Int nweights);
136 void set_number_of_weights(
Int nweights);
144 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
150 WeightSimplexConstraint(
Particle *p)
151 : IMP::
Constraint(p->get_model(),
"WeightSimplexConstraint%1%")
156 virtual void do_update_attributes()
override;
The base class for decorators.
Add weights to a particle.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Storage of a model, its restraints, constraints and particles.
Simple unit simplex class.
Implement a constraint on the Model.
Class for storing model, its restraints, constraints, and particles.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Helper macros for implementing Decorators.
#define IMP_DECORATOR_SETUP_0(Name)
Interface to specialized Particle types (e.g. atoms)
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
virtual ModelObjectsTemp do_get_outputs() const =0
Represent a unit simplex embedded in d-dimensional real space.
#define IMP_DECORATOR_METHODS(Name, Parent)
double Float
Basic floating-point value (could be float, double...)
Class to handle individual particles of a Model object.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
int Int
Basic integer value.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.