Class BethePermanent

  • All Implemented Interfaces:

    
    public final class BethePermanent
    extends PermSolver
                        

    Implementation of Sum Product Algorithm (SPA) to approximate the Bethe permanent.

    The Bethe permanent approximation uses message passing between matrix elements to compute an approximation of the permanent. This method is particularly useful for large matrices where exact computation is computationally expensive.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit compute() Compute the permanent or approximation for the given matrix.
      • Methods inherited from class jline.lib.perm.PermSolver

        getMatrix, getMemory, getN, getTime, getValue, setMemory, setTime, setValue, solve
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BethePermanent

        BethePermanent(Matrix matrix, Double epsilon, Integer maxIteration, Boolean solve)
        Parameters:
        matrix - The matrix for which to compute the Bethe permanent approximation
        epsilon - Convergence threshold for the SPA algorithm (default: 0.
        maxIteration - Maximum number of iterations if convergence is not reached (default: 200000)
        solve - Whether to automatically run solve() after construction (default: false)
    • Method Detail

      • compute

         Unit compute()

        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 property.