Class ApproximationExample

java.lang.Object
org.tweetyproject.logics.mln.examples.ApproximationExample

public class ApproximationExample extends Object
Example code illustrating the use of the sampling-based MLN reasoner.
Author:
Matthias Thimm
  • Constructor Details

    • ApproximationExample

      public ApproximationExample()
      Default constructor for ApproximationExample.

      Initializes an example setup to illustrate the comparison between a sampling-based reasoner and a naive reasoner for querying MLNs.

  • Method Details

    • main

      public static void main(String[] args) throws ParserException, IOException, InterruptedException
      The main method to run the approximation example.

      This method iterates through an MLN example, performs queries using both a sampling-based MLN reasoner and a naive MLN reasoner, and prints the results. The method also introduces a delay between queries for demonstration purposes.

      Parameters:
      args - command-line arguments (not used in this example)
      Throws:
      ParserException - if there is an error during parsing
      IOException - if there is an I/O error
      InterruptedException - if the thread is interrupted while sleeping