27 struct vertex_property {
31 bool articulation =
false;
34 struct edge_property {
39 struct graph_property {
52 std::map<int, char> cutpoints;
57 typedef boost::uninduced_subgraph<
58 boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS,
59 boost::property< boost::vertex_color_t, int, vertex_property >,
60 boost::property< boost::edge_index_t, int, edge_property >,
61 boost::property< boost::graph_name_t, graph_property> > > Graph;
62 typedef Graph::edge_descriptor Edge;
63 typedef Graph::vertex_descriptor Vertex;
66 inline std::pair <int, int> get_min_max_degree(Graph& g) {
68 int min_degree = std::numeric_limits<int>::max();
70 BGL_FORALL_VERTICES_T(v, g, Graph) {
71 int current_degree = boost::out_degree(v, g);
72 if (current_degree > max_degree) {
73 max_degree = current_degree;
75 if (current_degree < min_degree) {
76 min_degree = current_degree;
80 return std::make_pair(min_degree, max_degree);
84 inline Vertex int_to_vertex(
unsigned int i, Graph& g) {
85 Vertex v = boost::vertex(i, g.root());
86 if (i >= boost::num_vertices(g.root()) || v == Graph::null_vertex()) {
88 ss <<
"Error getting vertex descriptor from integer: " << i;
89 throw std::out_of_range(ss.str());
91 return g.global_to_local(v);
95 inline int vertex_to_int(Vertex v, Graph& g) {
96 return boost::get(boost::vertex_color_t(), g.root(), g.local_to_global(v));
100 inline std::vector<int> getVertexList(Graph& g) {
101 std::vector<int> result;
103 BGL_FORALL_VERTICES(v, g, Graph) {
104 result.push_back(vertex_to_int(v, g));
This file holds all global includes, definitions and variables.
All classes and functions for the RNA design library are under the design namespace.
This file holds the class definitions for the Probability Matrix.