Class PlSignature
java.lang.Object
org.tweetyproject.commons.SingleSetSignature<Proposition>
org.tweetyproject.logics.pl.syntax.PlSignature
- All Implemented Interfaces:
Cloneable
,Iterable<Proposition>
,Signature
This class captures the signature of a specific propositional language.
- Author:
- Matthias Thimm, Sebastian Homann
-
Constructor Summary
ConstructorDescriptionCreates a new (empty) propositional signature.PlSignature
(int numvars) Creates a new propositional signature with the given number of propositions (named "A0"..."Anumvars".PlSignature
(Collection<? extends Proposition> propositions) Creates a new propositional signature with the given set of propositions.PlSignature
(PlSignature sig) Creates a new propositional signature that is a copy of the given signature. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given formula to this signature.clone()
clones signaturestatic PlSignature
getSignature
(Collection<? extends PlFormula> formulas) Returns the set of atoms appearing in the given collection of formulas.Methods inherited from class org.tweetyproject.commons.SingleSetSignature
add, addAll, addSignature, clear, contains, containsAll, equals, hashCode, isEmpty, isOverlappingSignature, isSubSignature, iterator, remove, removeAll, retainAll, size, toArray, toCollection, toString
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PlSignature
public PlSignature()Creates a new (empty) propositional signature. -
PlSignature
Creates a new propositional signature with the given set of propositions.- Parameters:
propositions
- a set of propositions.
-
PlSignature
public PlSignature(int numvars) Creates a new propositional signature with the given number of propositions (named "A0"..."Anumvars".- Parameters:
numvars
- the number of variables.
-
PlSignature
Creates a new propositional signature that is a copy of the given signature.- Parameters:
sig
- a signature
-
-
Method Details
-
getSignature
Returns the set of atoms appearing in the given collection of formulas.- Parameters:
formulas
- a set of propositional formulas- Returns:
- the signature of the formulas.
-
add
-
clone
Description copied from interface:Signature
clones signature- Specified by:
clone
in interfaceSignature
- Specified by:
clone
in classSingleSetSignature<Proposition>
- Returns:
- clone
-