Skip to main content

mapFolding

pip install mapFolding

Map folding, meanders, stamp folding, semi-meanders. Experiment with algorithm transformations and code optimization.

I don't know how to write a README.md. Furthermore, the package used to be focused on multidimensional map folding and tools for transforming the algorithm to experiment with optimizations or to explore the algorithm.

First, the tools for transforming algorithms became far more sophisticated and powerful than this package. So I moved them to astToolkit. But those got so sophisticated, that I create more than half of that package through another layer of meta-programming: astToolFactory.

Second, when I finally understood the connections between map folding and meanders, I added meanders to this package, and applied my transformation tools to that algorithm.

I used a weaker form of this package to compute new terms for OEIS A001415, "Number of ways of folding a 2 X n strip of stamps." There are cool and powerful tools in here, but as of 2025 September 17, I am dissatisfied with the organization and documentation. It's annoying.

Finding stuff

  1. At the moment, almost every algorithm version eventually runs through "mapFolding/basecamp.py", so it's sort of an overview and you can work backwards to find more details.
  2. The directory "mapFolding/algorithms" only has "handmade" algorithms. Therefore, most logic for most computations is based on something in that directory.
  3. The directory "mapFolding/syntheticModules" has code that is generated by the transformation tools.
  4. Transformation functions are in "mapFolding/someAssemblyRequired."
  5. The directory "mapFolding/reference" has "reference" materials.
  6. "mapFolding/tests" has the tests, and I have tried to make it easy for you to add your versions of the algorithms to the tests. Is it actually easy? I'll say it this way: if you were to create your own subclass of ast.AST it would be impossible for you to add your subclass to all of the ast module tests with just a few lines of code. In contrast, it is possible to fully test your algorithm with my tests by adding between 3 and 25 lines of code. So, yeah, it's easy.

Math and programming

I'm not a mathematician. I don't have training in or professional experience as a programmer. I'm not stupid: I'm ignorant.

Reference materials

A map-folding problem

Folding a strip of stamps

Multi-dimensional map-folding

A transfer matrix approach to the enumeration of plane meanders

A new transfer-matrix algorithm for exact enumerations: self-avoiding polygons on the square lattice

Stamp Foldings, Semi-Meanders, and Open Meanders: Fast Generation Algorithms

Foldings and meanders

Valid Orderings of Layers When Simple-Folding a Map

My recovery

Static Badge YouTube Channel Subscribers

CC-BY-NC-4.0

Metadata

Release files for mapFolding 0.25.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mapFolding 0.25.0
File Size Uploaded Provenance Actions
mapfolding-0.25.0.tar.gz 793.2 kB Without provenance Details for mapfolding-0.25.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mapFolding 0.25.0
File Interpreter ABI Platform Actions
mapfolding-0.25.0-py3-none-any.whl Python 3 none any Details for mapfolding-0.25.0-py3-none-any.whl

Total release size: 1.8 MB

Release files / mapfolding-0.25.0.tar.gz

Download URL mapfolding-0.25.0.tar.gz
Size 793.2 kB
Tags Source
SHA-256 checksum
How to use checksums
417d3edef2e9ff3d96d65e87ac8237db7909fb8968db1065a9100a48430510e7
BLAKE2b-256 checksum
How to use checksums
1a97f51ae4ef4ab6c69a0e01bfd4842dea207e6c0aadd540cb5e55374e2b01f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / mapfolding-0.25.0-py3-none-any.whl

Download URL mapfolding-0.25.0-py3-none-any.whl
Size 990.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81c564224033ba7145abf7d832f28ff8ca18729ad4e3d22a15916a929887b290
BLAKE2b-256 checksum
How to use checksums
7336e42fefd39a94d9e9820c952563e49d55ce0589318ddd90910cb4d0212587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Security for mapFolding 0.25.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.25.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page