#18498: Sierpinski graph
-------------------------+-------------------------------------------------
Reporter: | Owner:
chapoton | Status: needs_review
Type: | Milestone: sage-6.8
enhancement | Resolution:
Priority: minor | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: graph | Commit:
Authors: | 817bdd331c78581f2eb2a94737a7de76491650c5
Frédéric Chapoton | Stopgaps:
Report Upstream: N/A |
Branch: |
u/chapoton/18498 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Hellooooooo Frédéric!
Several remarks:
- The name of a `Graph` usually ends with `Graph`. I agree that it is a
terrible
standard, considering that even `digraphs.*` do not follow it.
- Isn't there something wrong with the number of vertices as given in the
function's docstring? You say that it is equal to `3 (3^{n-1}-1)/2`,
though:
{{{
sage: [graphs.SierpinskiGasket(x).order() for x in range(1,8)]
[3, 6, 15, 42, 123, 366, 1095]
sage: [3*(3**(n-1)-1)/2 for n in range(1,8)]
[0, 3, 12, 39, 120, 363, 1092]
}}}
- You mention twice the `HanoiTowerGraph`: could you merge those two
similar
remarks into one?
- It is only my personal opinion, but I believe that the 'gasket' keyword
is a
sufficient protection to avoid misunderstandings. I do not believe that
a
'warning' is needed here (especially above the 'input' block). I would
not see
anything wrong with only a 'seealso', to help redirect lost users.
- Is there any reason to give those names to the vertices? Or is it only
because
of the positions? If they have no specific meaning, what would you think
of
relabelling the graph to integers before returning it (a call to
`.relabel()`
does that automatically)?
I added a commit at public/18498 with a couple of modifications:
- A modified 'vertical' layout
- A picture of the graph in its documentation
I you agree with those, you can cherry-pick that commit on your branch.
Thanks,
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18498#comment:17>
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.