com.anji.nn
Class StepHourglassConnection

java.lang.Object
  extended by com.anji.nn.StepHourglassConnection
All Implemented Interfaces:
Connection

public class StepHourglassConnection
extends java.lang.Object
implements Connection

StepHourglassConnection Connection returning a value between 0 and 1, where 1 indicates the fully allotted amount of time remaining and 0 indicates no time remainnig.


Field Summary
 
Fields inherited from interface com.anji.nn.Connection
XML_TAG
 
Constructor Summary
StepHourglassConnection()
          ctor
 
Method Summary
 long cost()
           
 double read()
          returns ratio of time remaining to total time
 void reset()
          reset hourglass to have max time remaining
 void reset(int aMaxSteps)
          reset hourglass to have max time remaining
 void step()
          proceed one step closer to completion
 java.lang.String toString()
           
 java.lang.String toXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StepHourglassConnection

public StepHourglassConnection()
ctor

Method Detail

reset

public void reset(int aMaxSteps)
reset hourglass to have max time remaining

Parameters:
aMaxSteps - maximum steps before hourglass is empty

reset

public void reset()
reset hourglass to have max time remaining


read

public double read()
returns ratio of time remaining to total time

Specified by:
read in interface Connection
Returns:
double value carried on this connection from incoming neuron
See Also:
Connection.read()

step

public void step()
proceed one step closer to completion


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

toXml

public java.lang.String toXml()
Specified by:
toXml in interface Connection
Returns:
String representation of object
See Also:
Connection.toXml()

cost

public long cost()
Specified by:
cost in interface Connection
Returns:
number corresponding to cost of activation in resources
See Also:
Connection.cost()