You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2017/04/15 00:08:42 UTC

commons-rng git commit: User guide: Changed example that used a deprecated class.

Repository: commons-rng
Updated Branches:
  refs/heads/master 1bb529778 -> 3c8b5a2ba


User guide: Changed example that used a deprecated class.


Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/3c8b5a2b
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/3c8b5a2b
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/3c8b5a2b

Branch: refs/heads/master
Commit: 3c8b5a2baeec7930bf7c46cc9b567771377cd9a9
Parents: 1bb5297
Author: Gilles <er...@apache.org>
Authored: Thu Apr 13 17:29:13 2017 +0200
Committer: Gilles <er...@apache.org>
Committed: Thu Apr 13 17:29:13 2017 +0200

----------------------------------------------------------------------
 src/site/apt/userguide/rng.apt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/3c8b5a2b/src/site/apt/userguide/rng.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/userguide/rng.apt b/src/site/apt/userguide/rng.apt
index 4f08a28..f46bb5b 100644
--- a/src/site/apt/userguide/rng.apt
+++ b/src/site/apt/userguide/rng.apt
@@ -259,10 +259,11 @@ rngNew.restoreState(stateNew);
 
 +--------------------------+
 import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
-import org.apache.commons.rng.sampling.distribution.BoxMullerGaussianSampler;
+import org.apache.commons.rng.sampling.distribution.GaussianSampler;
+import org.apache.commons.rng.sampling.distribution.MarsagliaNormalizedGaussianSampler;
 
-ContinuousSampler sampler = new BoxMullerGaussianSampler(RandomSource.create(RandomSource.MT_64),
-                                                         45.6, 2.3);
+ContinuousSampler sampler = new GaussianSampler(new MarsagliaNormalizedGaussianSampler(RandomSource.create(RandomSource.MT_64)),
+                                                45.6, 2.3);
 double random = sampler.sample();
 +--------------------------+