main
Class Cell

java.lang.Object
  extended bymain.Cell

public class Cell
extends java.lang.Object

This class represents a single cell in the model. Each cell stores its own set of nodes (rna and protein types), and can have separate nodes for each side of the cell. Cells are involved in setting up the model, but once the model is set up they are not very involved in integrating - they just call their nodes to do the integration. One future addition we need to make is to get cells so that they can dynamically switch neighbors.


Nested Class Summary
 class Cell.Hexagon
          An internal class used for generating hexagonal cell shape
 class Cell.Square
          An internal class used for generating square cell shape
 
Field Summary
static int arrayHeight
           
static int arrayWidth
           
 Cell[] neighbors
          The cell's neighbors - set up by the init object
 Node[] nodes
           
 
Constructor Summary
Cell(float x, float y)
          Main constructor
 
Method Summary
 void addAffectors(Network net)
           
 void addExperimentToNode(java.lang.String nodename, Affector aff)
           
 void addNeighbor(Cell neighbor)
           
 void addNodes(Network net)
           
 void clearExperiment()
           
 java.awt.Polygon getCellShape()
          Returns the cells shape.
 float getInitialValue(int nodeNum)
           
 float getInitialValue(java.lang.String nodename)
           
 int getItsNum()
           
 Node getNeighborNode(int side, java.lang.String name)
           
 Node getNode(java.lang.String name)
           
 int getNodeNum(java.lang.String name)
           
 float getValue(int node_num)
           
 float[] getValues()
          Returns all the node values for a cell in the form of an array of floats
 void init()
           
 void init(boolean from_last_state)
          initialize network from a stored previous state (if from_last_state == true) else from stored ICs
 float nodePeek(java.lang.String name)
           
 void save(java.io.PrintWriter out)
           
 void saveHeadings(java.io.PrintWriter out)
           
 void setInitialValue(int nodeNum, float val)
           
 void setInitialValue(java.lang.String nodename, float val)
           
protected  void setItsNum(int n)
           
 void setLocation(java.awt.geom.Point2D.Float location)
          Sets the location of the cell
 void setValue(int node_num, float val)
           
 void setValue(java.lang.String nodename, float val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrayWidth

public static int arrayWidth

arrayHeight

public static int arrayHeight

neighbors

public Cell[] neighbors
The cell's neighbors - set up by the init object


nodes

public Node[] nodes
Constructor Detail

Cell

public Cell(float x,
            float y)
Main constructor

Method Detail

setItsNum

protected void setItsNum(int n)

getItsNum

public int getItsNum()

save

public void save(java.io.PrintWriter out)

saveHeadings

public void saveHeadings(java.io.PrintWriter out)

addNodes

public void addNodes(Network net)

addAffectors

public void addAffectors(Network net)
                  throws java.lang.Exception
Throws:
java.lang.Exception

addNeighbor

public void addNeighbor(Cell neighbor)

getCellShape

public java.awt.Polygon getCellShape()
Returns the cells shape.

Returns:
Polygon - The shape of the cell.

getNeighborNode

public Node getNeighborNode(int side,
                            java.lang.String name)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getNode

public Node getNode(java.lang.String name)
             throws java.lang.Exception
Throws:
java.lang.Exception

getNodeNum

public int getNodeNum(java.lang.String name)
               throws java.lang.Exception
Throws:
java.lang.Exception

setInitialValue

public void setInitialValue(java.lang.String nodename,
                            float val)
                     throws java.lang.Exception
Throws:
java.lang.Exception

setInitialValue

public void setInitialValue(int nodeNum,
                            float val)

getInitialValue

public float getInitialValue(java.lang.String nodename)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getInitialValue

public float getInitialValue(int nodeNum)

addExperimentToNode

public void addExperimentToNode(java.lang.String nodename,
                                Affector aff)

clearExperiment

public void clearExperiment()

nodePeek

public float nodePeek(java.lang.String name)

init

public void init()

init

public void init(boolean from_last_state)
initialize network from a stored previous state (if from_last_state == true) else from stored ICs


getValue

public float getValue(int node_num)

getValues

public float[] getValues()
Returns all the node values for a cell in the form of an array of floats

Returns:
float[]

setValue

public void setValue(int node_num,
                     float val)

setValue

public void setValue(java.lang.String nodename,
                     float val)
              throws java.lang.Exception
Throws:
java.lang.Exception

setLocation

public void setLocation(java.awt.geom.Point2D.Float location)
Sets the location of the cell