Revision 104,
766 bytes
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[104] | 1 | package eduni.simjava.distributions; |
---|
| 2 | |
---|
| 3 | import cern.jet.random.AbstractDistribution; |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * |
---|
| 7 | * @author Marcin Krystek |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | public abstract class AbstractSpecificGenerator implements Comparable<AbstractSpecificGenerator>{ |
---|
| 12 | protected AbstractDistribution generator; |
---|
| 13 | |
---|
| 14 | protected double lastGeneraterdValue; |
---|
| 15 | |
---|
| 16 | public AbstractSpecificGenerator(AbstractDistribution generator){ |
---|
| 17 | this.generator = generator; |
---|
| 18 | this.lastGeneraterdValue = generator.nextDouble(); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | public double getLastGeneratedValue(){ |
---|
| 22 | return lastGeneraterdValue; |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | public void setLastGeneratedValue(double value){ |
---|
| 26 | lastGeneraterdValue = value; |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | public AbstractDistribution getGenerator(){ |
---|
| 30 | return generator; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | public int compareTo(AbstractSpecificGenerator o){ |
---|
| 34 | return -1; |
---|
| 35 | } |
---|
| 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.