Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Leda > make_bidirected...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 116 of 212
Post > Topic >>

make_bidirected segfaults

by Alexander Malkis <alexloeschediesmalk@[EMAIL PROTECTED] > Mar 23, 2004 at 11:25 PM

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.
 




 1 Posts in Topic:
make_bidirected segfaults
Alexander Malkis <alex  2004-03-23 23:25:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 18:33:52 CDT 2008.