IMP logo

IMP::domino::JNode Class Reference


Detailed Description

Handles all functionalities of a junction tree node.

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 Particlesget_particles () const
const DiscreteSamplerget_sampler ()
Float get_score (const CombState &comb)
 Get the score for this combination.
CombStateget_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_
DiscreteSamplerds_
unsigned int node_ind_
Particles particles_
RestraintEvaluatorIrstr_eval_

Constructor & Destructor Documentation

IMP::domino::JNode::JNode ( const Particles p,
int  node_ind 
)

Constructor.

Parameters:
[in] p a vector of IMP particles that are part of the node
[in] node_ind The index of the JNode


Member Function Documentation

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.

Parameters:
[in] move_to_state true if the model should move to the new state
[in] num_of_solutions 
Returns:
all of the combinations that reach the global minimum

void IMP::domino::JNode::get_intersection ( const JNode other,
Particles in 
) const

Get the set of intersecting particles between two nodes.

Parameters:
[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.

Parameters:
[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

Parameters:
[in] p a set of particles
Returns:
True if the node contains the input set of nodes, False otherwise

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.

Parameters:
[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.

Parameters:
[in] particles a set of particles
[in] states the dataset to be filled with states.

void IMP::domino::JNode::realize ( Restraint r,
Particles ps,
Float  weight 
)

Adds the restraint values to all combinations.

Parameters:
[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.

Parameters:
[in] old_score_separators 
[in] new_score_separators 
[in] intersection_particles 


The documentation for this class was generated from the following files:

Generated on Mon Mar 8 23:09:00 2010 for IMP by doxygen 1.5.8