Yooooooooooo !!

> Why isn't are multigraphs (labelled graphs, graphs with loops etc)
> implemented as a  separate class(es) which inherit from a stripped down
> version of graphs? This way graphs would not incur any speed penalty
because
> of all of these extra checks that are needed for these more "exotic"
graphs?

Ahahah. No idea. Graphs were implemented long before I first installed Sage
:-P

Plus... Well, doing this isn't always the right option. I mean, I have no
idea what we should do with those awful things, having a different graph
class means that you will either
1) Implement some algorithms twice with very minor changes
2) Create a simple graph from a multigraph, THEN call the graph function
(and copying graphs is not free, and that's unaffordable fo linear things
like distance computations)
3) You write once a function that supports both, and well, you will waste
some time on normal graphs too, and have the graph algorithms polluted

It's not an answer to your question, for I really have no idea how we could
find a cool way out of this thing. I really HATE multigraphs.

Look, Georgi tried to create the line graph of a multigraph. The line graph
is, by the book, a graph whose vertices are the edges of your first graph.
That's cool.
But what happens if you have multiple edges ? Now the vertices of your new
graph cannot be identified by "pairs of vertices" only, you need more
information. Well, you could add an integer to the pairs of vertices to
number the labels, but really that is an ugly wy out.

And multigraphs yield infinitely many problems like that. Things that can't
be solved cleanly and naturally. Bad work :-/

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to