[sage-devel] import / export of graphs (modifications in graph theory)

2012-07-08 Thread Birk Eisermann
Hello!! What is your opinion about improving the export and import of graphs? My conclusion of the sage-devel thread "Code duplication and aliases in methods" is that at the moment the source code in graph theory is not so optimal organized. As promised, I want to show some modifications that

Re: [sage-devel] Re: Code duplication and aliases in methods

2012-07-08 Thread Birk Eisermann
Hi Jason, Good point! Networkx comes quite close. I agree with the distinction between graphs and algorithms as in networkx. Graphs objects just for storage of the graph data. But for algorithms, I have different picture which is closer to how it is in sage... e.g. no segmentation (hence als

Re: [sage-devel] Re: Code duplication and aliases in methods

2012-07-06 Thread Birk Eisermann
On 07/06/2012 08:20 PM, Jeroen Demeyer wrote: On 2012-07-06 14:10, Nathann Cohen wrote: Then, of course, we would have to change the is_isomorphic function (it does not take the bipartition into account). Indeed, if I create a BipartiteGraph object I would expect the is_isomorphic() function t

Re: [sage-devel] Re: Code duplication and aliases in methods

2012-07-06 Thread Birk Eisermann
Hello Nathann! On 07/06/2012 08:06 PM, Nathann Cohen wrote: > I found that G.Bipartition() will do the job. > Surprisingly (or not) all vertices belong to one class and the other is > empty. For me, BipartiteGraph(k,l) would be more natural (maybe with the > convertion that the first partiti

Re: [sage-devel] Re: Code duplication and aliases in methods

2012-07-06 Thread Birk Eisermann
Hello everyone! Here are my answers to these problems. Feel free to comment! @ Nathann 1) Some history : the BipartiteGraph class. > > > Try the following : >> sage: BipartiteGraph(graphs.CompleteBipartiteGraph(3,3)).complement() >> > Why does the graph complement G make a copy the graph itself