Open BruceWestbury opened 3 years ago
Branch: u/Bruce/spider
Wonderful!
See also #25901 and #25173
New commits:
9332771 | Moved spherical_spider.py to combinat directory |
Branch pushed to git repo; I updated commit sha1. New commits:
a870d6a | Did some debugging |
WTF
if not π in BaxterPermutations():
Please avoid unicode identifiers.
Sorry for the "wtf", do not take it personally.
But please, please, do not do that. Let us keep the code identifiers ASCII.
Some comments on the question here:
https://stackoverflow.com/questions/2649544/unicode-identifiers-in-python
by the way, Gretzler is Getzler
Replying to @fchapoton:
by the way, Gretzler is Getzler
Thanks for spotting that mistake.
Replying to @fchapoton:
Sorry for the "wtf", do not take it personally.
No problem with WTF
But please, please, do not do that. Let us keep the code identifiers ASCII.
I don't have strong views on this and will change this.
Some comments on the question here:
https://stackoverflow.com/questions/2649544/unicode-identifiers-in-python
I would still like to understand why this is bad practice. The discussion in the link is interesting and has some gotchas I didn't know about. Using unicode for function names as in the discussion would get a WTF from me. I also would not think of using a unicode identifier outside of a mathematical context.
I have simply used a greek letter as a local identifier following standard practice in mathematical literature. My understanding is that this is fine in a notebook.
Branch pushed to git repo; I updated commit sha1. New commits:
1bb2424 | Removed unicode identifier, started on improving drawing edges. |
failing doctest, and pyflakes plugin not green
Replying to @fchapoton:
failing doctest, and pyflakes plugin not green
The pyflakes is now green.
All tests passed! when I ran them locally. The bot says four tests failed but they seem to be elsewhere.
sorry, but I am not going to make a full review
arxiv links could use the arxiv role :arxiv:`....`
Replying to @fchapoton:
sorry, but I am not going to make a full review
I am not expecting a positive review as it does not yet do the calculation I want it for. I paused here because i) I needed a break and ii) Travis said it was better to break up a large project to make life easier for the reviewer.
I am now ready to continue with this project.
Some quick comments:
__str__
? I don't see why this is necessary.while(flag):
-> while flag:
parent
should be the first argument to any Element
class. This is something we want across all of Sage. You then shouldn't need to implement an _element_constructor_
... TODO::
.UniqueRepresentation
first in the MRO.baxter
parameter in from_permutation
."""
. This is the convention we use in Sage.set(c.keys())
-> set(c)
normalize
are incorrectly formatted.Vector
, and only SphericalWeb
should be imported as that is the only thing directly used by the user.Branch pushed to git repo; I updated commit sha1. New commits:
8d8de0a | Added file to module_list.rst and edited entry in combinat/all.py |
Thank you Travis. I think your comments have been more or less dealt with.
Branch pushed to git repo; I updated commit sha1. New commits:
5364d6f | Started work on Boundary and Boundaries classes |
e59e87d | Added Parent class Boundaries and Element class Boundary |
f1ce071 | Removed Vector, Boundary, Boundaries |
eaf7a86 | Removed Boundary and started work on doctests |
64b81ae | Worked on doctests |
319c26b | More work on doctests |
1bc8803 | Added preprocessing to SphericalSpider |
c989010 | Changed Strand from NamedTuple to namedtuple |
31122ad | All tests passed! |
I have now implemented SphericalSpider as a Parent parametrised by the boundary values.
There are two issues that seem to me to be "work arounds". One is that I have both Strand and halfedge. I can almost do away with halfedge and work with "is" and "equal by value". My best guess at the problem I encountered is that dictionaries don't work with "is". I have not tried overwriting hash. The other is that I have included four methods of SphericalSpider as static methods (namely, vertex, loop, empty, polygon). This seems clumsy.
Branch pushed to git repo; I updated commit sha1. New commits:
c7881d8 | Started implementing WebAlgebra |
0c4db0d | Added replace_linear (without tests) |
a0b91e1 | Added more methods for skein relations (without tests) |
da81cd7 | Added methods one_basis, product_on_basis, U to WebAlgebra |
4d4c111 | Added homomorphism from braid group to Temperley-Lieb algebra |
5a2ef54 | Added from_diagram |
bf64788 | Debugged from_diagram |
I have been making progress with adding functionality. In particular, you can almost calculate the Jones polynomial. However it seems to me that the code is getting unwieldy and I could do with some advice on making this more organised and adding more structure. For example, the next stage is to work with quotients given by skein relations.
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
3c5353a | Improved doctests and check for crossings |
f666282 | Corrected search to check embedding preserves data on halfedges |
cedb49e | Added doctest for apply_linear |
a2c8056 | Added doctest for apply_rule |
77515f1 | Corrected canonical() |
28f415b | Got doctest for simplify to work |
34e0bf6 | Improved doctets |
2d82e0c | Revise normalize |
f019cf9 | Simplified and corrected normalise |
5934f86 | Simplfy passes doctest |
Branch pushed to git repo; I updated commit sha1. New commits:
f3d2b4a | Passes pycodestyle |
The terminology of webs and spiders is due to Kuperberg. Here we implement webs as planar graphs with boundary.
CC: @tscrim @mantepse
Component: combinatorics
Keywords: planar graph
Author: Bruce Westbury
Branch/Commit: public/ticket-31209 @
5a49b8e
Issue created by migration from https://trac.sagemath.org/ticket/31209