Class HeuristicPermanent

java.lang.Object
jline.lib.perm.PermSolver
jline.lib.perm.HeuristicPermanent

public class HeuristicPermanent extends PermSolver
Heuristic approximation to the permanent of a positive matrix. This implementation uses Sinkhorn scaling to make the matrix approximately doubly stochastic, then applies a mean-field approximation with van der Waerden bounds combined with a Gurvits-like capacity bound. The algorithm: 1. Uses Sinkhorn scaling to make A approximately doubly stochastic 2. Applies a mean-field approximation with van der Waerden bounds 3. Combines with a Gurvits-like capacity bound 4. Scales the result back to the original matrix scale This is a heuristic approximation suitable for large matrices where exact computation is computationally prohibitive. The approximation quality depends on the structure of the input matrix.
  • Constructor Details

    • HeuristicPermanent

      public HeuristicPermanent(Matrix matrix, double tolerance, int maxIterations, boolean solve)
      Constructor with all parameters.
      Parameters:
      matrix - The matrix for which to compute the permanent (must be strictly positive)
      tolerance - Convergence threshold for Sinkhorn scaling
      maxIterations - Maximum number of Sinkhorn iterations
      solve - Whether to automatically run solve() after construction
      Throws:
      IllegalArgumentException - if matrix contains non-positive elements
    • HeuristicPermanent

      public HeuristicPermanent(Matrix matrix, boolean solve)
      Constructor with just matrix and solve parameters. Uses default tolerance (1e-10) and maxIterations (1000).
    • HeuristicPermanent

      public HeuristicPermanent(Matrix matrix)
      Constructor with just matrix parameter. Uses default tolerance (1e-10), maxIterations (1000), and solve (false).
  • Method Details

    • compute

      public void compute()
      Description copied from class: PermSolver
      Compute the permanent or approximation for the given matrix. This method must be implemented by all concrete solver classes. The result should be stored in the value field.
      Specified by:
      compute in class PermSolver