Class PermSolver

  • All Implemented Interfaces:

    
    public abstract class PermSolver
    
                        

    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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      PermSolver(Matrix matrix)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Integer getN() The dimension of the matrix
      final Double getValue() The computed permanent value (set by compute() method)
      final Unit setValue(Double value) The computed permanent value (set by compute() method)
      final Long getTime() The computation time in milliseconds
      final Unit setTime(Long time) The computation time in milliseconds
      final Long getMemory() The memory usage in bytes
      final Unit setMemory(Long memory) The memory usage in bytes
      final Matrix getMatrix() The matrix for which to compute the permanent
      abstract Unit compute() Compute the permanent or approximation for the given matrix.
      final Unit solve() Measure time and memory usage of the compute method.
      • Methods inherited from class java.lang.Object

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

      • PermSolver

        PermSolver(Matrix matrix)
    • Method Detail

      • getN

         final Integer getN()

        The dimension of the matrix

      • getValue

         final Double getValue()

        The computed permanent value (set by compute() method)

      • setValue

         final Unit setValue(Double value)

        The computed permanent value (set by compute() method)

      • getTime

         final Long getTime()

        The computation time in milliseconds

      • setTime

         final Unit setTime(Long time)

        The computation time in milliseconds

      • getMatrix

         final Matrix getMatrix()

        The matrix for which to compute the permanent

      • compute

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

      • solve

         final Unit solve()

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