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.26.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.26.0
File Size Uploaded Provenance Actions
mapfolding-0.26.0.tar.gz 800.8 kB Without provenance Details for mapfolding-0.26.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.8 MB

Release files / mapfolding-0.26.0.tar.gz

Download URL mapfolding-0.26.0.tar.gz
Size 800.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b97d7a3e41fdb02bbc09f958f11e8b4d512eece3111b7ddbff6657058249bc9
BLAKE2b-256 checksum
How to use checksums
d139beda3ef0a6c4007090593bdf5ba8ee9c5649eb9207bfde3d459d19583af2
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.26.0-py3-none-any.whl

Download URL mapfolding-0.26.0-py3-none-any.whl
Size 999.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83eaffe4eed52a4304f834e18e69f7c31316e32b63946d1767d3e29f9e21918c
BLAKE2b-256 checksum
How to use checksums
064ce300091abf8a271f01b3f120b5de168d460ace3db81230338a6fb2bf525b
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.26.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.26.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