#18346: Easier handling of vertex labels in graph backends
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_review
Type: | Milestone: sage-6.7
enhancement | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: | Commit:
Authors: | 25765bb3c4cb4c5f49e5078d7e6e3968c62310e1
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
public/18346 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by vdelecroix):
Hello,
Replying to [comment:5 ncohen]:
> > 2. Is there a description somewhere of the attributes `vertex_ints`
and `vertex_labels`?
>
> Not that I know. I am not sure that I remember exactly what they do
either. What I remember is that not all vertices have an associated label,
so that you don't spend your time playing with a dictionary when your
graph is defined over integers.
Actually you do since `get_vertex` or `vertex_label` are intensively used
everywhere. And those methods do check if their argument belongs to some
dictionary as a first step! But if I understand well, the aim of the
ticket is precisely '''not''' to upgrade these two methods but just to
move them.
> > 3. In a cython file, there is no need to declare `cdef object x` or
`object x`, just do `x`.
>
> Okay. Well, I don't think I did anything like that but I may have met
such a line somewhere. Really, this does not matter for the moment: this
code will be heavily rewritten.
Hum
{{{#!diff
+ cdef int get_vertex(self, object u) except ? -2
+ cdef object vertex_label(self, int u_int)
}}}
this would better be
{{{#!diff
cdef int get_vertex(self, u) except ? -2
cdef vertex_label(self, int u_int)
}}}
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/18346#comment:6>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.