Class ApproximationExample
java.lang.Object
org.tweetyproject.logics.mln.examples.ApproximationExample
Example code illustrating the use of the sampling-based MLN reasoner.
- Author:
- Matthias Thimm
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ApproximationExample
public ApproximationExample()Default constructor forApproximationExample
.Initializes an example setup to illustrate the comparison between a sampling-based reasoner and a naive reasoner for querying MLNs.
-
-
Method Details
-
main
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 parsingIOException
- if there is an I/O errorInterruptedException
- if the thread is interrupted while sleeping
-