#13665: New implementation of the blocks_and_cut_vertices method
---------------------------------+------------------------------------------
Reporter: dcoudert | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.5
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: David Coudert | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Changes (by dcoudert):
* status: needs_work => needs_review
Comment:
> Here is a patch that contains documentation only (if you like it), and
three comments :
I like the doc
> * What about replacing top by -1 everywhere ? This is Python code, not C
arrays ! :-P
done
> * Instead of ``if stack`` and indenting maaaaaaaaany lines in the code,
what about writing instead ``if not stack: return whatever`` (and remove
the terminal 'return' line) or ``if not stack: break`` and leave the code
at its natural level ?
done
> * ``w = stack.pop()`` at this line w is equal to v, isn't it ? ``O_o``
as it appears often afterwards I would sleep easier (unless I make a
mistake) if it were replaced by ``w = v`` to make it explicit. With a
``stack.pop()`` just near, or course.
I disagree. If we put {{{w = v}}}, then we still have to pop the top of
the stack. It is more compact to write {{{w = stack.pop()}}}. Furthermore
I don't think it could be faster to have 2 operations instead of 1.
> Thaaaaaaaanks for that patch ! I'll go enjoy some sun while it stays
`:-)`
Lucky you are. Here it's cold, raining, no light... welcome to the french
riviera ;-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13665#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 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.