8 #ifndef LIMBO_ALGORITHMS_MAXCLIQUE_H
9 #define LIMBO_ALGORITHMS_MAXCLIQUE_H
18 #include <boost/graph/bron_kerbosch_all_cliques.hpp>
29 template <
typename GraphType>
33 typedef GraphType graph_type;
34 typedef typename boost::graph_traits<graph_type>::vertex_descriptor vertex_descriptor_type;
35 typedef vector<vertex_descriptor_type> clique_type;
36 typedef vector<clique_type> clique_container_type;
51 template <
typename CliqueType>
52 void clique(CliqueType
const& c, graph_type
const& cg)
57 if (boost::num_vertices(cg) > 0)
60 vClique.push_back(clique_type(c.begin(), c.end()));
69 template <
typename GraphType>
70 inline vector<vector<typename boost::graph_traits<GraphType>::vertex_descriptor> >
73 vector<vector<typename boost::graph_traits<GraphType>::vertex_descriptor> > vClique;
max_clique_visitor_type(clique_container_type const &rhs)
clique_container_type & vClique
container to store cliques
void clique(CliqueType const &c, graph_type const &cg)
max_clique_visitor_type(clique_container_type &vc)
vector< vector< typename boost::graph_traits< GraphType >::vertex_descriptor > > max_clique(GraphType const &g, size_t clique_num)
use boost::bron_kerbosch_all_cliques to find all cliques and the maximum ones
callback for boost::bron_kerbosch_all_cliques