|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--physis.core.Metabolism
It tracks the organism's interaction with the environment.
CRC
1. tracking the inputs and outputs
Hint: it's actually an I/O buffer. The implementation should handle two queues. Their sizes are defined by the biggest tasks and can be acquired from the Configuration class.
| Field Summary | |
private int[] |
inputbuffer
|
private int |
iptr
The bufferpointers point to the last element. |
private int |
optr
|
private int[] |
outputbuffer
|
| Constructor Summary | |
Metabolism(int buffer_size)
|
|
| Method Summary | |
void |
clear()
Clears the buffers. |
int |
getBufferSize()
Returns the size of the buffers. |
int[] |
getInputs()
Gets the inputvalues in chronological order. |
int |
getInputSize()
Returns the number of inputs. |
int[] |
getOutputs()
Gets the outputvalues in chronological order. |
int |
getOutputSize()
Returns the number of outputs. |
boolean |
isInputFull()
|
boolean |
isOutputFull()
|
void |
putInputValue(int val)
Put a value into the input queue. |
void |
putOutputValue(int val)
Put a value into the output queue. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private int[] inputbuffer
private int[] outputbuffer
private int iptr
private int optr
| Constructor Detail |
public Metabolism(int buffer_size)
| Method Detail |
public int[] getInputs()
public int[] getOutputs()
public void putInputValue(int val)
public void putOutputValue(int val)
public int getInputSize()
public int getOutputSize()
public int getBufferSize()
public void clear()
public boolean isInputFull()
public boolean isOutputFull()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||