#11739: add_vertex w/o params should return the new vertex
-------------------------------+--------------------------------------------
Reporter: ddestrada | Owner: jason, ncohen, rlm
Type: enhancement | Status: positive_review
Priority: minor | Milestone: sage-5.0
Component: graph theory | Keywords: add_vertex sd35.5
Work_issues: | Upstream: N/A
Reviewer: Paul Zimmermann | Author: Lukáš Lánský
Merged: | Dependencies:
-------------------------------+--------------------------------------------
Description changed by zimmerma:
Old description:
> It's nice to have a way to add a new vertex no matter what the graph is.
> That is the purpose of executing add_vertex() without parameters: to add
> a vertex numbered with the least nonnegative integer not already in the
> graph.
>
> But the problem is that it doesn't return the number, so you can't add
> edges to it. Therefore add_vertex() w/o params currently is only useful
> for adding isolated vertices.
New description:
It's nice to have a way to add a new vertex no matter what the graph is.
That is the purpose of executing add_vertex() without parameters: to add a
vertex numbered with the least nonnegative integer not already in the
graph.
But the problem is that it doesn't return the number, so you can't add
edges to it. Therefore add_vertex() w/o params currently is only useful
for adding isolated vertices.
Apply [attachment:trac_11739_add_vertex_returns_name.2.patch] only.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11739#comment:18>
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.