Package jline.lib.perm
Class RyzerPermanent
-
- All Implemented Interfaces:
public final class RyzerPermanent extends PermSolver
Implementation of Ryzer's algorithm to calculate the permanent.
Ryzer's algorithm computes the permanent using the inclusion-exclusion principle. This implementation provides two modes:
Gray code version: Uses Gray code ordering for efficient bit manipulation (default)
Naive version: Direct implementation using combinations
The Gray code version is generally more efficient as it incrementally updates row sums rather than recomputing them for each subset.