Class PermSolver

java.lang.Object
jline.lib.perm.PermSolver
Direct Known Subclasses:
AdaPartSampler, BethePermanent, HeuristicPermanent, HuberLawSampler, NaivePermanent, Permanent, RyzerPermanent

public abstract class PermSolver extends Object
Abstract base class for permanent computation solvers. This abstract class provides the common interface for all permanent computation algorithms. All solvers inherit from this class and implement the compute() method for their specific algorithm. The base class provides the solve() method that measures time and memory usage during computation.
  • Field Details

    • matrix

      public final Matrix matrix
    • n

      public final int n
    • value

      public double value
    • time

      public long time
    • memory

      public long memory
  • Constructor Details

    • PermSolver

      public PermSolver(Matrix matrix)
  • Method Details

    • getMatrix

      public Matrix getMatrix()
    • getN

      public int getN()
    • getValue

      public double getValue()
    • getTime

      public long getTime()
    • getMemory

      public long getMemory()
    • compute

      public abstract void 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 field.
    • solve

      public void solve()
      Measure time and memory usage of the compute method. This method wraps the compute() call with performance monitoring.