Skip to main content

Fan flip graph

regfans

Nate MacFadden, Liam McAllister Group, Cornell

DOI

regfans is a Python library for studying lattice vector configurations.

Used by CYTools.

Core Functionality

The library computes and modifies regular triangulations of vector configurations. These could also be known as "regular polyhedral fans" or "vex triangulations".

Key capabilities:

  • Verify properties of vector configurations (solid, totally-cyclic) and fans (fine, regular, point-configuration-compatible),
  • Construct regular triangulations via lifting,
  • Compute all (regular) triangulations via flip graph traversal, and
  • Perform efficient linear flips.

See Triangulations: Structures for Algorithms and Applications by De Loera, Rambau, and Santos for a definitive reference on such topics. It is a wonderful book.

regfans has a lot of overlap with TOPCOM; regfans will port over more computations to TOPCOM as beneficial for speed (via triangulumancer).

Installation

Install via conda (most robust across platforms):

conda env create -f environment.yml
conda activate regfans
pip install -e .

Or via pip (see also PyPI listing):

pip install regfans

Note: regfans now ships a C extension (the grow4d triangulation backend), so installing from source needs a C compiler. Wheels carry it prebuilt. Set REGFANS_NATIVE=1 before pip install -e . to tune the build to the local CPU, which is faster but not portable to other machines.

Note: Most methods require dual cone computation via pplpy. On macOS and Linux x86_64, pip install pulls a prebuilt pplpy wheel automatically (no system libraries needed). On other platforms (Windows, or ARM/musl Linux on older Pythons) there is no wheel and pip falls back to a source build that needs the ppl/gmp C libraries; the conda environment supplies those reliably.

Tests

Install the test extra and run the suite:

pip install -e ".[test]"
pytest

Primary Interface

The main class is VectorConfiguration:

from regfans import VectorConfiguration

