org.micropsi.nodenet.outputfunctions
Class OFAbs

java.lang.Object
  extended byorg.micropsi.nodenet.outputfunctions.OFAbs
All Implemented Interfaces:
OutputFunctionIF

public class OFAbs
extends java.lang.Object
implements OutputFunctionIF

abs activation function.


Constructor Summary
OFAbs()
           
 
Method Summary
 double calculate(double value, OutputFunctionParameter[] params)
          When a gate uses this output function and its value is to be calculated, this method will be called.
 OutputFunctionParameter[] constructEmptyParameters()
          Defines the set of parameters for this output function.
 java.lang.String getDisplayName()
          Returns the display name of this output function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OFAbs

public OFAbs()
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: OutputFunctionIF
Returns the display name of this output function. The string returned will be used in the editor and has no technical meaning.

Specified by:
getDisplayName in interface OutputFunctionIF
Returns:
a String to be used in the editor for identifying this output function ,must not be null

constructEmptyParameters

public OutputFunctionParameter[] constructEmptyParameters()
Description copied from interface: OutputFunctionIF
Defines the set of parameters for this output function. The default semilinear output function, for instance, will return one parameter, {theta}. You can define any number of parameters here. These parameters will be passed to the calculate method in the order you define here, so you can quickly access the parameters by index in calculate(...)

Specified by:
constructEmptyParameters in interface OutputFunctionIF
Returns:
the array of parameters this function uses, must not be null

calculate

public double calculate(double value,
                        OutputFunctionParameter[] params)
Description copied from interface: OutputFunctionIF
When a gate uses this output function and its value is to be calculated, this method will be called. The given parameters are the objects returned on initialisation by getParameters(), but with the current values. The order defined in constructEmptyParameters() will be preserved, so implementations of this method can access the parameter objects by index.

Specified by:
calculate in interface OutputFunctionIF
Parameters:
value - the gate value
params - the parameter array, never null
Returns:
the output function result

(c) by Micropsi Project: http://www.cognitive-agents.org

.