IMP logo

IMP::domino::DominoOptimizer Class Reference


Detailed Description

An exact inference optimizer.
Inheritance diagram for IMP::domino::DominoOptimizer:

Inheritance graph
[legend]

Public Member Functions

void add_restraint (Restraint *r, Particles ps, float weight=1.)
 Add a restraint that should be used in the optimization procedure.
void add_restraint (Restraint *r)
 Add a restraint that should be used in the optimization procedure.
 DominoOptimizer (const JunctionTree &jt, Model *m, RestraintEvaluatorI *r_eval)
 Constructor.
void exhaustive_enumeration (CombStates &states, bool calc_score=false, bool use_rsr_eval=false)
RestraintGraphget_graph () const
unsigned int get_number_of_solutions () const
DiscreteSamplerget_sampling_space () const
virtual std::string get_type_name () const
virtual ::IMP::VersionInfo get_version_info () const
void move_to_opt_comb (unsigned int i) const
virtual Float optimize (unsigned int max_steps)
void score_combinations (const CombStates &states, std::vector< Floats > &scores)
void set_number_of_solutions (unsigned int n)
void set_restraint_evaluator (RestraintEvaluatorI *rstr_eval)
void set_sampling_space (DiscreteSampler *ds)
void show_optimum_configuration (unsigned int conf_ind, std::ostream &out=std::cout) const
void show_restraint_graph (std::ostream &out=std::cout) const

Protected Member Functions

void add_jt_edge (int node1_ind, int node2_ind)
 Adds an undirected edge between a pair of nodes.
void add_jt_node (int node_index, std::vector< Int > &particles_ind, Model &m)
void add_restraint_recursive (Restraint *rs, Float weight)
 Recursivly add restraints.
void clear ()
void initialize_jt_graph (int number_of_nodes)

Protected Attributes

DiscreteSamplerds_
RestraintGraphg_
unsigned int num_of_solutions_
std::vector< OptTuple > rs_
RestraintEvaluatorIrstr_eval_

Friends

template<class T >
void IMP::internal::unref (T *)

Constructor & Destructor Documentation

IMP::domino::DominoOptimizer::DominoOptimizer ( const JunctionTree jt,
Model m,
RestraintEvaluatorI r_eval 
)

Constructor.

Parameters:
[in] jt A special type of tree decomposition that holds the graph on which inference will be run
[in] m The model to be optimized
[in] r_eval evaluator used to evaluate the restraints


Member Function Documentation

void IMP::domino::DominoOptimizer::add_jt_edge ( int  node1_ind,
int  node2_ind 
) [protected]

Adds an undirected edge between a pair of nodes.

Parameters:
[in] node1_ind the index of the first node
[in] node2_ind the index of the second node

void IMP::domino::DominoOptimizer::add_jt_node ( int  node_index,
std::vector< Int > &  particles_ind,
Model m 
) [protected]

Creates a new node and add it to the graphs that take part in the optimization

void IMP::domino::DominoOptimizer::add_restraint ( Restraint r,
Particles  ps,
float  weight = 1. 
)

Add a restraint that should be used in the optimization procedure.

To support hierarchy, some time the particles of the restraint are a refined set of the particles represented in the restraint graph. In this function the user set the particles of the restraint (as interpert by the restraint graph). It is up to the user to make sure that ps represents a coarser set of particles than the ones actually used in the restraint.

void IMP::domino::DominoOptimizer::add_restraint ( Restraint r  ) 

Add a restraint that should be used in the optimization procedure.

/param[in] r the restraint /note The input restraint can also be a RestraintSet, a recursive addition of restraints is performed in these cases.

void IMP::domino::DominoOptimizer::exhaustive_enumeration ( CombStates &  states,
bool  calc_score = false,
bool  use_rsr_eval = false 
)

A function used mostly for debugging and learning purposes. Should NOT be used for real optimization protocol.

Parameters:
[in] states to be filled with all of the combinations encoded in the restraint graph
[in] calc_score should scores be calculated for each combination
[in] use_rsr_eval if True use RestraintEvaluator else use model.evaluate()

void IMP::domino::DominoOptimizer::score_combinations ( const CombStates &  states,
std::vector< Floats > &  scores 
)

A function used mostly for debugging and learning purposes. Should NOT be used for real optimization protocol.

Parameters:
[in] states states to score
[out] scores the i'th entry will contain the values of all restraint for states[i]


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