com.penguinwerks.jodene
Class Pocket

java.lang.Object
  extended bycom.penguinwerks.jodene.Pocket

public class Pocket
extends java.lang.Object

Author:
phoehne

Constructor Summary
Pocket(java.lang.String name)
          Creates a new instance of Pocket
 
Method Summary
 void addError(java.lang.String error)
          Adds a new error to monitor in the pocket.
 void closeError(java.lang.String error)
          Closes named error, cleaning up the pocket.
 void finalize()
           
 Network getContents(java.lang.String error)
          Returns the contents of the pocket or null if there is no network in the pocket.
 java.util.List getErrors()
          Returns the names of the errors that are managed the this pocket.
 int getLastUpdateEpoch(java.lang.String error)
          Return the epoch the pocket was updated.
 double getLastUpdateError(java.lang.String error)
          Returns the last update error for the network in the pocket or the MAX_VALUE of double if there is no network in the pocket.
 void saveNetwork(java.lang.String error, Network network, Trainer trainer)
          Save the network to the pocket with the named error calculator.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pocket

public Pocket(java.lang.String name)
Creates a new instance of Pocket

Method Detail

addError

public void addError(java.lang.String error)
Adds a new error to monitor in the pocket.

Parameters:
error - Th ename of the error.

closeError

public void closeError(java.lang.String error)
Closes named error, cleaning up the pocket.

Parameters:
error - The name of the error.

getContents

public Network getContents(java.lang.String error)
Returns the contents of the pocket or null if there is no network in the pocket.

Parameters:
error - The name of the error.
Returns:
The network.

finalize

public void finalize()

getLastUpdateEpoch

public int getLastUpdateEpoch(java.lang.String error)
Return the epoch the pocket was updated. A -1 is returned if there is no network in the pocket.

Parameters:
error - The name of the error.
Returns:
The epoch number.

getLastUpdateError

public double getLastUpdateError(java.lang.String error)
Returns the last update error for the network in the pocket or the MAX_VALUE of double if there is no network in the pocket.

Parameters:
error - The name of the error.
Returns:
The error.

getErrors

public java.util.List getErrors()
Returns the names of the errors that are managed the this pocket.

Returns:
The list of error names.

saveNetwork

public void saveNetwork(java.lang.String error,
                        Network network,
                        Trainer trainer)
Save the network to the pocket with the named error calculator.

Parameters:
error - The name of the error.
network - The network to save.
trainer - The trainer training the network.