9 #ifndef IMPMULTIFIT_ANCHOR_GRAPH_H
10 #define IMPMULTIFIT_ANCHOR_GRAPH_H
12 #include <boost/graph/adjacency_list.hpp>
15 #include <IMP/multifit/multifit_config.h>
19 IMPMULTIFIT_BEGIN_NAMESPACE
24 typedef boost::property<boost::edge_weight_t, float> EdgeWeightProperty;
25 typedef boost::property<boost::vertex_index_t, int> VertexIndexProperty;
27 typedef boost::adjacency_list<boost::vecS, boost::vecS,
30 EdgeWeightProperty> AnchorGraph;
31 typedef boost::graph_traits<AnchorGraph> GTraits;
32 typedef boost::graph_traits<AnchorGraph const> Const_GTraits;
33 typedef GTraits::vertex_descriptor GVertex;
34 typedef GTraits::edge_descriptor GEdge;
38 void add_edge(
int i,
int j) {
39 boost::add_edge(id2node_[i],id2node_[j],g_);
46 void set_particle_probabilities_on_anchors(
49 void show(std::ostream& out=std::cout)
const;
50 unsigned int get_number_of_anchors()
const {
return boost::num_vertices(g_);}
51 unsigned int get_number_of_edges()
const {
return boost::num_edges(g_);}
55 float min_prob=0)
const;
57 return particle_to_anchor_probabilities_.find(p) !=
58 particle_to_anchor_probabilities_.end();
64 std::map<kernel::Particle *,Floats> particle_to_anchor_probabilities_;
66 std::vector<GVertex> id2node_;
70 IMPMULTIFIT_END_NAMESPACE
stored a multifit fitting solution
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
Common base class for heavy weight IMP objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
A shared base class to help in debugging and things.
Probabilistic anchor graph.