| 1 |
#ifndef PBCOPPER_POA_BOOSTGRAPH_H |
| 2 |
#define PBCOPPER_POA_BOOSTGRAPH_H |
| 3 |
|
| 4 |
#include <pbcopper/PbcopperConfig.h> |
| 5 |
|
| 6 |
#include <boost/config.hpp> |
| 7 |
#include <boost/graph/adjacency_list.hpp> |
| 8 |
#include <boost/type_traits.hpp> |
| 9 |
|
| 10 |
#include <cstddef> |
| 11 |
|
| 12 |
namespace boost { |
| 13 |
enum vertex_info_t |
| 14 |
{ |
| 15 |
vertex_info = 424 |
| 16 |
}; // a unique # |
| 17 |
BOOST_INSTALL_PROPERTY(vertex, info); |
| 18 |
} // namespace boost |
| 19 |
|
| 20 |
namespace PacBio { |
| 21 |
namespace Poa { |
| 22 |
namespace detail { |
| 23 |
|
| 24 |
class PoaNode; |
| 25 |
|
| 26 |
// BGL is intimidating, and it *deserves* your hatred. But it's |
| 27 |
// the only game in town! |
| 28 |
using vertex_property_t = |
| 29 |
boost::property<boost::vertex_info_t, PoaNode, boost::property<boost::vertex_index_t, size_t> >; |
| 30 |
using BoostGraph = |
| 31 |
boost::adjacency_list<boost::setS, boost::listS, boost::bidirectionalS, vertex_property_t>; |
| 32 |
|
| 33 |
// Descriptor types used internally |
| 34 |
using ED = boost::graph_traits<BoostGraph>::edge_descriptor; |
| 35 |
using VD = boost::graph_traits<BoostGraph>::vertex_descriptor; |
| 36 |
|
| 37 |
using VertexInfoMap = boost::property_map<BoostGraph, boost::vertex_info_t>::type; |
| 38 |
using index_map_t = boost::property_map<BoostGraph, boost::vertex_index_t>::type; |
| 39 |
static const VD null_vertex = boost::graph_traits<BoostGraph>::null_vertex(); |
| 40 |
|
| 41 |
} // namespace detail |
| 42 |
} // namespace Poa |
| 43 |
} // namespace PacBio |
| 44 |
#endif // PBCOPPER_POA_BOOSTGRAPH_H |