|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anji.nn.Neuron
public class Neuron
Neuron component of an artificial neural network. Performs an activation function on a sum of inputs.
| Field Summary | |
|---|---|
protected double |
value
protected for TestNeuron only |
static java.lang.String |
XML_TAG
base XML tag |
| Constructor Summary | |
|---|---|
Neuron(ActivationFunction aFunc)
Create neuron with aFunc activation function. |
|
| Method Summary | |
|---|---|
void |
addIncomingConnection(Connection c)
Add incoming connection c. |
static void |
appendToXml(java.util.Collection allNeurons,
java.util.List outputNeurons,
java.lang.StringBuffer result)
XML representation is consistent with NEVT . |
long |
cost()
|
ActivationFunction |
getFunc()
|
long |
getId()
for logging, tracking, debugging; this ID usually will be the innovation ID of the corresponding gene |
protected java.util.Collection |
getIncomingConns()
used by NeuronConnection.appendToXml() only |
double |
getValue()
only calculate value if dirty == false; otherwise, returned cached value |
java.lang.String |
getXmld()
|
java.lang.String |
getXmlRootTag()
|
boolean |
isDirty()
|
boolean |
isRecurrent()
|
void |
reset()
clear current value |
void |
setId(long l)
|
void |
step()
indicates a time step has passed |
java.lang.String |
toString()
|
java.lang.String |
toXml()
XML representation is consistent with NEVT . |
static java.lang.String |
toXml(com.anji.nn.Neuron.NeuronMetaData layout)
XML representation is consistent with NEVT . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String XML_TAG
protected double value
TestNeuron only
| Constructor Detail |
|---|
public Neuron(ActivationFunction aFunc)
throws java.lang.IllegalArgumentException
aFunc activation function.
aFunc -
java.lang.IllegalArgumentException| Method Detail |
|---|
public void addIncomingConnection(Connection c)
c.
c - public void step()
public double getValue()
public void reset()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXml()
toXml in interface XmlPersistablepublic static java.lang.String toXml(com.anji.nn.Neuron.NeuronMetaData layout)
layout -
layout
public static void appendToXml(java.util.Collection allNeurons,
java.util.List outputNeurons,
java.lang.StringBuffer result)
allNeurons - outputNeurons - result - destination to which XML is appendedprotected java.util.Collection getIncomingConns()
public boolean isRecurrent()
public void setId(long l)
l - new IDpublic long getId()
public boolean isDirty()
public ActivationFunction getFunc()
public long cost()
public java.lang.String getXmlRootTag()
getXmlRootTag in interface XmlPersistableXmlPersistable.getXmlRootTag()public java.lang.String getXmld()
getXmld in interface XmlPersistableXmlPersistable.getXmld()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||