Class HuberLawSampler

  • All Implemented Interfaces:

    
    public final class HuberLawSampler
    extends PermSolver
                        

    Sampling method to approximate the permanent using the Huber-Law bound.

    The Huber-Law algorithm uses acceptance-rejection sampling with a carefully constructed bound to estimate the permanent. The method rescales the matrix to be doubly stochastic and then uses the Huber-Law bound for efficient sampling.

    Key features:

    • Provides theoretical guarantees on approximation quality

    • Three sampling modes: classic (with acceptance guarantee), time-limited, and sample-limited

    • Automatic matrix rescaling to doubly stochastic form

    • Constructor Detail

      • HuberLawSampler

        HuberLawSampler(Matrix matrix, Double delta, Double alpha2, Double epsilon, String mode, Integer numberOfSamples, Long maximumTime, Boolean solve)
        Parameters:
        matrix - The matrix for which to compute the permanent approximation
        delta - Approximation parameter: result will be (1+delta) times the true value with high probability (default: 0.
        alpha2 - Accuracy of doubly stochastic rescaling (default: 0.
        epsilon - Confidence parameter: approximation holds with probability (1-epsilon) (default: 0.
        mode - Sampling mode: "classic", "time", or "sample" (default: "classic")
        numberOfSamples - Maximum number of samples for sample mode (default: 1000)
        maximumTime - Maximum time in seconds for time mode (default: 30)
        solve - Whether to automatically run solve() after construction (default: false)