Class ConcurrentApproxAnalysis

java.lang.Object
org.tweetyproject.arg.bipolar.analysis.AbstractAnalysis
org.tweetyproject.arg.bipolar.analysis.ConcurrentApproxAnalysis
All Implemented Interfaces:
Analysis, ProbabilisticJustificationAnalysis

public class ConcurrentApproxAnalysis extends AbstractAnalysis implements ProbabilisticJustificationAnalysis
This class implements approximate probabilistic justification of a set of queries using Monte Carlo Sampling of induced EAFs from a PEAF. The computation is done in batches, the main thread checks the condition of when to stop after each batch.
Author:
Taha Dogan Gunes
  • Field Details

    • total

      public double total
  • Constructor Details

    • ConcurrentApproxAnalysis

      public ConcurrentApproxAnalysis(PEAFTheory peafTheory, AbstractExtensionReasoner extensionReasoner, double errorLevel)
      Constructs ConcurrentApproxAnalysis with noThreads equal to availableProcessors - 1
      Parameters:
      peafTheory - the PEAFTheory to be analyzed
      extensionReasoner - the extension reasoner
      errorLevel - the error level in double
    • ConcurrentApproxAnalysis

      public ConcurrentApproxAnalysis(PEAFTheory peafTheory, AbstractExtensionReasoner extensionReasoner, double errorLevel, int noThreads)
      Constructs ConcurrentApproxAnalysis with batchSize equal to noThreads*2
      Parameters:
      peafTheory - the PEAFTheory to be analyzed
      extensionReasoner - the extension reasoner
      errorLevel - the error level in double
      noThreads - the number of threads
    • ConcurrentApproxAnalysis

      public ConcurrentApproxAnalysis(PEAFTheory peafTheory, AbstractExtensionReasoner extensionReasoner, double errorLevel, int noThreads, int batchSize)
      The default constructor for ConcurrentApproxAnalysis
      Parameters:
      peafTheory - the PEAFTheory to be analyzed
      extensionReasoner - the extension reasoner
      errorLevel - the error level in double
      noThreads - the number of threads
      batchSize - the number jobs to be completed for checking when to stop
  • Method Details

    • query

      public AnalysisResult query(Set<BArgument> args)
      Computes approximately what is probabilistic justification of the given set of arguments in the PEAF given error level concurrently.
      Specified by:
      query in interface Analysis
      Parameters:
      args - the set of arguments necessary for the query
      Returns:
      an AnalysisResult object