Tabnine Logo
Exponential
Code IndexAdd Tabnine to your IDE (free)

How to use
Exponential
in
cern.jet.random.tdouble

Best Java code snippets using cern.jet.random.tdouble.Exponential (Showing top 12 results out of 315)

origin: rwl/ParallelColt

/**
 * Returns a random number from the distribution with the given lambda.
 */
public static double staticNextDouble(double lambda) {
  synchronized (shared) {
    return shared.nextDouble(lambda);
  }
}
origin: net.sourceforge.parallelcolt/parallelcolt

/**
 * Constructs a Negative Exponential distribution.
 */
public Exponential(double lambda, DoubleRandomEngine randomGenerator) {
  setRandomGenerator(randomGenerator);
  setState(lambda);
}
origin: girtel/Net2Plan

final double connectionSize = cac_connectionSize_d.get (d);
final double avIATSeconds = connectionSize * avHoldingTimeSeconds / h_d;
final double nextHoldingTimeSeconds = cac_auxDurationDeterministic? avHoldingTimeSeconds : cac_auxDurationExponential? Exponential.staticNextDouble(1/avHoldingTimeSeconds) : -1;
final double nextInterArrivalTimeSeconds = cac_auxIATDeterministic? avIATSeconds : cac_auxIATExponential? Exponential.staticNextDouble(1/avIATSeconds) : -1;
scheduleEvent(new SimEvent(simTime + Exponential.staticNextDouble(1 / srg.getMeanTimeToRepairInHours()) , SimEvent.DestinationModule.EVENT_GENERATOR , -1 , new GenerateRepairSRG(srg)));			
scheduleEvent(new SimEvent(simTime + Exponential.staticNextDouble(1 / srg.getMeanTimeToFailInHours()) , SimEvent.DestinationModule.EVENT_GENERATOR , -1 , new GenerateFailureSRG(srg)));			
origin: net.sourceforge.parallelcolt/parallelcolt

  /**
   * Sets the uniform random number generated shared by all <b>static</b>
   * methods.
   * 
   * @param randomGenerator
   *            the new uniform random number generator to be shared.
   */
  private static void xstaticSetRandomGenerator(DoubleRandomEngine randomGenerator) {
    synchronized (shared) {
      shared.setRandomGenerator(randomGenerator);
    }
  }
}
origin: girtel/Net2Plan

final double connectionSize = cac_avConnectionSize_d.get (d);
final double avIATHours = connectionSize * avHoldingTimeHours / h_d;
final double nextHoldingTime = cac_auxDurationDeterministic? avHoldingTimeHours : cac_auxDurationExponential? Exponential.staticNextDouble(1/avHoldingTimeHours) : -1;
final double nextInterArrivalTime = cac_auxIATDeterministic? avIATHours : cac_auxIATExponential? Exponential.staticNextDouble(1/avIATHours) : -1;
final double lineRateThisLpGbps = randomPick (lineRatesGbps_t , probabilitiesLineRates_t);
scheduleEvent(new SimEvent(simTime + Exponential.staticNextDouble(1 / srg.getMeanTimeToRepairInHours()) , SimEvent.DestinationModule.EVENT_GENERATOR , -1 , new GenerateRepairSRG(srg)));			
scheduleEvent(new SimEvent(simTime + Exponential.staticNextDouble(1 / srg.getMeanTimeToFailInHours()) , SimEvent.DestinationModule.EVENT_GENERATOR , -1 , new GenerateFailureSRG(srg)));			
origin: rwl/ParallelColt

  /**
   * Sets the uniform random number generated shared by all <b>static</b>
   * methods.
   * 
   * @param randomGenerator
   *            the new uniform random number generator to be shared.
   */
  private static void xstaticSetRandomGenerator(DoubleRandomEngine randomGenerator) {
    synchronized (shared) {
      shared.setRandomGenerator(randomGenerator);
    }
  }
}
origin: rwl/ParallelColt

/**
 * Constructs a Negative Exponential distribution.
 */
public Exponential(double lambda, DoubleRandomEngine randomGenerator) {
  setRandomGenerator(randomGenerator);
  setState(lambda);
}
origin: net.sourceforge.parallelcolt/parallelcolt

/**
 * Returns a random number from the distribution with the given lambda.
 */
public static double staticNextDouble(double lambda) {
  synchronized (shared) {
    return shared.nextDouble(lambda);
  }
}
origin: girtel/Net2Plan

  final double holdingTimeSeconds = (originalDemand.getAttribute("holdingTime") != null)? Double.parseDouble(originalDemand.getAttribute("holdingTime")) : cac_avHoldingTimeHours.getDouble() * 3600;
  final double avIATSeconds = connectionSize * holdingTimeSeconds / currentTheoreticalOfferedTraffic_d.get(d);
  final double nextInterArrivalTimeSeconds = cac_auxIATDeterministic? avIATSeconds : cac_auxIATExponential? Exponential.staticNextDouble(1/avIATSeconds) : -1;
  cac_avHoldingTimeSeconds_d.set (d,holdingTimeSeconds);
  cac_connectionSize_d.set (d,connectionSize);
for (SharedRiskGroup srg : initialNetPlan.getSRGs())
  final double nextEvent = Exponential.staticNextDouble(1 / srg.getMeanTimeToFailInHours());
origin: net.sourceforge.parallelcolt/parallelcolt

/**
 * Returns a random number from the distribution.
 */
public double nextDouble() {
  return nextDouble(lambda);
}
origin: girtel/Net2Plan

  final double holdingTime = (originalDemand.getAttribute("holdingTime") != null)? Double.parseDouble(originalDemand.getAttribute("holdingTime")) : cac_avHoldingTimeHours.getDouble();
  final double avIATHours = averageConnectionSize * holdingTime / currentTheoreticalOfferedTraffic_d.get(d);
  final double nextInterArrivalTime = cac_auxIATDeterministic? avIATHours : cac_auxIATExponential? Exponential.staticNextDouble(1/avIATHours) : -1;
  cac_avHoldingTimeHours_d.set (d,holdingTime);
  cac_avConnectionSize_d.set (d,averageConnectionSize);
for (SharedRiskGroup srg : initialNetPlan.getSRGs())
  final double nextEvent = Exponential.staticNextDouble(1 / srg.getMeanTimeToFailInHours());
  scheduleEvent(new SimEvent(nextEvent , SimEvent.DestinationModule.EVENT_GENERATOR , -1 , new GenerateFailureSRG(srg)));
origin: rwl/ParallelColt

/**
 * Returns a random number from the distribution.
 */
public double nextDouble() {
  return nextDouble(lambda);
}
cern.jet.random.tdoubleExponential

Javadoc

Exponential Distribution (aka Negative Exponential Distribution); See the math definition animated definition.

p(x) = lambda*exp(-x*lambda) for x >= 0, lambda > 0.

Instance methods operate on a user supplied uniform random number generator; they are unsynchronized. Static methods operate on a default uniform random number generator; they are synchronized.

Most used methods

  • nextDouble
    Returns a random number from the distribution; bypasses the internal state.
  • setRandomGenerator
  • setState
    Sets the mean.
  • staticNextDouble
    Returns a random number from the distribution with the given lambda.

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JList (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now