fern.tools.functions
Class Probability.ReactionProbability

java.lang.Object
  extended by fern.tools.functions.Probability.ReactionProbability
All Implemented Interfaces:
Probability
Enclosing interface:
Probability

public static class Probability.ReactionProbability
extends Object
implements Probability

Implementation for the reaction probability for the autocatalytic network creation. The probability is calculated by the formula

factor / max(l1,l2)

if l1+l2 > oneToLength, else 1.

Author:
Florian Erhard

Nested Class Summary
 
Nested classes/interfaces inherited from interface fern.tools.functions.Probability
Probability.Constant, Probability.ReactionProbability
 
Constructor Summary
Probability.ReactionProbability(double factor, int oneToLength)
           
 
Method Summary
 double getProb(int l1, int l2)
          Gets the probability depending on two integers.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Probability.ReactionProbability

public Probability.ReactionProbability(double factor,
                                       int oneToLength)
Method Detail

getProb

public double getProb(int l1,
                      int l2)
Description copied from interface: Probability
Gets the probability depending on two integers.

Specified by:
getProb in interface Probability
Parameters:
l1 - interger 1
l2 - integer 2
Returns:
probability