Package MAKBPInterpreter.agents
Class EverybodyKnowledge
- java.lang.Object
-
- MAKBPInterpreter.agents.EverybodyKnowledge
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Agent>
agents
Agent set where each agent knows the associated formula.protected Formula
innerFormula
Common formula knows by all the agents.
-
Constructor Summary
Constructors Constructor Description EverybodyKnowledge(Formula formula, java.util.Set<Agent> agents)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Formula otherFormula)
Returnstrue
if this formula contains the specified formula.boolean
equals(java.lang.Object other)
Verifies if the current object formula andother
formula are the same.boolean
evaluate(LogicAssignment assignment)
Evaluates a state that we passed into arguments.java.util.Set<Agent>
getAgents()
Gets the agent set where each agent knows the associated formula.Formula
getInnerFormula()
Gets the inner formula object.Formula
getNegation()
Returns the negation of the current formula.int
hashCode()
Formula
simplify()
Simplifies the logic formula.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:Formula
Verifies if the current object formula andother
formula are the same.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
simplify
public Formula simplify()
Description copied from interface:Formula
Simplifies the logic formula.
-
getNegation
public Formula getNegation()
Description copied from interface:Formula
Returns the negation of the current formula.- Specified by:
getNegation
in interfaceFormula
- Returns:
- negation of formula
-
contains
public boolean contains(Formula otherFormula)
Description copied from interface:Formula
Returnstrue
if this formula contains the specified formula.
-
getInnerFormula
public Formula getInnerFormula()
Gets the inner formula object.- Returns:
- inner formula object
- See Also:
innerFormula
-
getAgents
public java.util.Set<Agent> getAgents()
Gets the agent set where each agent knows the associated formula.- Returns:
- agent set
-
evaluate
public boolean evaluate(LogicAssignment assignment) throws java.lang.Exception
Description copied from interface:Formula
Evaluates a state that we passed into arguments.
-
-