public class FullyMeshedNet extends AbstractRepresentation
Modifier and Type | Field and Description |
---|---|
static ActivationFunction |
DEFAULT_ACTIVATION_FUNCTION |
Constructor and Description |
---|
FullyMeshedNet(int inputnumber,
int outputnumber,
NESRandom random,
java.util.Hashtable<java.lang.String,XMLFieldEntry> properties) |
Modifier and Type | Method and Description |
---|---|
float |
activate(float x) |
double |
diffTo(AbstractRepresentation o)
Compares this representation to another one.
|
void |
exportToFile(java.io.File saveFile)
Exports the content of this representation to a file.
|
org.dom4j.Element |
exportToXmlElement(org.dom4j.Element element)
Method used for saving the properties of this component
|
float |
getBias(int i) |
java.util.Hashtable<java.lang.String,java.lang.String> |
getDetails()
Returns a table of key-value pairs that describes this representation.
|
int |
getNumberofMutationFunctions()
Returns the number of implemented mutation functions.
|
int |
getNumberofNodes() |
int |
getNumberOfRecombinationFunctions()
Returns the number of implemented crossover functions.
|
java.util.ArrayList<java.lang.Float> |
getOutput(java.util.ArrayList<java.lang.Float> input)
Processes the given list of inputs and returns the corresponding output values.
|
java.util.ArrayList<java.lang.Float> |
getStep(java.util.ArrayList<java.lang.Float> input)
Provides the networks output for the given input
|
java.lang.String |
getUniqueName()
Returns a unique name of this representation calculated by its parameters/structure.
|
float |
getWeight(int nr,
int from) |
static float |
linearActivate(float x) |
AbstractRepresentation |
loadFromXML(org.dom4j.Node nd)
Reconstructs this representation from the given XML node.
|
void |
recombinationFunction(AbstractRepresentation other,
int method)
Specific implementation of the recombination function that initiates a crossover on this representation
and with the given representation with the provided function.
Use AbstractRepresentation.getNumberOfRecombinationFunctions() to obtain the number of implemented recombination functions. |
void |
reset()
Resets the representation to its base state.
|
static float |
sigmoidActivate(float x) |
clone, compareTo, getFitness, isEvaluated, mutate, setFitness, toString, xOverWith
getProperties, getPropertyValue, getTypeOfProperty, getXMLData, setProperties, setXMLData
public static final ActivationFunction DEFAULT_ACTIVATION_FUNCTION
public FullyMeshedNet(int inputnumber, int outputnumber, NESRandom random, java.util.Hashtable<java.lang.String,XMLFieldEntry> properties)
public int getNumberofMutationFunctions()
AbstractRepresentation
getNumberofMutationFunctions
in class AbstractRepresentation
public int getNumberOfRecombinationFunctions()
AbstractRepresentation
getNumberOfRecombinationFunctions
in class AbstractRepresentation
public java.lang.String getUniqueName()
AbstractRepresentation
getUniqueName
in class AbstractRepresentation
public void recombinationFunction(AbstractRepresentation other, int method)
AbstractRepresentation
AbstractRepresentation.getNumberOfRecombinationFunctions()
to obtain the number of implemented recombination functions.public float activate(float x)
public static float sigmoidActivate(float x)
public static float linearActivate(float x)
public void reset()
AbstractRepresentation
reset
in class AbstractRepresentation
public java.util.ArrayList<java.lang.Float> getOutput(java.util.ArrayList<java.lang.Float> input)
AbstractRepresentation
getOutput
in class AbstractRepresentation
input
- The list of input values to be processed.public java.util.ArrayList<java.lang.Float> getStep(java.util.ArrayList<java.lang.Float> input)
public double diffTo(AbstractRepresentation o)
AbstractRepresentation
diffTo
in class AbstractRepresentation
o
- The other representation to compare to.public float getWeight(int nr, int from)
public org.dom4j.Element exportToXmlElement(org.dom4j.Element element)
exportToXmlElement
in class AbstractRepresentation
element
- The root element to be used for saving.public AbstractRepresentation loadFromXML(org.dom4j.Node nd)
AbstractRepresentation
loadFromXML
in class AbstractRepresentation
nd
- The root XML node to load the data from.public java.util.Hashtable<java.lang.String,java.lang.String> getDetails()
AbstractRepresentation
getDetails
in class AbstractRepresentation
public float getBias(int i)
public int getNumberofNodes()
public void exportToFile(java.io.File saveFile)
AbstractRepresentation
exportToFile
in class AbstractRepresentation
saveFile
- The file to be saved to