learningFactorFunctional
Class LinearFunctionalFactor

java.lang.Object
  extended by learningFactorFunctional.LinearFunctionalFactor
All Implemented Interfaces:
LearningFactorFunctionalModel

public class LinearFunctionalFactor
extends java.lang.Object
implements LearningFactorFunctionalModel

Linear function describe by: y = (n0 / maxIter) * (maxIter - iter) where:
y - output value
n0 - maximal factor
maxIter - maximal number of iteration
iter - iteration number


Constructor Summary
LinearFunctionalFactor(double n0, double maxIteration)
          Creates a new instance of LinearFunctionalFactor
 
Method Summary
 double[] getParameters()
          Get function parameters.
 double getValue(int k)
          Return funciton value for specified iteration
 void setParameters(double[] parameters)
          Set funciton parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearFunctionalFactor

public LinearFunctionalFactor(double n0,
                              double maxIteration)
Creates a new instance of LinearFunctionalFactor

Parameters:
n0 - maximal factor
maxIteration - maximal number of iteration
Method Detail

getParameters

public double[] getParameters()
Get function parameters. First value at the array is n0 second maxIteration

Specified by:
getParameters in interface LearningFactorFunctionalModel
Returns:
Array of parameters

setParameters

public void setParameters(double[] parameters)
Set funciton parameters. First value at the array is n0 second maxIteration

Specified by:
setParameters in interface LearningFactorFunctionalModel
Parameters:
parameters - array of parameters

getValue

public double getValue(int k)
Return funciton value for specified iteration

Specified by:
getValue in interface LearningFactorFunctionalModel
Parameters:
k - iteration
Returns:
funciton value for specified iteration