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, boost::undirectedS,
29 EdgeWeightProperty> AnchorGraph;
30 typedef boost::graph_traits<AnchorGraph> GTraits;
31 typedef boost::graph_traits<AnchorGraph const> Const_GTraits;
32 typedef GTraits::vertex_descriptor GVertex;
33 typedef GTraits::edge_descriptor GEdge;
38 void add_edge(
int i,
int j) { boost::add_edge(id2node_[i], id2node_[j], g_); }
44 void set_particle_probabilities_on_anchors(
46 void show(std::ostream &out = std::cout)
const;
47 unsigned int get_number_of_anchors()
const {
return boost::num_vertices(g_); }
48 unsigned int get_number_of_edges()
const {
return boost::num_edges(g_); }
52 float min_prob = 0)
const;
53 bool get_are_probabilities_for_particle_set(
Particle *p)
const {
54 return particle_to_anchor_probabilities_.find(p) !=
55 particle_to_anchor_probabilities_.end();
62 std::map<Particle *, Floats> particle_to_anchor_probabilities_;
64 std::vector<GVertex> id2node_;
68 IMPMULTIFIT_END_NAMESPACE
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Common base class for heavy weight IMP objects.
stored a multifit fitting solution
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
A shared base class to help in debugging and things.
Class to handle individual particles of a Model object.
Probabilistic anchor graph.