public class ConditionalStructure extends Object implements Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld>
| Modifier and Type | Class and Description |
|---|---|
static class |
ConditionalStructure.Generator
The possible values of a conditional for a possible world
|
| Constructor and Description |
|---|
ConditionalStructure()
Default-Ctor generates empty Conditional structure
|
ConditionalStructure(Collection<Conditional> conditionals)
Ctor: generates a conditional structure containing the given conditionals
|
ConditionalStructure(Collection<Conditional> conditionals,
Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> comparator)
Ctor: Generates a ConditionalStructure containing the given conditionals and
using the given comparator to sort the worldData map.
|
ConditionalStructure(Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> comparator)
Ctor: Generates an empty ConditionalStructure that uses the given
Comparator to sort its worldData map.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addConditional(Conditional cond)
Adds the given Conditional to the ConditionalStructure and updates the
structure.
|
void |
clear()
Clears the ConditionalStructure, after calling this method the
Structure is empty.
|
int |
compare(net.sf.tweety.logics.pl.semantics.NicePossibleWorld o1,
net.sf.tweety.logics.pl.semantics.NicePossibleWorld o2) |
Map<net.sf.tweety.logics.pl.semantics.NicePossibleWorld,ConditionalStructure.Generator> |
getConditionalGenerators(Conditional conditional)
Processes the Map form PossibleWorlds to the Generators of the given Conditional
|
Set<Conditional> |
getConditionals() |
List<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> |
getFalsifiyingWorlds(Conditional cond) |
Set<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> |
getPossibleWorlds() |
Collection<net.sf.tweety.logics.pl.syntax.Proposition> |
getSignature() |
List<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> |
getVerifyingWorlds(Conditional cond) |
Map<Conditional,ConditionalStructure.Generator> |
getWorldGenerators(net.sf.tweety.logics.pl.semantics.NicePossibleWorld world)
Processes the map from Conditionals to Generators for a given PossibleWorld
|
boolean |
removeConditional(Conditional cond)
Removes the given Conditional from the ConditionalStructure and updates
the structure.
|
void |
setWorldRepresentation(Comparator<net.sf.tweety.commons.util.Pair<net.sf.tweety.logics.pl.syntax.Proposition,Boolean>> comparator)
Changes the internal representations of the worlds, normally the propositions of a world
are ordered alphabetically but this behavior can be changed using this method.
|
void |
setWorldSorting(Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> comparator)
Changes the ordering of the PossibleWorlds for representation purposes, before
using this method proof if the goal can be easier achieved using the
setWorldRepresentation() method that allows changing the ordering of
the literals in the world representation.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ConditionalStructure()
public ConditionalStructure(Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> comparator)
comparator - An implementation for sorting the world data
if null is given the default sorting behavior is used.public ConditionalStructure(Collection<Conditional> conditionals)
conditionals - A collection of conditionals that shall form the
ConditionalStructurepublic ConditionalStructure(Collection<Conditional> conditionals, Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> comparator)
conditionals - A collection of conditionals that shall form the
ConditionalStructurecomparator - An implementation for sorting the world data
if null is given the default sorting behavior is used.public Set<Conditional> getConditionals()
public Set<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> getPossibleWorlds()
public List<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> getFalsifiyingWorlds(Conditional cond)
public List<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> getVerifyingWorlds(Conditional cond)
public Map<Conditional,ConditionalStructure.Generator> getWorldGenerators(net.sf.tweety.logics.pl.semantics.NicePossibleWorld world)
world - The PossibleWorld thats Generators shall be returnedpublic Map<net.sf.tweety.logics.pl.semantics.NicePossibleWorld,ConditionalStructure.Generator> getConditionalGenerators(Conditional conditional)
conditional - The Conditionalpublic Collection<net.sf.tweety.logics.pl.syntax.Proposition> getSignature()
public void setWorldSorting(Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld> comparator)
comparator - The implementation sorting the possible worldspublic void setWorldRepresentation(Comparator<net.sf.tweety.commons.util.Pair<net.sf.tweety.logics.pl.syntax.Proposition,Boolean>> comparator)
comparator - The new implementation of a Comparator that provides the new
sorting behavior for the Propositions in a PossibleWorld.public boolean addConditional(Conditional cond)
cond - The new Conditionalpublic boolean removeConditional(Conditional cond)
cond - The Conditional that shall be removedpublic void clear()
public int compare(net.sf.tweety.logics.pl.semantics.NicePossibleWorld o1,
net.sf.tweety.logics.pl.semantics.NicePossibleWorld o2)
compare in interface Comparator<net.sf.tweety.logics.pl.semantics.NicePossibleWorld>Copyright © 2018. All rights reserved.