Boost logo

Boost Users :

From: Johan Oudinet (johan.oudinet_at_[hidden])
Date: 2006-06-12 13:03:30


Hi,

I try using the compressed_sparse row_graph graph type, and I want add
lots vertices.

When I read the documentation
(http://www.boost-consulting.com/boost/libs/graph/doc/compressed_sparse_row.html),
I saw the appropriate add_vertices function described as bellow:

vertex_descriptor add_vertices(vertices_size_type count,
compressed_sparse_row_graph& g)

But, in compressed_sparse_row_graph.hpp:346:
<--8-----------------------------------------------------
template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
inline Vertex
add_vertices(Vertex count, BOOST_CSR_GRAPH_TYPE& g) {
  Vertex old_num_verts_plus_one = g.m_rowstart.size();
  g.m_rowstart.resize(old_num_verts_plus_one + count, EdgeIndex(0));
  return old_num_verts_plus_one - 1;
}
<--8-----------------------------------------------------

I don't understand why `count' is a `Vertex' type! Why not
`vertices_size_type' type ?

Regards,

-- 
Johan

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net