Does make_bidirected want some special sort of graphs or does it work
with any directed graphs.
My problem is as follows: want to compute a genus of an undirected
graph. The code is as follows:
UGRAPH<list_item,char> haha;
//kann nicht Genus auf haha direct anwenden,
//er beschwert sich während der Laufzeit ("Genus only applies to maps")
GRAPH<list_item,char> hehe=haha;
//Genus(hehe) sagt dasselbe während der Laufzeit, also versuche
//hehe.make_map();
//was ein segfault liefert.
//Aus Dokue folgere, dass ein make_map auf bidi-graphen
//anwendbar ist, also schreibe
//hehe.make_bidirected();
//davor, was auch segfaults
//und zuallerletzt vermute, dass ein graph zuerst gerichtet werden
// muß,aber
//hehe.make_directed();
//hehe.make_bidirected schlägt auch fehl.
hehe.make_directed();
if(!hehe.is_directed()) throw InternalError(
"FigurenAusMKanten-constructor: couldn't make directed");
hehe.make_bidirected(); //hier segfault laut ddd+gdb
hehe.make_map();
if(!(hehe.is_map())) throw InternalError(
"FigurenAusMKanten-constructor: couldn't make a map");
genus=Genus(hehe);
ddd says the segfault occurs somewhere below the function call
int ord(GenPtr x) const { return LEDA_CALL1(ord_ptr,E,x); }
Use LEDA 4.4.1.
Is there anything I have not considered?
--
Best regards,
Alex.
PS. To email me, remove "loeschedies" from the email address given.


|