de.htwdd.rosenkoenig.neuro.net
Class NeuralNet

java.lang.Object
  extended by de.htwdd.rosenkoenig.neuro.net.NeuralNet
Direct Known Subclasses:
FeedForwardNet, KohonenNet

public abstract class NeuralNet
extends java.lang.Object

This is the abstract class that every neuronal net is supposed to derive from.


Constructor Summary
NeuralNet()
          Default ctor.
 
Method Summary
abstract  org.jdom.Element createXml()
          Create an XML chunk from the net.
abstract  void extractNet(org.jdom.Element xmlNet)
          Extract the net from the XML chunk given by xmlNet.
abstract  double[] getOutput()
          Every net must implement a function to return the output of the net.
static NeuralNet loadFromFile(java.lang.String filename)
          This function loads a net from a file.
abstract  void propagate(double[] pattern)
          Every net must implement a function to propagate a pattern through the net.
 void saveToFile(java.lang.String filename)
          This function saves a net to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeuralNet

public NeuralNet()
Default ctor.

Method Detail

loadFromFile

public static NeuralNet loadFromFile(java.lang.String filename)
This function loads a net from a file. It uses the abstract function extractNet that has to be implemented accordingly by all subclasses. This gives you the opportunity to save your own net in a format that you like most.

Parameters:
filename - file to load net from
Returns:
the neuronal network loaded from file

saveToFile

public final void saveToFile(java.lang.String filename)
This function saves a net to a file. It uses the abstract function createXml that has to be implemented accordingly by all subclasses. This gives you the opportunity to load your own net in a format that you like most.

Parameters:
filename - file to save net to

propagate

public abstract void propagate(double[] pattern)
Every net must implement a function to propagate a pattern through the net.

Parameters:
pattern - the pattern to be propagated through the net

getOutput

public abstract double[] getOutput()
Every net must implement a function to return the output of the net.

Returns:
the output of the net

createXml

public abstract org.jdom.Element createXml()
Create an XML chunk from the net.

Returns:
the XML chunk that represents this net

extractNet

public abstract void extractNet(org.jdom.Element xmlNet)
Extract the net from the XML chunk given by xmlNet.

Parameters:
xmlNet - the XML chunk that represents this net