Package jline.lib.perm
Class NaivePermanent
-
- All Implemented Interfaces:
public final class NaivePermanent extends PermSolver
Implementation of the naive exact permanent computation.
This solver computes the exact permanent of a matrix by iterating over all possible permutations and summing the products of matrix elements according to each permutation. While this gives the exact result, it has O(n!) complexity and is only practical for small matrices.
The permanent of an n×n matrix A is defined as: perm(A) = Σ_π ∏{i=1}^n a{i,π(i)} where the sum is over all permutations π of {1,2,...,n}.
-
-
Constructor Summary
Constructors Constructor Description NaivePermanent(Matrix matrix, Boolean solve)
-