Add weights to a particle.
More...
#include <IMP/isd/Weight.h>
Add weights to a particle.
Weights are constrained to the unit simplex.
- See also
- algebra::UnitSimplexD
Definition at line 29 of file Weight.h.
◆ Weight() [1/3]
| IMP::isd::Weight::Weight |
( |
| ) |
|
◆ Weight() [2/3]
◆ Weight() [3/3]
◆ add_to_weight_derivative()
Add to derivative wrt ith weight.
◆ add_to_weights_derivatives()
Add to derivatives wrt all weights.
◆ add_weight()
| void IMP::isd::Weight::add_weight |
( |
Float | wi = 0 | ) |
|
Extend the weight vector by one element.
This should only be called during set-up and cannot be called for an optimized Weight.
◆ add_weight_lazy()
| void IMP::isd::Weight::add_weight_lazy |
( |
Float | wi = 0 | ) |
|
Extend the weight vector by one element lazily.
This should only be called during set-up and cannot be called for an optimized Weight. This version delays enforcing the simplex constraint until Model::update().
◆ get_is_setup()
◆ get_number_of_weights()
| Int IMP::isd::Weight::get_number_of_weights |
( |
| ) |
const |
◆ get_number_of_weights_key()
| IntKey IMP::isd::Weight::get_number_of_weights_key |
( |
| ) |
|
|
static |
Get number of weights key.
◆ get_unit_simplex()
| algebra::UnitSimplexKD IMP::isd::Weight::get_unit_simplex |
( |
| ) |
const |
Get unit simplex on which weight vector lies.
◆ get_weight()
| Float IMP::isd::Weight::get_weight |
( |
int | i | ) |
const |
◆ get_weight_derivative()
| Float IMP::isd::Weight::get_weight_derivative |
( |
int | i | ) |
const |
Get derivative wrt ith weight.
◆ get_weight_key()
| FloatKey IMP::isd::Weight::get_weight_key |
( |
int | i | ) |
|
|
static |
◆ get_weight_keys()
| FloatKeys IMP::isd::Weight::get_weight_keys |
( |
| ) |
const |
◆ get_weights()
◆ get_weights_are_optimized()
| bool IMP::isd::Weight::get_weights_are_optimized |
( |
| ) |
const |
Get weights are optimized.
◆ get_weights_derivatives()
Get derivatives wrt all weights.
◆ set_number_of_weights()
| void IMP::isd::Weight::set_number_of_weights |
( |
Int | nweights | ) |
|
Set number of weights.
This should only be called during set-up and cannot be called for an optimized Weight. New weights are initialized to 0.
◆ set_number_of_weights_lazy()
| void IMP::isd::Weight::set_number_of_weights_lazy |
( |
Int | nweights | ) |
|
Set number of weights lazily.
This should only be called during set-up and cannot be called for an optimized Weight. New weights are initialized to 0. This version delays enforcing the simplex constraint until Model::update().
◆ set_weight_lazy()
| void IMP::isd::Weight::set_weight_lazy |
( |
int | i, |
|
|
Float | wi ) |
Set the ith weight lazily.
Delay enforcing the simplex constraint until Model::update().
◆ set_weights()
◆ set_weights_are_optimized()
| void IMP::isd::Weight::set_weights_are_optimized |
( |
bool | tf | ) |
|
Set weights are optimized.
◆ set_weights_lazy()
Set all the weights.
Delay enforcing the simplex constraint until Model::update().
◆ setup_particle() [1/6]
- Returns
- a Weight object that decorates the particle specified by pa
- See also
- setup_particle(m, p)
Definition at line 48 of file Weight.h.
◆ setup_particle() [2/6]
- Returns
- a Weight object that decorates the particle specified by pa
- See also
- setup_particle(m, pi, w)
Definition at line 55 of file Weight.h.
◆ setup_particle() [3/6]
- Returns
- a Weight object that decorates the particle specified by pa
- See also
- setup_particle(m, pi, nweights)
Definition at line 52 of file Weight.h.
◆ setup_particle() [4/6]
◆ setup_particle() [5/6]
Set up Weight from the provided weight vector.
- Returns
- a Weight object that decorates particle pi
Definition at line 55 of file Weight.h.
◆ setup_particle() [6/6]
Set up Weight with a fixed number of weights.
All weights are initialized with the same value.
- Returns
- a Weight object that decorates particle pi
Definition at line 52 of file Weight.h.
The documentation for this class was generated from the following file: