[BGL][compressed_sparse_row_graph] add_vertices
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.h...),
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
On Jun 12, 2006, at 1:03 PM, Johan Oudinet wrote:
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
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 ?
The vertices in a CSR graph are always numeric values (indices into one of CSR's internal arrays), so "Vertex" is actually the same type as "vertices_size_type." Still, you are right: this should technically be vertices_size_type. It's now fixed in CVS. Thanks! Doug
participants (2)
-
Doug Gregor
-
Johan Oudinet