org.micropsi.nodenet
Class DecayCalculator

java.lang.Object
  extended byorg.micropsi.nodenet.DecayCalculator

public class DecayCalculator
extends java.lang.Object

Central service for decay calculations.


Constructor Summary
DecayCalculator()
           
 
Method Summary
static double calculateWeigth(int decayType, double oldweight, long steps, NetEntity entity)
          Calculate the new weight of a link.
static void setDecay(DecayIF newDecayCalculator)
          Sets the implementation if DecayIF to be used for the calculation of decays.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecayCalculator

public DecayCalculator()
Method Detail

calculateWeigth

public static double calculateWeigth(int decayType,
                                     double oldweight,
                                     long steps,
                                     NetEntity entity)
Calculate the new weight of a link.

Parameters:
decayType - the decay type to be applied
oldweight - the old weight of the link
steps - the steps that passed by since the last calculation
entity - the NetEntity where the link originates
Returns:
double the new weight of the link

setDecay

public static void setDecay(DecayIF newDecayCalculator)
Sets the implementation if DecayIF to be used for the calculation of decays.

Parameters:
newDecayCalculator - the decay implementation

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

.