Class tjhNeuron
java.lang.Object
|
+--tjhNeuron
- public class tjhNeuron
- extends java.lang.Object
Implements an artificial neuron for a cell. The neuron controls how the cell will respond to the
environment around it. This neuron model does not include internal state.
|
Field Summary |
protected int[] |
matrix
The matrix controls how the inputs are transformed into the output. |
static int |
N_INPUTS
The neuron has a fixed number of inputs |
|
Constructor Summary |
tjhNeuron()
default constructor |
|
Method Summary |
void |
Copy(tjhNeuron other)
copies the specified neuron into this one |
int |
GetOutput(int[] input)
Returns an output given an input matrix |
static int |
RandomEntry()
returns -1, 0 or 1 with equal probability |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
N_INPUTS
public static final int N_INPUTS
- The neuron has a fixed number of inputs
matrix
protected int[] matrix
- The matrix controls how the inputs are transformed into the output.
The output is the dot product of the input vector and the matrix
tjhNeuron
public tjhNeuron()
- default constructor
GetOutput
public int GetOutput(int[] input)
- Returns an output given an input matrix
Copy
public void Copy(tjhNeuron other)
- copies the specified neuron into this one
RandomEntry
public static int RandomEntry()
- returns -1, 0 or 1 with equal probability