Holds multiple particles, their states and the current marginalization state.
Public Member Functions | |
void | clear () |
std::vector< CombState * > * | find_minimum (bool move_to_state=false, unsigned int num_of_solutions=1) |
Finds the minimum combination in the node. | |
void | get_intersection (const JNode &other, Particles &in) const |
Get the set of intersecting particles between two nodes. | |
void | get_intersection2 (const JNode &other, Particles in) const |
unsigned int | get_node_index () const |
const Particles * | get_particles () const |
const DiscreteSampler * | get_sampler () |
Float | get_score (const CombState &comb) |
Get the score for this combination. | |
CombState * | get_state (unsigned int index, bool move_to_state=false) |
void | init_sampling (DiscreteSampler &ds) |
Set the discrete sampling space of each of particles in the node. | |
bool | is_part (const Particles &p) const |
checks if the input set of particles is part of the node | |
JNode (const Particles &p, int node_ind) | |
Constructor. | |
std::vector< CombState * > | min_marginalize (const CombState &s, bool move_to_state=false) |
void | move2state (CombState *cs) |
Move the system to the state encoded in the class. | |
void | populate_states_of_particles (Particles *particles, Combinations *states) |
Fill states as encoded in the node for the input subset of particles. | |
void | realize (Restraint *r, Particles *ps, Float weight) |
Adds the restraint values to all combinations. | |
void | set_restraint_evaluator (RestraintEvaluatorI *rstr_eval) |
void | show (std::ostream &out=std::cout) const |
void | show_sampling_space (std::ostream &out=std::cout) const |
void | update_potentials (const std::map< std::string, float > &old_score_separators, const std::map< std::string, float > &new_score_separators, const Particles &intersection_particles) |
Update the potentials. | |
Protected Attributes | |
Combinations | comb_states_ |
std::vector< std::string > | comb_states_keys_ |
DiscreteSampler * | ds_ |
unsigned int | node_ind_ |
Particles | particles_ |
RestraintEvaluatorI * | rstr_eval_ |
IMP::domino::JNode::JNode | ( | const Particles & | p, | |
int | node_ind | |||
) |
std::vector<CombState *>* IMP::domino::JNode::find_minimum | ( | bool | move_to_state = false , |
|
unsigned int | num_of_solutions = 1 | |||
) |
Finds the minimum combination in the node.
[in] | move_to_state | true if the model should move to the new state |
[in] | num_of_solutions |
Get the set of intersecting particles between two nodes.
[in] | other | the second node |
[out] | in | the intersection set |
void IMP::domino::JNode::init_sampling | ( | DiscreteSampler & | ds | ) |
Set the discrete sampling space of each of particles in the node.
[in] | ds | the sampler data |
bool IMP::domino::JNode::is_part | ( | const Particles & | p | ) | const |
checks if the input set of particles is part of the node
[in] | p | a set of particles |
std::vector<CombState *> IMP::domino::JNode::min_marginalize | ( | const CombState & | s, | |
bool | move_to_state = false | |||
) |
Return the optimal score for the separator, for the given separator find the optimal combination of the rest of the components.
[in] | s | a combination of some of the particles in the node |
[in] | move_to_state | True if should move to the state with the minimum score. |
void IMP::domino::JNode::populate_states_of_particles | ( | Particles * | particles, | |
Combinations * | states | |||
) |
Fill states as encoded in the node for the input subset of particles.
[in] | particles | a set of particles |
[in] | states | the dataset to be filled with states. |
Adds the restraint values to all combinations.
[in] | r | the restraint |
[in] | ps | the particles participate in the restraint at the hierarhcy level encoded in the graph |
[in] | weight | the weight of the restraint |
void IMP::domino::JNode::update_potentials | ( | const std::map< std::string, float > & | old_score_separators, | |
const std::map< std::string, float > & | new_score_separators, | |||
const Particles & | intersection_particles | |||
) |
Update the potentials.
[in] | old_score_separators | |
[in] | new_score_separators | |
[in] | intersection_particles |