This Python/Rust package (pottslab) is an automated port of the original
MATLAB/Java pottslab library:
| Original authors | Martin Storath, Andreas Weinmann |
| Original license | MIT |
| Original language | MATLAB (high-level), Java (performance core) |
| Port author | Claude Sonnet coding agent (Anthropic, 2026) |
| Port language | Python (API layer) + Rust/PyO3 (performance core) |
| Port license | MIT (unchanged) |
All algorithms are faithful translations of the original MATLAB/Java implementations:
src/l2potts.rs — Direct port of Java/src/pottslab/L2Potts.java::call():
O(n²) dynamic programming solver for the L2-Potts functional with early-termination
acceleration and piecewise-constant reconstruction.src/l1potts.rs — Direct port of Java/src/pottslab/IndexedLinkedHistogram.java:
sorted linked-list histogram for efficient L1-Potts DP.src/processor.rs — Direct port of Java/src/pottslab/PLProcessor.java:
parallel (Rayon) application of 1D Potts in horizontal, vertical, diagonal,
and anti-diagonal directions.src/admm.rs — Direct port of Java/src/pottslab/JavaTools.java::minL2PottsADMM4/8():
ADMM splitting for the 2D Potts problem with 4- and 8-connected neighborhoods.pottslab/inverse.py — Direct port of Potts/PottsCore/iPottsADMM.m:
inverse Potts solver for γ‖Du‖₀ + ‖Au-f‖ₚ with scipy linear sub-solvers.pottslab/sparsity.py — Port of Sparsity/SparsityCore/minSpars.m.pottslab/tikhonov.py — Port of Tikhonov/minL2Tikhonov.m and minL1Tikhonov.m.pottslab/utils.py — Port of helpers in Auxiliary/.min_l2_potts instead of minL2Potts).