public abstract class AssociativeFOLFormula extends FolFormula implements net.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<RelationalFormula>, net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridge
| Modifier and Type | Field and Description |
|---|---|
protected net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport<RelationalFormula> |
support
This helper class implements most of the common functionality of an associative
formula, so the implementation can delegate the method calls to the support
class.
|
| Constructor and Description |
|---|
AssociativeFOLFormula()
Creates a new (empty) associative formula.
|
AssociativeFOLFormula(Collection<? extends RelationalFormula> formulas)
Creates a new associative formula with the given inner formulas.
|
AssociativeFOLFormula(RelationalFormula first,
RelationalFormula second)
Creates a new associative formula with the two given formulae
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
RelationalFormula element) |
boolean |
add(RelationalFormula e) |
boolean |
addAll(Collection<? extends RelationalFormula> c) |
boolean |
addAll(int index,
Collection<? extends RelationalFormula> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsQuantifier() |
net.sf.tweety.commons.Signature |
createEmptySignature() |
boolean |
equals(Object obj) |
RelationalFormula |
get(int index) |
Set<FOLAtom> |
getAtoms() |
List<RelationalFormula> |
getFormulas() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula> |
getFormulas(Class<C> cls) |
Set<net.sf.tweety.logics.commons.syntax.Functor> |
getFunctors() |
Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> |
getPredicates() |
Set<net.sf.tweety.logics.commons.syntax.Variable> |
getQuantifierVariables() |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms(Class<C> cls) |
Set<net.sf.tweety.logics.commons.syntax.Variable> |
getUnboundVariables() |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isClosed() |
boolean |
isClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables) |
boolean |
isEmpty() |
boolean |
isLiteral() |
boolean |
isWellBound() |
boolean |
isWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables) |
Iterator<RelationalFormula> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<RelationalFormula> |
listIterator() |
ListIterator<RelationalFormula> |
listIterator(int index) |
RelationalFormula |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
RelationalFormula |
set(int index,
RelationalFormula element) |
int |
size() |
List<RelationalFormula> |
subList(int fromIndex,
int toIndex) |
AssociativeFOLFormula |
substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> termMap)
Substitutes all occurrences of all terms "v" in map.keyset() in this formula
by map.get(v) and returns the new formula.
NOTE: variables bound to quantifiers are not substituted in their inner formulas even if they appear in the map. |
AssociativeFOLFormula |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, collapseAssociativeFormulas, combineWithAnd, combineWithOr, complement, getUniformProbability, isDnf, toDnf, toNnfallGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, getSignature, isGround, isWellFormedfinalize, getClass, notify, notifyAll, wait, wait, waitclone, getPredicateClsreplaceAll, sort, spliteratorparallelStream, removeIf, streamprotected net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport<RelationalFormula> support
public AssociativeFOLFormula()
public AssociativeFOLFormula(RelationalFormula first, RelationalFormula second)
first - a relational formula.second - a relational formula.public AssociativeFOLFormula(Collection<? extends RelationalFormula> formulas)
formulas - a collection of formulas.public net.sf.tweety.commons.Signature createEmptySignature()
createEmptySignature in interface net.sf.tweety.logics.commons.syntax.AssociativeFormulaSupport.AssociativeSupportBridgepublic Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
getFunctors in class RelationalFormulapublic boolean containsQuantifier()
containsQuantifier in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()
getUnboundVariables in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic boolean isClosed()
isClosed in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic boolean isClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
isClosed in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic boolean isWellBound()
isWellBound in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic boolean isWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
isWellBound in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic boolean isLiteral()
isLiteral in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()
getQuantifierVariables in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulagetQuantifierVariables in class FolFormulapublic List<RelationalFormula> getFormulas()
getFormulas in interface net.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<RelationalFormula>public <C extends net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula> Set<C> getFormulas(Class<C> cls)
getFormulas in interface net.sf.tweety.logics.commons.syntax.interfaces.AssociativeFormula<RelationalFormula>public Set<FOLAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in class RelationalFormulapublic Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
getTerms in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructurepublic <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
getTerms in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructurepublic Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic AssociativeFOLFormula substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
RelationalFormulasubstitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in class FolFormulav - the term to be substituted.t - the term to substitute.public AssociativeFOLFormula substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> termMap)
RelationalFormulasubstitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in class RelationalFormulatermMap - a mapping defining which terms to be substituted.public String toString()
toString in class RelationalFormulapublic int hashCode()
hashCode in interface Collection<RelationalFormula>hashCode in interface List<RelationalFormula>hashCode in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulahashCode in class Objectpublic boolean equals(Object obj)
equals in interface Collection<RelationalFormula>equals in interface List<RelationalFormula>equals in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaequals in class Objectpublic boolean add(RelationalFormula e)
add in interface Collection<RelationalFormula>add in interface List<RelationalFormula>public boolean addAll(Collection<? extends RelationalFormula> c)
addAll in interface Collection<RelationalFormula>addAll in interface List<RelationalFormula>public void clear()
clear in interface Collection<RelationalFormula>clear in interface List<RelationalFormula>public boolean contains(Object o)
contains in interface Collection<RelationalFormula>contains in interface List<RelationalFormula>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<RelationalFormula>containsAll in interface List<RelationalFormula>public boolean isEmpty()
isEmpty in interface Collection<RelationalFormula>isEmpty in interface List<RelationalFormula>public Iterator<RelationalFormula> iterator()
iterator in interface Iterable<RelationalFormula>iterator in interface Collection<RelationalFormula>iterator in interface List<RelationalFormula>public boolean remove(Object o)
remove in interface Collection<RelationalFormula>remove in interface List<RelationalFormula>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<RelationalFormula>removeAll in interface List<RelationalFormula>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<RelationalFormula>retainAll in interface List<RelationalFormula>public int size()
size in interface Collection<RelationalFormula>size in interface List<RelationalFormula>public Object[] toArray()
toArray in interface Collection<RelationalFormula>toArray in interface List<RelationalFormula>public <T> T[] toArray(T[] a)
toArray in interface Collection<RelationalFormula>toArray in interface List<RelationalFormula>public void add(int index,
RelationalFormula element)
add in interface List<RelationalFormula>public boolean addAll(int index,
Collection<? extends RelationalFormula> c)
addAll in interface List<RelationalFormula>public RelationalFormula get(int index)
get in interface List<RelationalFormula>public int indexOf(Object o)
indexOf in interface List<RelationalFormula>public int lastIndexOf(Object o)
lastIndexOf in interface List<RelationalFormula>public ListIterator<RelationalFormula> listIterator()
listIterator in interface List<RelationalFormula>public ListIterator<RelationalFormula> listIterator(int index)
listIterator in interface List<RelationalFormula>public RelationalFormula remove(int index)
remove in interface List<RelationalFormula>public RelationalFormula set(int index, RelationalFormula element)
set in interface List<RelationalFormula>public List<RelationalFormula> subList(int fromIndex, int toIndex)
subList in interface List<RelationalFormula>Copyright © 2016. All rights reserved.