Class SimpAgentTreeTopo

java.lang.Object
  extended by SimpAgentTreeTopo
All Implemented Interfaces:
ISimpAgent<TreeConstraintState,TreeConstraintState>

public class SimpAgentTreeTopo
extends java.lang.Object
implements ISimpAgent<TreeConstraintState,TreeConstraintState>


Nested Class Summary
static class SimpAgentTreeTopo.TreeTopoInfo
          Some design needs to happen here.
 
Constructor Summary
SimpAgentTreeTopo()
           
 
Method Summary
static SimpAgentTreeTopo.TreeTopoInfo getInfo(TreeConstraintState state)
           
 TreeConstraintState getMsg(TreeConstraintState varsPrev, int idDst)
          Gets one individual IMsg to send to one specific agent.
 TreeConstraintState stateNext(TreeConstraintState varsPrev, java.util.Collection<TreeConstraintState> bagMsg)
          Given a collection of messages, calculates the next state of the logic variables for this agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpAgentTreeTopo

public SimpAgentTreeTopo()
Method Detail

getInfo

public static SimpAgentTreeTopo.TreeTopoInfo getInfo(TreeConstraintState state)

getMsg

public TreeConstraintState getMsg(TreeConstraintState varsPrev,
                                  int idDst)
Description copied from interface: ISimpAgent
Gets one individual IMsg to send to one specific agent. IAgent wrapper for this class would call this in a loop and push the results onto CommLink objects.

Specified by:
getMsg in interface ISimpAgent<TreeConstraintState,TreeConstraintState>
Parameters:
varsPrev - current state of this agent
idDst - UID of agent to send message to
Returns:
message to send to agent nIdDst

stateNext

public TreeConstraintState stateNext(TreeConstraintState varsPrev,
                                     java.util.Collection<TreeConstraintState> bagMsg)
Description copied from interface: ISimpAgent
Given a collection of messages, calculates the next state of the logic variables for this agent. IAgent wrapper would call this after running AccumMsgs to create the message bag.

Specified by:
stateNext in interface ISimpAgent<TreeConstraintState,TreeConstraintState>
bagMsg - collection of messages to process (usually these should include the id of the sending agent!!!)
Returns:
next state of the logic variables for this agent (no control function)