com.azalient.api.b.trips
Class StrandTools

java.lang.Object
  extended by com.azalient.api.b.trips.StrandTools

public class StrandTools
extends Object


Constructor Summary
StrandTools()
           
 
Method Summary
static int dnaInt(double dna, int n)
          Given a dna value 0 ..
static int dnaInt(ITrip trip, Strand strand, int n)
          Given a trip, and the strand of DNA to use, return a value between 0 and n-1, taken from a uniform distribution
static double perturbCost(ITrip trip, int exitIndex, double baseCost, boolean perturbHere)
          Given a trip and a base cost, return the "perturbed" cost using a strand of DNA that varies with the exit index.
static double positiveNormalDistributionValue(ITrip trip, Strand strand, double mean, double pVar)
          Given a trip, and the strand of DNA to use, return a value from a gaussian distribution using the given mean and proportional std dev.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrandTools

public StrandTools()
Method Detail

dnaInt

public static int dnaInt(ITrip trip,
                         Strand strand,
                         int n)
Given a trip, and the strand of DNA to use, return a value between 0 and n-1, taken from a uniform distribution


dnaInt

public static int dnaInt(double dna,
                         int n)
Given a dna value 0 .. 1, return a value between 0 and n-1, taken from a uniform distribution


positiveNormalDistributionValue

public static double positiveNormalDistributionValue(ITrip trip,
                                                     Strand strand,
                                                     double mean,
                                                     double pVar)
Given a trip, and the strand of DNA to use, return a value from a gaussian distribution using the given mean and proportional std dev.


perturbCost

public static double perturbCost(ITrip trip,
                                 int exitIndex,
                                 double baseCost,
                                 boolean perturbHere)
Given a trip and a base cost, return the "perturbed" cost using a strand of DNA that varies with the exit index.