de.htwdd.rosenkoenig.neuro.net
Class Identity

java.lang.Object
  extended by de.htwdd.rosenkoenig.neuro.net.Identity
All Implemented Interfaces:
ActivationFunction

public class Identity
extends java.lang.Object
implements ActivationFunction

This is a dummy function that returns the same value for compute that was given to the function and 1.0 for computeDerivation. This is a singleton.


Field Summary
private static Identity instance
           
 
Constructor Summary
private Identity()
          Ctor, only call base class ctor.
 
Method Summary
 double compute(double value)
          Return the identical value.
 double computeDerivation(double value)
          This function always returns 1.0.
static Identity getInstance()
          Getter of the property instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static Identity instance
Constructor Detail

Identity

private Identity()
Ctor, only call base class ctor. Is private, as class is a singleton.

Method Detail

compute

public double compute(double value)
Return the identical value.

Specified by:
compute in interface ActivationFunction
Parameters:
value - the value to be returned.
Returns:
returns value

computeDerivation

public double computeDerivation(double value)
This function always returns 1.0.

Specified by:
computeDerivation in interface ActivationFunction
Parameters:
value - some arbitrary rubbish.
Returns:
always returns 1.0

getInstance

public static Identity getInstance()
Getter of the property instance

Returns:
Returns the instance.