public class PowerLawDistribution extends Object implements Distribution
Constructor and Description |
---|
PowerLawDistribution(double gamma)
Constructs a new scale-free distribution for the provided gamma value.
|
Modifier and Type | Method and Description |
---|---|
static int |
getValue(Random random,
double multiplier,
double beta) |
Distribution |
initialize(int invocations,
int expectedTotal)
Initializes the distribution such that expectedTotal is equal to the expected sum of generated values
after the given number of invocatiosn.
|
int |
nextConditionalValue(Random random,
int otherValue)
Returns the next value conditional on another given value.
|
int |
nextValue(Random random)
Returns the next value.
|
String |
toString() |
public PowerLawDistribution(double gamma)
public Distribution initialize(int invocations, int expectedTotal)
Distribution
initialize
in interface Distribution
public int nextValue(Random random)
Distribution
nextValue
in interface Distribution
random
- random generator to use for randomnesspublic int nextConditionalValue(Random random, int otherValue)
Distribution
nextConditionalValue
in interface Distribution
random
- random generator to use for randomnessotherValue
- The prior valuepublic static int getValue(Random random, double multiplier, double beta)
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.