#12243: Girth of a graph fails for non-integer vertices
-----------------------------+----------------------------------------------
Reporter: rbeezer | Owner: jason, ncohen, rlm
Type: defect | Status: positive_review
Priority: minor | Milestone: sage-5.0
Component: graph theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Nathann Cohen | Author: Rob Beezer
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Comment(by brunellus):
Replying to [comment:6 ncohen]:
> I am actually writing some C-level graph backend for efficient
computations without wasting time with calls to Python methods... For my
applications having immutable graphs sounded like a bad idea (because we
would have to maintain the properties over changes like edge
addition/removal in the graph...The BipartiteGraph class actually show how
impractical that is) but if you do not change the structure often that's a
totally different problem.
I thought about this for last few days too -- about immutable graphs that
holds some information about itself. It is great that Sage focus on the
speed of code execution, but when I use it, it is mostly interactive
playing with relatively small graphs. In this case interface matters more
than computational complexity. Immutable, functional way of work is quite
handy. It something like Stefan was talking about in #7304.
Another thing is that as I agree that BipartiteGraph class doesn't handle
it's job, it is sometimes really nice to be sure that you work with a
bipartite or a planar graph all the way. For example, the current Graph
class loudly presents if it contains multiple edges or loops in its
__str__ -- this has nothing to do with a Python type system, like the
BipartiteGraph class does, but serves the same purpose.
So, if this would be up to me, I would create not just new backend, but
new class ImmutableGraph, that would beside standard functions offer
something like fix_* and follow_* (for * in [planar, bipartite, chordal,
...]). Fixing some property would cause firing exceptions whenever the
property is broken, following would just cause to keep the state updated
and printed from __str__. Then, I guess, BipartiteGraph could be made
obsolete.
Well, I see that now I'm talking about something completely different than
you. :-) And it is maybe stupid. I'll just think about it more in coming
days.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12243#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.