pts = [[1, -2, -1, -1], [1, 1, -1, 2], [-2, 0, 0, -1],
       [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]
vc = VectorConfiguration(pts)

# construct a regular triangulation via lifting
fan = vc.subdivide()
print(fan.is_fine(), fan.is_regular())

# compute all triangulations and the flip graph
all_fans = vc.all_triangulations()
G, fans, labels = vc.flip_graph(compute_node_labels=True)

See documentation/api.md for the full API reference and the tutorials directory for annotated examples.

Citation

If you are using regfans for toric-geometric or Calabi-Yau applications, please cite Calabi-Yau Threefolds from Vex Triangulations:

@article{MacFadden:2512.14817,
  author  = {MacFadden, Nate and Sheridan, Elijah},
  title   = {Calabi-{Y}au Threefolds from Vex Triangulations},
  doi     = {10.48550/arXiv.2512.14817},
  url     = {https://arxiv.org/abs/2512.14817},
}

Otherwise, please cite this repository:

@software{regfans,
  author  = {MacFadden, Nate},
  title   = {regfans},
  doi     = {10.5281/zenodo.19406101},
  url     = {https://github.com/natemacfadden/regfans},
  orcid   = {0000-0002-8481-3724},
}

This package was developed for constructing toric varieties in Calabi-Yau Threefolds from Vex Triangulations, supported in part by NSF grant PHY-2309456. Toric-geometric computations are provided by CYTools, which extends regfans via a vector_config module.

Organization

regfans/
├── src/regfans/
│   ├── vectorconfig.py   # VectorConfiguration class: triangulations, flip graph, VC properties
│   ├── fan.py            # Fan class: triangulation of a vector configuration
│   ├── circuits.py       # Circuit and Circuits classes
│   ├── grow4d.pyx        # Cython wrapper for the grow4d enumeration backend
│   ├── grow4d.h          # header-only C kernel: all fans by growth + backtracking
│   └── util.py           # shared utilities for vector configuration computations
├── tests/
│   ├── test_vectorconfig.py   # tests for VectorConfiguration
│   ├── test_fan.py            # tests for Fan
│   ├── test_circuits.py       # tests for circuits
│   └── test_util.py           # tests for utilities
├── tutorials/
│   ├── simple_lifting_ex.py   # constructing a regular triangulation via lifting
│   └── all_fans_ex.py         # computing all triangulations and the flip graph
├── documentation/
│   ├── api.md                 # full API reference
│   └── clean_api.py           # script to generate api.md
├── setup.py                   # builds the grow4d C extension
└── pyproject.toml

License

GPLv3. Copyright (c) 2026 Nate MacFadden.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

regfans-0.4.1.tar.gz (240.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

regfans-0.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (824.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

regfans-0.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (788.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

regfans-0.4.1-cp313-cp313-macosx_11_0_arm64.whl (318.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

regfans-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (833.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

regfans-0.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (798.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

regfans-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (318.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

regfans-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (833.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

regfans-0.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (804.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

regfans-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (318.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

regfans-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (807.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

regfans-0.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (782.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

regfans-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (319.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

regfans-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (805.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

regfans-0.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (780.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

regfans-0.4.1-cp39-cp39-macosx_11_0_arm64.whl (319.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file regfans-0.4.1.tar.gz.

File metadata

  • Download URL: regfans-0.4.1.tar.gz
  • Upload date:
  • Size: 240.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for regfans-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e80ddbf7215e4852f795e0a2faee74f7547b895ec565a94e56be766819a20a71
MD5 09d4a49dcd8ec03f35c99fe7397d7fcf
BLAKE2b-256 5d4c7815e94ac927e716c1b1a2755dd9bf0fd8f5b98d8065bdfefc69c87a5a06

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1.tar.gz:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 accc6519329d91c03932468c03ec9241dfc9ab86b6dcb162a6632a744f4a8661
MD5 d3635de3909d3a1f011ea71e7de54a8b
BLAKE2b-256 49f0beca1e846dccce58f1eef5a013de7b210dd55384bd7a07ce141774079c7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 54a3c8f4eea0b74b155a901c77eef493fb89cb867e9dd1dcfb7aba329ecfc651
MD5 b44f984010bb2500ca4cee76b1498cbc
BLAKE2b-256 748f9f46bbbadc8b0ce52db3b6496f5e81a4096c50891ac9930f47af2da2c4a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5167153c7581f963e6dcbb33d2d3c0e717df147cc458c540b855afa3c1f543a9
MD5 ab2ed9180af771e077f249aacae051a6
BLAKE2b-256 3f2fc7777a4b96275d3cf5386a397ada89b21c736c2c7493b4e382b02a0f0b33

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d43b5c1fb5dc25ab0407982843b2d8cbbf81edd60899196cb9c81c3e7926ac90
MD5 db3594c3627641ae849947a31ff20b05
BLAKE2b-256 8eb2d232e249721715a90053b5b4ef256950f9f05e9ed2446e1d2e4bc56c1518

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 ed9047b0fb5ea66ccfca18afe4963b0451650fcee1dcc2db707ccf3dcdcb2980
MD5 a600fa608bc88901ae04973119e5826e
BLAKE2b-256 07bb7f417da40ad8d347a933cbbf891e5aea5f2fbf1cf08e890c737c48d03244

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e2b5e0dd6eb80c35ee683480e24e1175db4727ed1764faea51d8aa636ec4b73
MD5 6e68ada2ed8b79d06dfd18118953c958
BLAKE2b-256 92dc17188a4b53c8993c0f2e2b4e6561f72f17770370ecd3a6f08cc9c61251aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 791f38daf72c94d21e41cece4147035bc193043d9ff5fd342672eeab79107896
MD5 b0f989111a67a9d57af3a7ddcadfadca
BLAKE2b-256 7f46e324256748488b047c2023004e7c68c64f726015a13690be12c5092f5a0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e7abe50d3653641e65cd8a8fac0e35c61c4f7644d3850961c874692a23728d07
MD5 5d2fb5d0ed5cb42b79d5714dc7c08524
BLAKE2b-256 ac0aed4bb69c9c6218694d5eb265535d36244aa054c3077a1c210e1aeffc764b

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3e2569d0e4e02f55a4111421145641fcd7a4bfbda19ce825f5b3226ede7eb72
MD5 f71eea3c21840b74df88a66be5c36982
BLAKE2b-256 96b2b59abb0446f8d246a61d52bb9df896c2412cae282f696364980ed3fa8ace

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 380ecc8b4ad7c95425c99d4931248c655cb4f9267895d69fc15d10ad1acf7b6c
MD5 d4f1dc9aefe7103003d5b0a3d453c5c2
BLAKE2b-256 fe13f47462c28129596dc0570a4a992607acac43fc262fd0e3c6dfd536ca1176

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2fa809576987288bf45c8c0b38dac4bc0798605e29c6016b9a1ec9b1e6cd029a
MD5 32722fcacf037a4ceee1ae14dd6a2f67
BLAKE2b-256 b05848d2c20a8898d39ae6f27082c545736dfe07c1388b0e9d96625a71b3870e

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42a1d5370b9ecc468bcd51b31e687fd6f1adab408d7a2daca1f3192466138623
MD5 57ea968cd7bbcf4e74bcd5a687f4ba91
BLAKE2b-256 7aa6a2d94c76bd8d892cc36015011eecc609c491a739b693977f3ead87c02501

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56bfebb00762c581ee418301a9c11a75b7e46702ce3fbb374dc02294a49b6a51
MD5 449418a3d1dd1d95ae8485606a1759a9
BLAKE2b-256 a99d77239aed045660731c3547df9eb2098a8e4657b64f6c35da6b36df39a530

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d034505459aa119cea02df436a7ad4b097c5d5f5897c0cb875b1c2e7a67e8821
MD5 0069f5bfbda32f787d1a9b8e98830f2c
BLAKE2b-256 8ca70dbcefc2688798b7a274eae737ea12dde756e32e596a3130e08f26683a32

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regfans-0.4.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for regfans-0.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed603432e00c092524e41004b7f01358f085f8b67751a423babb4a08be2e32bf
MD5 993cee04caed8bb6f4d39b34b49e4a76
BLAKE2b-256 669add7c58db453476e6daa2b32dd48fe57f4dd40c5ec7ce2631ec1c70898378

See more details on using hashes here.

Provenance

The following attestation bundles were made for regfans-0.4.1-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish.yml on natemacfadden/regfans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.1 This release

16 files

0.4.0

16 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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