8 #ifndef BOOST_GRAPH_WRITE_ADJ_LIST_GRAPH_HPP
9 #define BOOST_GRAPH_WRITE_ADJ_LIST_GRAPH_HPP
13 #include <boost/graph/graph_traits.hpp>
14 #include "utils/graph_typedefs.hpp"
15 #include "utils/scaffolding_typedefs.hpp"
21 void write_adj_list_graph(std::ostream& out,
const Instance& I){
23 const RawScaffoldGraph& g = I.get_graph();
24 out << boost::num_vertices(g) << std::endl <<
'&' << std::endl;
27 for(ScafVIterRange ur = boost::vertices(g); ur.first != ur.second; ++ur.first){
28 const ScafVertex& u = *ur.first;
30 out << g[u].name <<
'\t';
32 for(ScafOEdgeIterRange er = boost::out_edges(u, g); er.first != er.second; ++er.first){
34 const ScafVertex& v = boost::target(*er.first, g);
35 if(g[u].index < g[v].index)
36 out << g[v].name <<
',' << g[*er.first].weight <<
' ';
Definition: read_adj_list.hpp:22
Definition: read_phytree.hpp:10