Class ComputationalAssemblerBasic

java.lang.Object
  |
  +--swarm.BaseImpl
        |
        +--swarm.objectbase.SwarmObjectImpl
              |
              +--ComputationalAssemblerBasic
All Implemented Interfaces:
swarm.defobj.Create, swarm.defobj.CreateS, swarm.defobj.Customize, swarm.defobj.CustomizeS, swarm.defobj.DefinedObject, swarm.defobj.DefinedObjectS, swarm.defobj.Drop, swarm.defobj.DropS, swarm.defobj.GetName, swarm.defobj.GetNameS, swarm.objectbase.SwarmObject, swarm.objectbase.SwarmObjectS
Direct Known Subclasses:
ComputationalAssembler

public class ComputationalAssemblerBasic
extends swarm.objectbase.SwarmObjectImpl

The ComputationalAssemblerBasic class instances make computational processes; we have a computationa assembler instance for each unit THIS CLASS IS NOT USED DIRECTLY, BUT VIA ITS INSTANCES ComputationalAssembler.java

Author:
Pietro Terna

Field Summary
 boolean done
          the status of a specific computation
 int layer
          the current layer
 Unit myUnit
          the unit for which we are assembling for
 swarm.collections.ListImpl waitingList
          the list of the order requiring computations
 
Constructor Summary
ComputationalAssemblerBasic(swarm.defobj.Zone aZone)
          the constructor for ComputationalAssembler
 
Method Summary
 void c1995()
          computational operations with code -1995 (a code for the checking phase of the program

this computational code place a 1 in position 1,1 of the unique received matrix and set the status to done
 void c1996()
          computational operations with code -1996 (a code for the checking phase of the program

this computational code place a 1 in position 0,0 of the unique received matrix and set the status to done
 void c1997()
          computational operations with code -1997 (a code for the checking phase of the program

this computational code place a 1 in position 1,0 of the unique received matrix and set the status to done
 void c1998()
          computational operations with code -1998 (a code for the checking phase of the program

this computational code place a number in position 0,0 of the unique received matrix and set the status to done
 void c1999()
          computational operations with code -1999 (a code for the checking phase of the program

this computational code verifies position 0,0 of the three received matrixes; only if these positions are all not empty the code empties them and set the status to done
 void checkingComputationsAndFreeingOrders()
          making computations and eliminating the orders from our waitingList
 int getWaitingListLength()
          return the waiting list length
 boolean setComputationalWaitingList(Order anOrder)
          adding an order to the waitingList
 void setUnit(Unit u)
          setting the unit we are assembling for
 boolean thisOrderIsInTheWaitingList(Order o)
          checking if an order is in the waitingList
 
Methods inherited from class swarm.objectbase.SwarmObjectImpl
compare, describe, describeID, drop, getCompleteProbeMap, getDisplayName, getName, getProbeForMessage, getProbeForVariable, getProbeMap, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layer

public int layer
the current layer


myUnit

public Unit myUnit
the unit for which we are assembling for


waitingList

public swarm.collections.ListImpl waitingList
the list of the order requiring computations


done

public boolean done
the status of a specific computation

Constructor Detail

ComputationalAssemblerBasic

public ComputationalAssemblerBasic(swarm.defobj.Zone aZone)
the constructor for ComputationalAssembler

Method Detail

setUnit

public void setUnit(Unit u)
setting the unit we are assembling for


setComputationalWaitingList

public boolean setComputationalWaitingList(Order anOrder)
adding an order to the waitingList


checkingComputationsAndFreeingOrders

public void checkingComputationsAndFreeingOrders()
making computations and eliminating the orders from our waitingList


getWaitingListLength

public int getWaitingListLength()
return the waiting list length


thisOrderIsInTheWaitingList

public boolean thisOrderIsInTheWaitingList(Order o)
checking if an order is in the waitingList


c1995

public void c1995()
computational operations with code -1995 (a code for the checking phase of the program

this computational code place a 1 in position 1,1 of the unique received matrix and set the status to done


c1996

public void c1996()
computational operations with code -1996 (a code for the checking phase of the program

this computational code place a 1 in position 0,0 of the unique received matrix and set the status to done


c1997

public void c1997()
computational operations with code -1997 (a code for the checking phase of the program

this computational code place a 1 in position 1,0 of the unique received matrix and set the status to done


c1998

public void c1998()
computational operations with code -1998 (a code for the checking phase of the program

this computational code place a number in position 0,0 of the unique received matrix and set the status to done


c1999

public void c1999()
computational operations with code -1999 (a code for the checking phase of the program

this computational code verifies position 0,0 of the three received matrixes; only if these positions are all not empty the code empties them and set the status to done