/** * Creates a copy of this StatefulRNG; it will generate the same random numbers, given the same calls in order, as * this StatefulRNG at the point copy() is called. The copy will not share references with this StatefulRNG. * * @return a copy of this StatefulRNG */ @Override public EditRNG copy() { EditRNG next = new EditRNG(random.copy(), expected, centrality); next.rawLatest = rawLatest; return next; }
@Override public Random asRandom() { if(ran == null) { ran = new CustomRandom(random.copy()); } return ran; }
/** * Creates a copy of this StatefulRNG; it will generate the same random numbers, given the same calls in order, as * this StatefulRNG at the point copy() is called. The copy will not share references with this StatefulRNG. * * @return a copy of this StatefulRNG */ @Override public StatefulRNG copy() { return new StatefulRNG(random.copy()); }
/** * Creates a copy of this RNG; it will generate the same random numbers, given the same calls in order, as this RNG * at the point copy() is called. The copy will not share references with this RNG. * * @return a copy of this RNG */ @Override public RNG copy() { return new RNG(random.copy()); }
/** * Creates a copy of this DharmaRNG; it will generate the same random numbers, given the same calls in order, as * this DharmaRNG at the point copy() is called. The copy will not share references with this DharmaRNG. * * @return a copy of this DharmaRNG */ @Override public DharmaRNG copy() { DharmaRNG next = new DharmaRNG(random.copy(), fairness); next.produced = produced; next.baseline = baseline; return next; }
/** * Creates a copy of this DeckRNG; it will generate the same random numbers, given the same calls in order, as * this DeckRNG at the point copy() is called. The copy will not share references with this DeckRNG. * * @return a copy of this DeckRNG */ @Override public DeckRNG copy() { DeckRNG next = new DeckRNG(lastShuffledState); next.random = random.copy(); System.arraycopy(deck, 0, next.deck, 0, deck.length); next.step = step; return next; }