Opened 13 years ago

Closed 13 years ago

#3357 closed Bugs (fixed)

csr assign method not working with undirected graphs

Reported by: sebastian.weber@… Owned by: Andrew Sutton
Milestone: Boost 1.40.0 Component: graph
Version: Boost Release Branch Severity: Problem
Keywords: csr undirected Cc:

Description

Hi!

Assigning an undirected graph to a csr graph results in an ill defined object. Example:

UndirAdjacencyListGraph adjGraph;

CsrGraph csr;

csr.assign(adjGraph);

This will result in an ill defined csr graph, but with the trick of doubling the edges nominally, everything works as it should:

csr.assign(adjGraph, vertexIndex, num_vertices(adjGraph), 2*num_edges(adjGraph));

works perfeclty and returns a csr graph where the undirected links have been replaced by 2 directed edges appropietly.

Greetings

Change History (1)

comment:1 by Jeremiah Willcock, 13 years ago

Resolution: fixed
Status: newclosed

(In [55667]) Fixed edge doubling for copying from an undirected graph to a CSR graph; fixes #3357

Note: See TracTickets for help on using tickets.