Frage

typedef adjacency_matrix<undirectedS,allow_parallel_edge_tag,edgeWeightProperty> UGraph;
UGraph ug(n);
add_edge(0,1,ug);
add_edge(0,1,ug);

only one edge can be drawn in the graph "ug"

War es hilfreich?

Lösung

Adjacency_matrix does not support the concept of parallel edges. Your usage of allow_parallel_edge_tag does not make the matrix to behave differently. It simply assigns allow_parallel_edge_tag as a vertex property, and Boost essentially ignore this property.

If you need parallel edges you should use adjacency_list instead.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top