A C++ shared library that computes the real scheme (ambient isotopy type in
The algorithm runs in near-quadratic time in the degree
Geiselmann, Joswig, Kastner, Mundinger, Pokutta, Spiegel, Wack, Zimmer. Fast Isotopy Computation for T-Curves. ICMS 2026. arXiv:2604.09221
and was used to verify the realizability of all 121 degree-seven real schemes (121 Patchworked Curves of Degree Seven; data at dmg-lab/CombinatorialPatchworking).
Status. The core algorithm (
Isotopy::Graph) is tested and stable. The surrounding build/packaging is geared toward our own use; if you embed the library elsewhere, please report any issues.
Isotopy::Graph— computes the real scheme of a patchwork and emits its Viro (Rohlin–Viro) notation.- Queries:
viro_notation(),even_regions(),odd_regions(),is_mcurve().
Isotopy::Graph(delta, sign, edges) takes:
-
delta— the degree$d$ . -
sign— the sign distribution on the lattice points of$d\cdot\Delta_2$ , in the standard lattice-point order (astd::vector<bool>of length $\tfrac12(d{+}1)(d{+}2)$). -
edges— the triangulation as an edge list over lattice-point indices (std::vector<std::pair<int,int>>).
Man pages are generated by Doxygen from the header:
make docs # regenerate from include/isotopy_graph.h
man docs/man/man3/Isotopy_Graph.3 # Isotopy::Graph class referenceWorked examples are the test cases in tests/isotopy_graph.cpp.
A Makefile drives the build and tests:
make # build the shared library
make test # run tests
make clean # remove build artifactsInclude the header and link against the library:
#include "isotopy_graph.h"g++ myfile.cpp -L/path/to/lib -lisotopyExample (degree 2):
#include "isotopy_graph.h"
int main() {
int delta = 2;
std::vector<bool> sign = {true, true, true, true, true, true};
std::vector<std::pair<int, int>> edges =
{{0,1},{1,2},{0,3},{3,4},{2,4},{1,3},{1,4},{4,5},{3,5}};
Isotopy::Graph g(delta, sign, edges);
g.isotopy_type();
std::string notation = g.viro_notation();
int even = g.even_regions();
int odd = g.odd_regions();
bool mcurve = g.is_mcurve();
}