|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmas.agentsHempelsSofa.data.zone.Zone
public class Zone
An implementation of a zone. It provides the following information:
Field Summary | |
---|---|
static double |
stability_front
determines the significance of critical frontier tokens in the stability value. |
static double |
stability_inner
determines the significance of inner tokens in the stability value. |
Constructor Summary | |
---|---|
Zone()
creates an empty zone |
Method Summary | |
---|---|
void |
addVertex(Vertex vertex)
|
boolean |
contains(AgentToken token)
Looks up an agent token in this zone. |
boolean |
contains(Vertex vertex)
Looks up a vertex in this zone. |
boolean |
equals(java.lang.Object obj)
|
java.util.LinkedList<Vertex> |
getCriticalFrontier()
gets the frontier vertices. |
int |
getCriticalFrontierLength()
gets the number of vertices building the critical frontier. |
java.util.LinkedList<AgentToken> |
getCriticalFrontierTokens()
|
java.util.LinkedList<Vertex> |
getIsolatedVertices()
|
java.util.LinkedList<Vertex> |
getMostPreciousVertices()
|
java.util.LinkedList<Vertex> |
getNonCriticalVertices()
|
int |
getNumberOfIsolatedVertices()
|
int |
getNumberOfTeamAgents()
|
int |
getNumberOfTokens()
|
int |
getPerceptedValue()
|
double |
getStabilityValue()
|
java.lang.String |
getTeam()
|
java.util.LinkedList<AgentToken> |
getTeamTokens()
|
java.util.LinkedList<AgentToken> |
getTokens()
|
int |
getValue()
|
java.util.LinkedList<Vertex> |
getVertices()
|
java.util.LinkedList<Vertex> |
getWeakestCriticalFrontierVertices()
|
boolean |
isAdjacentTo(Zone z)
A zone is adjacent to another zone if one vertex out of the one zone is adjacent to a vertex out of the other zone. |
boolean |
isCircular()
|
boolean |
isEmpty()
|
boolean |
isOfTeam(java.lang.String team)
|
boolean |
isOnCriticalFrontier(AgentToken token)
Checks whether an agent is on the critical frontier of this zone. |
boolean |
isOnCriticalFrontier(Vertex vertex)
Checks whether a vertex is on the critical frontier of this zone. |
protected void |
setIsolatedVertices(java.util.LinkedList<Vertex> isolatedVertices)
|
void |
setPerceptedValue(int perceptedValue)
|
protected void |
setTeam(java.lang.String team)
|
int |
size()
|
apltk.interpreter.data.LogicBelief |
toBelief()
|
java.lang.String |
toString()
|
void |
union(Zone z)
unions two zones. |
void |
update()
updates the fields values. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double stability_inner
public static double stability_front
Constructor Detail |
---|
public Zone()
Method Detail |
---|
public void update()
public boolean isAdjacentTo(Zone z)
z
- the zone to test.
true
- if the zones are adjacent to each other,false
- otherwise.public void union(Zone z)
z
- the zone to add to this zone.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean contains(Vertex vertex)
vertex
- the vertex of an agent which shall be looked up.
true
- if the vertex is in this zone,false
- otherwise.public boolean contains(AgentToken token)
token
- the agent token of an agent which shall be looked up.
true
- if the agent is in this zone,false
- otherwise.public boolean isOnCriticalFrontier(Vertex vertex)
vertex
- the vertex which shall be checked.
true
- if the agent is on the frontier,false
- otherwise.public boolean isOnCriticalFrontier(AgentToken token)
token
- the agent token which shall be checked.
true
- if the agent is on the frontier,false
- otherwise.public int getValue()
public java.util.LinkedList<Vertex> getVertices()
public int size()
public boolean isEmpty()
true
, if the zone has no vertices,false
otherwise.public java.util.LinkedList<AgentToken> getTokens()
public java.util.LinkedList<AgentToken> getTeamTokens()
public int getNumberOfTokens()
public int getNumberOfTeamAgents()
public java.util.LinkedList<AgentToken> getCriticalFrontierTokens()
public void addVertex(Vertex vertex)
vertex
- the vertex to add.public double getStabilityValue()
( |inner tokens|
*
stability_inner
+ |critical frontier tokens| *
stability_front
)
/ |vertices|
public int getCriticalFrontierLength()
public java.util.LinkedList<Vertex> getCriticalFrontier()
public java.util.LinkedList<Vertex> getWeakestCriticalFrontierVertices()
public java.util.LinkedList<Vertex> getMostPreciousVertices()
protected void setTeam(java.lang.String team)
team
- the team to setpublic java.lang.String getTeam()
public boolean isOfTeam(java.lang.String team)
team
- the team to check
true
if the zone is from team
false
otherwisepublic void setPerceptedValue(int perceptedValue)
perceptedValue
- the perceptedValue to setpublic int getPerceptedValue()
public apltk.interpreter.data.LogicBelief toBelief()
toBelief
in interface Believable
public java.util.LinkedList<Vertex> getNonCriticalVertices()
protected void setIsolatedVertices(java.util.LinkedList<Vertex> isolatedVertices)
isolatedVertices
- the isolated vertices to setpublic java.util.LinkedList<Vertex> getIsolatedVertices()
null
, if the zone is not circularpublic int getNumberOfIsolatedVertices()
public boolean isCircular()
true
, if the zone is circularfalse
, otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |