Module src.olaaaf.formula.unaryFormula.unaryFormula
Abstract class, representing a unary operator.
Classes
class UnaryFormula (formulaInit: Formula, fmName: str = None)-
Abstract class, representing a unary operator.
Attributes
children:olaaaf.formula.formula.Formula- The child of the current node.
Expand source code
class UnaryFormula(Formula): ''' Abstract class, representing a unary operator. Attributes ---------- children: `olaaaf.formula.formula.Formula` The child of the current node. ''' def __init__(self, formulaInit: Formula, fmName: str = None): self.children = formulaInit if(fmName is not None): FormulaManager.declare(fmName, self) def getVariables(self) -> set[Variable]: ''' Method recurcivly returning a set containing all the variables used in the Formula. Returns ------- set of olaaaf.variable.variable.Variable All the variables used in the `olaaaf.formula.unaryFormula.unaryFormula.UnaryFormula`. ''' return self.children.getVariables() def __hash__(self): return hash(self.children)*-1Ancestors
- Formula
- abc.ABC
Subclasses
Methods
def getVariables(self) ‑> set[Variable]-
Method recurcivly returning a set containing all the variables used in the Formula.
Returns
setofolaaaf.variable.variable.Variable- All the variables used in the
olaaaf.formula.unaryFormula.unaryFormula.UnaryFormula.
Inherited members