Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the SimilaritySurface hierarchy with categories #220

Merged
merged 259 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
0d890fe
Merge remote-tracking branch 'origin/master' into category
saraedum Apr 4, 2023
00578a4
Document Surface.point()
saraedum Apr 4, 2023
3718d3e
Fix infinite loops in an_element of a surface
saraedum Apr 4, 2023
587de0b
Merge branch 'master' into category
saraedum Apr 5, 2023
ffd372c
Merge branch 'category' of github.com:saraedum/sage-flatsurf into cat…
saraedum Apr 5, 2023
d125e24
Implement __hash__ and _cache_key to make all doctests pass
saraedum Apr 5, 2023
aa7982d
Merge branch 'six' into category
saraedum Apr 5, 2023
9e93f73
Move around some methods to categories
saraedum Apr 6, 2023
5835228
Add TopologicalSurfaces and SimilaritySurfaces as categories
saraedum Apr 14, 2023
93cee69
Add super categories of similarity surfaces
saraedum Apr 17, 2023
23a5576
Add categories of (half-)translation surfaces
saraedum Apr 17, 2023
9b52417
Implement refine_category()
saraedum Apr 17, 2023
78231b3
Make most doctests pass again with category setup
saraedum Apr 18, 2023
ac8b657
Merge branch 'master' into category
saraedum Apr 18, 2023
793789b
Fix wording
saraedum Apr 18, 2023
bedd5f4
Fix angles
saraedum Apr 18, 2023
5c726a5
Add Rational axiom
saraedum Apr 18, 2023
b7170cf
Add category of cone surfaces
saraedum Apr 19, 2023
567cfba
Drop unused rational similarity surfaces
saraedum Apr 19, 2023
5939949
Fix printing of "positive half translation" surfaces
saraedum Apr 19, 2023
b25c08b
Simplify category imports
saraedum Apr 19, 2023
3d79a09
Improve documentation of ConeSurfaces
saraedum Apr 19, 2023
8f30b86
Simplify polygon surfaces tests
saraedum Apr 19, 2023
504f321
Simplify topological surfaces tests
saraedum Apr 19, 2023
e431a15
Simplify category tests
saraedum Apr 19, 2023
5a8b07f
Migrate half translation surface to the category framework
saraedum Apr 19, 2023
81df1e7
Drop DilationSurface
saraedum Apr 19, 2023
3853df5
Drop SimilaritySurface hierarchy
saraedum Apr 19, 2023
1686e5b
Fix optional doctests
saraedum Apr 20, 2023
e57e573
Normalize all copyright headers
saraedum Apr 20, 2023
cc7cd85
Shift around code to make basic surface setup more flexible
saraedum Apr 21, 2023
ab37c2c
Implement some surface methods generically
saraedum Apr 22, 2023
42f2bc2
Switch Delaunay triangulated surfaces to use new surface base classes
saraedum Apr 22, 2023
f800488
Make GL2RImageSurface an OrientedSimilaritySurface
saraedum Apr 22, 2023
7e264d8
Change minimal_cover to use OrientedSimilaritySurface base class
saraedum Apr 22, 2023
1509927
Change some infinite explicit surfaces to use the OrientedSimilarityS…
saraedum Apr 22, 2023
ed82c18
Remove MinimalTranslationCover that has been deprecated since 2018
saraedum Apr 22, 2023
3e69c6c
Use OrientedSimilaritySurface as base class for origamis
saraedum Apr 22, 2023
558e293
Remove empty file
saraedum Apr 22, 2023
4161c6b
Origamis are assumed to be connected
saraedum Apr 22, 2023
cf4ba84
Add a first version of mutable surfaces
saraedum Apr 23, 2023
44de084
Drop Surface_list from predefined surfaces
saraedum Apr 23, 2023
be62d5a
Use MutableOrientedSimilaritySurface for delaunay triangulation
saraedum Apr 23, 2023
73bce8d
Use MutableOrientedSimilaritySurface instead of Surface_list
saraedum Apr 23, 2023
4055971
Use MutableOrientedSimilaritySurface instead of Surface_list
saraedum Apr 23, 2023
b4a1b83
Use MutableOrientedSimilaritySurface instead of Surface_dict
saraedum Apr 23, 2023
4cecd3f
Use MutableOrientedSimilaritySurface instead of Surface_list
saraedum Apr 23, 2023
091664d
Use MutableOrientedSimilaritySurface instead of Surface_dict
saraedum Apr 23, 2023
4d46b13
Replace all instances of non-lazy copy() with MutableOrientedSimilari…
saraedum Apr 23, 2023
9c5f806
Do not use copy(lazy=True) since we are deprecating it
saraedum Apr 23, 2023
5bbddc2
Do not use copy(lazy=True) since we are deprecating it
saraedum Apr 23, 2023
cb107b1
Do not use copy(lazy=True) for lazy triangulations
saraedum Apr 24, 2023
731fed9
Decouple lazy delaunay surfaces (before rewriting them.)
saraedum Apr 24, 2023
3f2703d
Fix typo
saraedum Apr 24, 2023
80bdcbd
Remove copy() from lazy delaunay triangulated surface
saraedum Apr 24, 2023
b9fff87
Implement lazy delaunay without using copy()
saraedum Apr 25, 2023
0ff4f92
Postpone TODO; will implement hyperbolic surfaces in the next iteration
saraedum Apr 25, 2023
f053123
Fix out-of-place apply_matrix()
saraedum Apr 25, 2023
dbc2d38
Warn about unsupported keywords
saraedum Apr 25, 2023
91592cf
Ensure that MutableOrientedSimilaritySurface has the interface of Sur…
saraedum Apr 25, 2023
d3f5274
Add edge matrix test for (half-)translation surfaces
saraedum Apr 26, 2023
996ada2
Speed up rationality check for billiards
saraedum Apr 26, 2023
362092a
Deprecate LabelWalker
saraedum Apr 26, 2023
e269f8f
Deprecate num_polygons()
saraedum Apr 26, 2023
b99f3b8
Speed up and simplify labels() and polygons()
saraedum Apr 27, 2023
e19ad18
Deprecate label_iterator()
saraedum Apr 27, 2023
ab8c1b8
Deprecate edge_iterator() and friends
saraedum Apr 27, 2023
5cb6580
Deprecate walker(), num_polygons(), underlying_surface(), set_edge_pa…
saraedum Apr 28, 2023
6aeb60b
Deprecate label_polygon_iterator()
saraedum Apr 28, 2023
6b2f87b
Explain performance of labels() and polygons()
saraedum Apr 28, 2023
b3fd3d6
Deprecate is_finite() for surfaces since it clashes with the notion f…
saraedum Apr 28, 2023
7373331
Make FiniteType and InfiniteType mutually exclusive
saraedum Apr 28, 2023
11d0dce
Keep plot_polygon() around for the time being
saraedum Apr 28, 2023
4d5797a
Make sure all surfaces live in the smallest possible category
saraedum Apr 28, 2023
860c826
Fix implementation of is_connected()
saraedum Apr 29, 2023
fc83cf9
Implement genus without computing angles
saraedum Apr 29, 2023
ee3770b
Resolve TODO
saraedum May 1, 2023
3c2390c
Point out performance considerations with categories
saraedum May 1, 2023
693d39f
Resolve TODOs
saraedum May 3, 2023
ae1628e
Resolve TODO
saraedum May 3, 2023
2cf9f26
Resolve TODO
saraedum May 3, 2023
a4b4174
Resolve TODOs
saraedum May 3, 2023
f4b7893
Resolve TOODs
saraedum May 3, 2023
1104f88
Resolve TODOs
saraedum May 3, 2023
b8e332e
Implement more fancy printing of surfaces
saraedum May 3, 2023
580fbfe
Speed up printing of surfaces
saraedum May 4, 2023
70a21d6
Fix sine-cosine bounds
saraedum May 4, 2023
82c2f62
Fix most surface printing issues
saraedum May 4, 2023
1b52ee9
Fix most printing issues of surfaces
saraedum May 4, 2023
cf9d181
Use sharper bounds and ball arithmetic to speed up rationality tests
saraedum May 4, 2023
310556c
Speed up cosine/sine computations and rely less on AA to make things …
saraedum May 5, 2023
09129d5
Fix numerical issues with polygon angle computations
saraedum May 5, 2023
3ca702b
Fix typos
saraedum May 5, 2023
34937d2
Reformat source code
saraedum May 5, 2023
2d66f92
Fix syntax
saraedum May 5, 2023
d35262a
Fix typo
saraedum May 5, 2023
4be2c64
Speed up origamis
saraedum May 5, 2023
da6404c
Speed up GL2RImageSurface
saraedum May 5, 2023
28fb1db
Use the same description for sage-flatsurf in the README and in the _…
saraedum May 7, 2023
9c64a83
Drop unused variables (remove lint)
saraedum May 7, 2023
785decf
Remove unused and untested PolygonCreator
saraedum May 7, 2023
96511ee
Silence missing stratum error
saraedum May 7, 2023
a82e86b
Use categories for polygons
saraedum May 7, 2023
4934ef9
Clean up commented out code
saraedum May 7, 2023
5321bb1
Fix typo
saraedum May 7, 2023
481989d
Bring hyperbolic polygons into the category of polygons
saraedum May 8, 2023
c4116a6
Fix checking of polygons and remove parsing ValueError check
saraedum May 8, 2023
74d63ce
Fix doctest
saraedum May 8, 2023
96be2e6
Fix special case of containment test for hyperbolic polygons
saraedum May 8, 2023
fe007cf
Fix change of hyperbolic polygons
saraedum May 8, 2023
96b3a03
Add axiom for rational polygons
saraedum May 8, 2023
b9f8139
Move EquiangularPolygons into the category framework
saraedum May 8, 2023
70910c4
Simplify the notion of equality of surfaces
saraedum May 9, 2023
9a7fd69
Test that label iteration reaches all labels
saraedum May 9, 2023
2ff924c
Make iteration of labels in surfaces reach all labels in a canonical …
saraedum May 10, 2023
58a2d04
Add TODO
saraedum May 10, 2023
2104a1c
Do not use wildcard imports
saraedum May 11, 2023
36b8d2b
Update example notebook
saraedum May 11, 2023
75f0ba3
Add missing source file
saraedum May 11, 2023
980ad0f
Update pytest output due to changed order of labels()
saraedum May 11, 2023
c3f8a35
Simplify apisa-wright construction
saraedum May 11, 2023
7bef8e6
Update imports in geometry tests
saraedum May 11, 2023
b902dec
Bring back SimilaritySurface, HalfDilationSurface, DilationSurface, C…
saraedum May 11, 2023
9f8545e
Make sure that apisa-wright construction still works
saraedum May 11, 2023
984ad80
Fix warning
saraedum May 11, 2023
2a96c9c
Improve defining surfaces notebook
saraedum May 12, 2023
52ac03e
Black format example notebooks
saraedum May 12, 2023
c5451b7
Run black on example notebooks in CI
saraedum May 12, 2023
c589c65
Add singularity() features to point()
saraedum May 12, 2023
b8b953f
Address part of #229
saraedum May 12, 2023
08a2563
Improve docstring
saraedum May 13, 2023
821aa66
Improve documentation of the category of cone surfaces
saraedum May 13, 2023
c9f0d94
Improve documentation for the category of half-translation surfaces
saraedum May 13, 2023
d9a299e
Add documentation for category of hyperbolic polygons
saraedum May 14, 2023
374ba12
Document the category of polygonal surfaces
saraedum May 15, 2023
527cb81
Document category of real projective polygons
saraedum May 15, 2023
0a54e3b
Document category of real projective polygonal surfaces
saraedum May 16, 2023
486c342
Fix and speedup polygons with angles
saraedum May 23, 2023
604406b
Resolve TODO
saraedum May 23, 2023
900c6b8
Document SimilaritySurfaces
saraedum May 26, 2023
bbf7623
Fix lint
saraedum May 26, 2023
47ff466
Make sure labels() always know whether they are finite
saraedum May 26, 2023
386306c
Document category of topological surfaces
saraedum Jun 5, 2023
9fad4ae
Document category of translation surfaces
saraedum Jun 5, 2023
7fe463c
Remove method provided by category as well
saraedum Jun 7, 2023
8172205
Rename polygon to Polygon to avoid clash with SageMath polygon() plot…
saraedum Jun 8, 2023
2741984
Document chamanara surface
saraedum Jun 8, 2023
dffb2fc
Document lazy Delaunay surfaces
saraedum Jun 8, 2023
0d5fc56
Document GL2RImageSurface
saraedum Jun 8, 2023
aee03aa
Bring our hyperbolic geometry into the same category framework than s…
saraedum Jun 8, 2023
efb97ff
Update mappings documentation
saraedum Jun 9, 2023
fa4c90e
Rename matrix_2x2 to euclidean
saraedum Jun 9, 2023
7273640
Speed up triangle creation
saraedum Jun 9, 2023
6146fb4
Clean up Euclidean geometry helper functions
saraedum Jun 9, 2023
b085c69
Document minimal covers
saraedum Jun 9, 2023
10754a3
Document new methods in surface generators and surface objects
saraedum Jun 9, 2023
15f2b24
Mark infinite sets of labels as being infinite
saraedum Jun 9, 2023
05fe28c
Moved origamis to their own module
saraedum Jun 10, 2023
ac8949e
Restore doctests of EquiangularPolygons
saraedum Jun 11, 2023
bf96792
Move more generic geometry to flatsurf.geometry.euclidean
saraedum Jun 11, 2023
9a0d671
Document polygon module
saraedum Jun 13, 2023
462c0a1
Document parts of the legacy surfaces
saraedum Jun 13, 2023
ab2b5d0
Document most of surface.py
saraedum Jun 13, 2023
a24b822
Add news
saraedum Jun 13, 2023
a5f0f51
Merge remote-tracking branch 'origin/master' into category
saraedum Jun 13, 2023
4283b85
Document BaseRingChangedSurface
saraedum Jun 14, 2023
a718dea
Complete documentation of surface.py
saraedum Jun 14, 2023
b6d065e
Fix lint
saraedum Jun 15, 2023
4b35d44
Ensure that category of polygons is always (almost maximally) refined
saraedum Jun 15, 2023
fc87a9c
Fix typos
saraedum Jun 15, 2023
1a031c5
Black format source code
saraedum Jun 15, 2023
5f2327f
Fix lint
saraedum Jun 15, 2023
71ece55
Black format source code
saraedum Jun 15, 2023
6a6c7e5
Remove removed modules from documentation
saraedum Jun 15, 2023
eef5533
Add new modules to documentation
saraedum Jun 15, 2023
c5a0a0b
Add categories package to installation
saraedum Jun 15, 2023
90f7632
Fix lint
saraedum Jun 16, 2023
fff9eac
Adapt doctests to minor changes in SageMath 10
saraedum Jun 16, 2023
3961d97
Fix docbuild TOC
saraedum Jun 16, 2023
57691be
Fix rendering of nested classes
saraedum Jun 16, 2023
f203a7a
Fix docbuild
saraedum Jun 17, 2023
42f09d1
Fix lint
saraedum Jun 17, 2023
d9bb1d3
Add jupytext to make black formatting work in CI
saraedum Jun 17, 2023
b2b21b7
Fix warnigs in example notebook
saraedum Jun 17, 2023
a5baeb0
Fix example notebooks
saraedum Jun 17, 2023
e3db5f3
Black format source code
saraedum Jun 17, 2023
900cc54
Update timings and drop duplicate test
saraedum Jun 17, 2023
398a22e
Fix deprecation warning
saraedum Jun 17, 2023
d00bd0c
Fix doctest
saraedum Jun 17, 2023
51038a0
Fix graphical doctests
saraedum Jun 17, 2023
8ad8f3f
Mention hierarchy of polygons
saraedum Jun 17, 2023
c379330
Black format source code
saraedum Jun 17, 2023
bc84ee7
Allow points to be defined over non-fields
saraedum Jun 17, 2023
6c8386c
Fix doctests
saraedum Jun 17, 2023
7473a3b
Remove fixed TODOs
saraedum Jun 17, 2023
83efbfe
Document EuclideanPolygonsWithAngles
saraedum Jun 17, 2023
ad096ac
Resolve TODO
saraedum Jun 18, 2023
7831f9a
Work around https://github.com/flatsurf/exact-real/issues/172
saraedum Jun 19, 2023
b9abcb2
Speed up construction of rectangles
saraedum Jun 20, 2023
ef9bd85
Trivial speedup for creating subsets of the hyperbolic plane
saraedum Jun 20, 2023
b48177f
Mark some hyperbolic tests as long time
saraedum Jun 20, 2023
f442093
Speed up creation of triangles
saraedum Jun 20, 2023
2924029
Fix definition of Rational
saraedum Jun 20, 2023
50feb6b
Speed up category checks by only checking one side of the similarity
saraedum Jun 20, 2023
9502390
Mark some polyhedra doctests as taking a (relatively) long time
saraedum Jun 20, 2023
1f6405e
Speed up creation of triangles
saraedum Jun 20, 2023
98c2835
Fix doctests
saraedum Jun 20, 2023
8e10605
Mark some dilation surface tests as long time
saraedum Jun 20, 2023
090a3b6
Marked some delaunay tests as long time
saraedum Jun 20, 2023
f36174b
Speed up triangulation() of polygons
saraedum Jun 20, 2023
28d0865
Mark some tests as long time
saraedum Jun 20, 2023
503f596
Fix doctests
saraedum Jun 20, 2023
99e0c84
Add some long time markers
saraedum Jun 20, 2023
f251c28
Speed up billiards
saraedum Jun 21, 2023
0834845
Fix doctests and add long time markers
saraedum Jun 21, 2023
3080ebd
Fix doctests
saraedum Jun 21, 2023
2d40324
Black format source code
saraedum Jun 21, 2023
ea3d471
Use latest SageMath for benchmarks
saraedum Jun 21, 2023
3f4c57c
Work around limitations in old SageMath versions
saraedum Jun 21, 2023
93f8292
Black format source code
saraedum Jun 21, 2023
7c986fb
Fix codespell issues
saraedum Jun 21, 2023
925cf44
Drop old decorator
saraedum Jun 21, 2023
e5003f1
Fix doctest
saraedum Jun 21, 2023
9650ccd
Fix import in test
saraedum Jun 21, 2023
4bbc40b
Fix pytest tests
saraedum Jun 21, 2023
260e3fb
Require the latest exact-real for is_square
saraedum Jun 22, 2023
638ff5d
pyexactreal now needs a newer Python version due to its dependency on…
saraedum Jun 22, 2023
4b8ec59
Link to monodromy definition on Wikipedia in documentation
saraedum Jun 22, 2023
da7cc0c
Fix pyexactreal pin
saraedum Jun 22, 2023
f5b9d02
Fix docbuild
saraedum Jun 22, 2023
3b8f3dc
Use the latest version of pyflatsurf
saraedum Jun 22, 2023
d162bfe
Explain how to call category methods on mutable surfaces
saraedum Jun 22, 2023
9c766bd
Fix grammar
saraedum Jun 22, 2023
e1a8692
Fix grammar
saraedum Jun 22, 2023
8f7a824
Fix documentation of GL2R image surface
saraedum Jun 22, 2023
7a10e2f
Drop any mention of the real projective plane
saraedum Jun 22, 2023
ae2190a
Clarify news
saraedum Jun 22, 2023
4390877
Fix clash between EuclideanPolygonsWithAngles function and category
saraedum Jun 22, 2023
8d71be6
Use the latest e-antic when benchmarking
saraedum Jun 22, 2023
eb20bbe
Black format source code
saraedum Jun 22, 2023
0a50a33
Fix docbuild
saraedum Jun 22, 2023
cdbd10b
Ignore missing is_square() implementations
saraedum Jun 22, 2023
3096f41
Fix tests that require taking the square roots of exact-reals
saraedum Jun 22, 2023
10340e0
Black format source code
saraedum Jun 22, 2023
be230d9
Fix _an_element_ for exact real base rings
saraedum Jun 22, 2023
5e2e1b0
Actually use the latest mamba version
saraedum Jun 22, 2023
dfc035e
Silence warnings
saraedum Jun 22, 2023
43f7341
Upgrade mamba in the base system when testing
saraedum Jun 22, 2023
c26b4e8
Disable checks that require missing build of surface-dynamics
saraedum Jun 22, 2023
03eef30
Require SageMath 9.2
saraedum Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
mamba env update -n test --quiet -f environment.yml
mamba install black=22.12
- name: Run black
shell: bash -l {0}
run: black `find -name '*.py'`
run: |
black `find -name '*.py'`
# We run our notebooks through black to make sure everything is nicely formatted in our examples.
# Consequently, we cannot use SageMath syntax in the notebooks. (But presently we do not need it anyway.)
jupytext --sync --pipe black doc/examples/*.md
- name: Detect changes
shell: bash -l {0}
run: git diff --exit-code
24 changes: 9 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,19 @@ jobs:
strategy:
matrix:
include:
- optionals: "sage,flipper"
sagelib: "8.8"
environment: "environment.yml"
python: "3.7.12"
- optionals: "sage,flipper"
sagelib: "8.9"
environment: "environment.yml"
python: "3.7.12"
- optionals: "sage,flipper"
sagelib: "9.1"
environment: "environment.yml"
python: "3.7.12"
- optionals: "sage,flipper"
sagelib: "9.2"
environment: "environment.yml"
python: "3.9.15"
- optionals: "sage,flipper,eantic,exactreal"
- optionals: "sage,flipper,eantic"
sagelib: "9.3"
environment: "environment.yml"
python: "3.9.15"
- optionals: "sage,flipper,eantic,exactreal,pyflatsurf"
- optionals: "sage,flipper,eantic,pyflatsurf"
sagelib: "9.4"
environment: "environment.yml"
python: "3.9.15"
- optionals: "sage,flipper,eantic,exactreal,pyflatsurf"
- optionals: "sage,flipper,eantic,pyflatsurf"
sagelib: "9.5"
environment: "environment.yml"
python: "3.9.15"
Expand All @@ -49,6 +37,11 @@ jobs:
sagelib: "9.7"
environment: "environment.yml"
python: "3.10.8"
# surface-dynamics is not available for SageMath 9.8 on conda-forge, see https://github.com/conda-forge/surface-dynamics-feedstock/pull/17
# - optionals: "sage,flipper,eantic,exactreal,pyflatsurf"
# sagelib: "9.8"
# environment: "environment.yml"
# python: "3.10.8"
- optionals: "sage,flipper,eantic,exactreal,pyflatsurf"
environment: "flatsurf.yml"
python: "3.10.8"
Expand All @@ -60,6 +53,7 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
mamba upgrade -n base --all --yes # mamba 1.4.1 segfaults sometimes, make sure we use a later version
mamba install -n test sagelib=${{ matrix.sagelib }}
echo "sagelib ==${{ matrix.sagelib }}" >> $CONDA_PREFIX/conda-meta/pinned
while read; do
Expand Down
5 changes: 4 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
max-line-length=256
max-module-lines=65536

[TYPECHECK]
mixin-class-rgx=ParentMethods|SubcategoryMethods|Parent|HyperbolicConvexSet

[MESSAGES CONTROL]
disable=import-outside-toplevel,no-name-in-module,invalid-name,invalid-unary-operand-type,no-value-for-parameter,abstract-method,arguments-differ,arguments-out-of-order,arguments-renamed,attribute-defined-outside-init,bad-classmethod-argument,bad-staticmethod-argument,broad-exception-caught,broad-exception-raised,chained-comparison,consider-merging-isinstance,consider-swap-variables,consider-using-enumerate,consider-using-f-string,consider-using-generator,consider-using-get,consider-using-in,consider-using-set-comprehension,consider-using-with,cyclic-import,dangerous-default-value,duplicate-code,import-self,inconsistent-return-statements,missing-class-docstring,missing-function-docstring,missing-module-docstring,no-else-break,no-else-continue,no-else-raise,no-else-return,non-ascii-name,non-parent-init-called,pointless-exception-statement,protected-access,raise-missing-from,raising-format-tuple,redefined-argument-from-local,redefined-builtin,redefined-outer-name,self-assigning-variable,self-cls-assignment,singleton-comparison,superfluous-parens,super-init-not-called,too-few-public-methods,too-many-arguments,too-many-boolean-expressions,too-many-branches,too-many-instance-attributes,too-many-locals,too-many-nested-blocks,too-many-public-methods,too-many-return-statements,too-many-statements,undefined-loop-variable,unidiomatic-typecheck,unnecessary-comprehension,unnecessary-dunder-call,unnecessary-lambda,unnecessary-pass,unspecified-encoding,unused-argument,unused-import,unused-variable,unused-wildcard-import,use-a-generator,use-dict-literal,useless-object-inheritance,useless-parent-delegation,wildcard-import,wrong-import-order,fixme,unreachable,reimported
disable=import-outside-toplevel,no-name-in-module,invalid-name,invalid-unary-operand-type,no-value-for-parameter,abstract-method,arguments-differ,arguments-out-of-order,arguments-renamed,attribute-defined-outside-init,bad-classmethod-argument,bad-staticmethod-argument,broad-exception-caught,broad-exception-raised,chained-comparison,consider-merging-isinstance,consider-swap-variables,consider-using-enumerate,consider-using-f-string,consider-using-generator,consider-using-get,consider-using-in,consider-using-set-comprehension,consider-using-with,cyclic-import,dangerous-default-value,duplicate-code,import-self,inconsistent-return-statements,missing-class-docstring,missing-function-docstring,missing-module-docstring,no-else-break,no-else-continue,no-else-raise,no-else-return,non-ascii-name,non-parent-init-called,pointless-exception-statement,protected-access,raise-missing-from,raising-format-tuple,redefined-argument-from-local,redefined-builtin,redefined-outer-name,self-assigning-variable,self-cls-assignment,singleton-comparison,superfluous-parens,super-init-not-called,too-few-public-methods,too-many-arguments,too-many-boolean-expressions,too-many-branches,too-many-instance-attributes,too-many-locals,too-many-nested-blocks,too-many-public-methods,too-many-return-statements,too-many-statements,undefined-loop-variable,unidiomatic-typecheck,unnecessary-comprehension,unnecessary-dunder-call,unnecessary-lambda,unnecessary-pass,unspecified-encoding,unused-argument,unused-import,unused-variable,unused-wildcard-import,use-a-generator,use-dict-literal,useless-object-inheritance,useless-parent-delegation,wildcard-import,wrong-import-order,fixme,unreachable,reimported,too-many-ancestors
8 changes: 4 additions & 4 deletions asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"gap-defaults": [],
"matplotlib-base": [],
"pip+flipper": [],
"pyeantic": ["1.0.3"],
"pyexactreal": ["2.2.1"],
"pyflatsurf": ["3.9.3"],
"pyeantic": ["1.3.0"],
"pyexactreal": ["3.1.0"],
"pyflatsurf": ["3.13.3"],
"python": [],
"sagelib": ["9.4"],
"sagelib": ["10.0"],
"scipy": [],
"surface-dynamics>=0.4.7": []
},
Expand Down
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

# -- General configuration ------------------------------------------------
extensions = [
"sphinx.ext.autodoc",
# We need to use SageMath's autodoc to render nested classes in categories
# correctly. Otherwise they just render as "alias for" in the
# documentation.
"sage_docbuild.ext.sage_autodoc",
"sphinx.ext.todo",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
Expand Down
1 change: 0 additions & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ channels:
- defaults
dependencies:
- sphinx
- jupytext
- myst-nb
- tachyon
- furo
131 changes: 66 additions & 65 deletions doc/examples/apisa_wright.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.13.0
jupytext_version: 1.14.6
kernelspec:
display_name: SageMath 9.3
display_name: SageMath 9.7
language: sage
name: sagemath
---
Expand Down Expand Up @@ -39,62 +39,61 @@ We consider the following half-translation surface
2 2
| |
+---1---+---1---+

It belongs to $Q_3(10, -1^2)$.

```{code-cell} ipython3
```{code-cell}
from flatsurf import Polygon, MutableOrientedSimilaritySurface


def apisa_wright_surface(h24, h3, l15, l6, l7, l8):
from flatsurf import ConvexPolygons, HalfTranslationSurface, Surface_list
params = [h24, h3, l15, l6, l7, l8]
K = Sequence(params).universe().fraction_field()
K = Sequence([h24, h3, l15, l6, l7, l8]).universe().fraction_field()

v24 = vector(K, (0, h24))
v3 = vector(K, (0, h3))
v15 = vector(K, (l15, 0))
v6 = vector(K, (l6, 0))
v7 = vector(K, (l7, 0))
v8 = vector(K, (l8, 0))
C = ConvexPolygons(K)
P0 = C(edges=[v15,v15,v24,-2*v15,-v24])
P1 = C(edges=[2*v15,v8,v7,v6,v3,-v8,-v7,-v6,-v15,-v15,-v3])
P2 = C(edges=[v15,v24,-v15,-v24])
S = Surface_list(base_ring = C.base_ring())
S.rename("ApisaWrightSurface({})".format(', '.join(map(str, params))))
S.add_polygons([P0, P1, P2])
# set_edge_pairing(poly_num1, edge_num1, poly_num2, edge_num2)
S.set_edge_pairing(0, 0, 0, 1)
S.set_edge_pairing(0, 2, 0, 4)
S.set_edge_pairing(0, 3, 1, 0)
S.set_edge_pairing(1, 1, 1, 5)
S.set_edge_pairing(1, 2, 1, 6)
S.set_edge_pairing(1, 3, 1, 7)
S.set_edge_pairing(1, 4, 1, 10)
S.set_edge_pairing(1, 8, 2, 2)
S.set_edge_pairing(1, 9, 2, 0)
S.set_edge_pairing(2, 1, 2, 3)

S = MutableOrientedSimilaritySurface(K)

S.add_polygon(Polygon(edges=[v15, v15, v24, -2 * v15, -v24]))
S.add_polygon(
Polygon(edges=[2 * v15, v8, v7, v6, v3, -v8, -v7, -v6, -v15, -v15, -v3])
)
S.add_polygon(Polygon(edges=[v15, v24, -v15, -v24], base_ring=K))

S.glue((0, 0), (0, 1))
S.glue((0, 2), (0, 4))
S.glue((0, 3), (1, 0))
S.glue((1, 1), (1, 5))
S.glue((1, 2), (1, 6))
S.glue((1, 3), (1, 7))
S.glue((1, 4), (1, 10))
S.glue((1, 8), (2, 2))
S.glue((1, 9), (2, 0))
S.glue((2, 1), (2, 3))
S.set_immutable()
return HalfTranslationSurface(S)
return S
```

We use some simple parameters:

```{code-cell} ipython3
x = polygen(QQ)
K.<c> = NumberField(x^2 - 2, embedding=AA(2).sqrt())
S = apisa_wright_surface(1, 1+c, 1, c, 1+c, 2*c-1)
```{code-cell}
K = QuadraticField(2)
a = K.gen()
S = apisa_wright_surface(1, 1 + a, 1, a, 1 + a, 2 * a - 1)
S.plot(edge_labels=False)
```

Now build the canonical double cover and orbit closure:

```{code-cell} ipython3
S.stratum()
```{code-cell}
S
```

```{code-cell} ipython3
S.stratum().dimension()
```
Now build the canonical double cover and orbit closure:

```{code-cell} ipython3
```{code-cell}
U = S.minimal_cover("translation")
U.stratum()
```
Expand All @@ -104,37 +103,39 @@ length 16 looking for cylinders. Each decomposition into cylinders and minimal
components provides a new tangent direction in the `GL(2,R)`-orbit closure of
the surface via A. Wright's cylinder deformation.

```{code-cell} ipython3
```{code-cell}
from flatsurf import GL2ROrbitClosure # optional: pyflatsurf
U = S.minimal_cover('translation') # optional: pyflatsurf
O = GL2ROrbitClosure(U) # optional: pyflatsurf
O.dimension() # optional: pyflatsurf

O = GL2ROrbitClosure(U) # optional: pyflatsurf
O.dimension() # optional: pyflatsurf
```

The above dimension is just the current dimension. At initialization it only
consists of the `GL(2,R)`-direction.

```{code-cell} ipython3
old_dim = O.dimension() # optional: pyflatsurf
for i, dec in enumerate(O.decompositions(16, bfs=True)): # optional: pyflatsurf
O.update_tangent_space_from_flow_decomposition(dec)
new_dim = O.dimension()
if old_dim != new_dim:
holonomies = [cyl.circumferenceHolonomy() for cyl in dec.cylinders()]
# .area() as reported by liblatsurf is actually twice the area
areas = [cyl.area()/2 for cyl in dec.cylinders()]
moduli = [(v.x()*v.x() + v.y()*v.y()) / area for v, area in zip(holonomies, areas)]
u = dec.vertical().vertical()
print("saddle connection number", i)
print("holonomy :", u)
print("length :", RDF(u.x()*u.x() + u.y()*u.y()).sqrt())
print("num cylinders :", len(dec.cylinders()))
print("num minimal comps. :", len(dec.minimalComponents()))
print("current dimension :", new_dim)
print("cyls. holonomies :", holonomies)
print("cyls. moduli :", moduli)
if new_dim == 7:
break
old_dim = new_dim
print('-' * 30)
```{code-cell}
old_dim = O.dimension() # optional: pyflatsurf
for i, dec in enumerate(O.decompositions(16, bfs=True)): # optional: pyflatsurf
O.update_tangent_space_from_flow_decomposition(dec)
new_dim = O.dimension()
if old_dim != new_dim:
holonomies = [cyl.circumferenceHolonomy() for cyl in dec.cylinders()]
# .area() as reported by liblatsurf is actually twice the area
areas = [cyl.area() / 2 for cyl in dec.cylinders()]
moduli = [
(v.x() * v.x() + v.y() * v.y()) / area for v, area in zip(holonomies, areas)
]
u = dec.vertical().vertical()
print("saddle connection number", i)
print("holonomy :", u)
print("length :", RDF(u.x() * u.x() + u.y() * u.y()).sqrt())
print("num cylinders :", len(dec.cylinders()))
print("num minimal comps. :", len(dec.minimalComponents()))
print("current dimension :", new_dim)
print("cyls. holonomies :", holonomies)
print("cyls. moduli :", moduli)
if new_dim == 7:
break
old_dim = new_dim
print("-" * 30)
```
Loading
Loading