Boost logo

Boost :

From: Mojmir Svoboda (mojmir.svoboda_at_[hidden])
Date: 2008-07-11 05:06:23


hello,

i suspect there is something wrong with assign routine
in compressed_sparse_row_graph.hpp.
when i am constructing directed csr from undirected one via

  // From any graph (slow and uses a lot of memory)
  // Requires IncidenceGraph, a vertex index map, and a vertex(n, g) function
  // Internal helper function
  template<typename Graph, typename VertexIndexMap>
  void
  assign(const Graph& g, const VertexIndexMap& vi,
         vertices_size_type numverts, edges_size_type numedges)
  {
    inherited_vertex_properties::resize(numverts);
    m_rowstart.resize(numverts + 1);
    m_column.resize(numedges);

it overwrites non-allocated memory, because the number of edges is in
fact doubled.. is it an imperfection or am i doing something stupid?

have a nice day,
mojmir


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk