|
Boost Users : |
From: Mojmir Svoboda (mojmir.svoboda_at_[hidden])
Date: 2008-07-09 07:52:38
hello - i have another question on CST:
on construction of CSR from another graph - what happens when you construct csr
directed graph from undirected adjacency_list? it doubles all edges? because
i'm getting some crashes that tries to write past container boundary:
in compressed_sparse_row_graph.hpp
template<typename Graph, typename VertexIndexMap>
void
assign(const Graph& g, const VertexIndexMap& vi,
vertices_size_type numverts, edges_size_type numedges)
{
m_column.resize(numedges); ////////// numedges = 1000 undirected edges
for (Vertex i = 0; i != numverts; ++i) {
m_rowstart[i] = current_edge;
g_vertex v = vertex(i, g);
EdgeIndex num_edges_before_this_vertex = current_edge;
g_out_edge_iter ei, ei_end;
for (tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei) {
m_column[current_edge++] = get(vi, target(*ei, g));
}
////////// current edge is in range <0, 2000>
seems like bug to me... is it?
many thanks for your attention,
mojmir
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