X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e9c0448c6566825b170b98ecff716b098bda10e..ffb152ddb9e70873da098de4577e64a2595f4697:/src/bindings/java/org/simgrid/msg/RngStream.java diff --git a/src/bindings/java/org/simgrid/msg/RngStream.java b/src/bindings/java/org/simgrid/msg/RngStream.java index bc6c3f2cc9..c7d3a5d837 100644 --- a/src/bindings/java/org/simgrid/msg/RngStream.java +++ b/src/bindings/java/org/simgrid/msg/RngStream.java @@ -1,13 +1,11 @@ -/* - * JNI interface to C RngStream code - * - * Copyright (c) 2006-2013. The SimGrid Team. - * All right reserved. - * - * This program is free software; you can redistribute - * it and/or modify it under the terms of the license - * (GNU LGPL) which comes with this package. - */ +/* JNI interface to C RngStream code */ + +/* Copyright (c) 2006-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + package org.simgrid.msg; /** * Export of RngStreams for Java @@ -53,7 +51,7 @@ public class RngStream { * Release the C RngStream object */ private native void destroy(); - + /** * Sets the initial seed of the package RngStreams to the six integers in the vector seed. This will * be the seed (initial state) of the first stream. If this procedure is not called, the default initial @@ -81,21 +79,21 @@ public class RngStream { */ public native void setAntithetic(boolean a); /** - * Sets the initial seed Ig of stream g to the vector seed. This vector must satisfy the same - * conditions as in setPackageSeed. The stream is then reset to this initial seed. The - * states and seeds of the other streams are not modified. As a result, after calling this procedure, - * the initial seeds of the streams are no longer spaced Z values apart. We discourage the use of - * this procedure. Returns false for invalid seeds, and true otherwise. + * Sets the initial seed Ig of stream g to the vector seed. This vector must satisfy the same + * conditions as in setPackageSeed. The stream is then reset to this initial seed. The + * states and seeds of the other streams are not modified. As a result, after calling this procedure, + * the initial seeds of the streams are no longer spaced Z values apart. We discourage the use of + * this procedure. Returns false for invalid seeds, and true otherwise. */ public native boolean setSeed(int seed[]); /** - * Advances the state of the stream by k values, without modifying the states of other streams (as - * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e > 0, then - * k = 2e + c; if e < 0, then k = -2-e + c; and if e = 0, then k = c. Note: c is allowed to take - * negative values. We discourage the use of this procedure. - */ + * Advances the state of the stream by k values, without modifying the states of other streams (as + * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e > 0, then + * k = 2e + c; if e < 0, then k = -2-e + c; and if e = 0, then k = c. Note: c is allowed to take + * negative values. We discourage the use of this procedure. + */ public native void advanceState(int e, int g); - + /** * Returns a (pseudo)random number from the uniform distribution over the interval (0, 1), after advancing the state by one step. The returned number has 32 bits of precision * in the sense that it is always a multiple of 1/(232 - 208), unless RngStream_IncreasedPrecis @@ -107,7 +105,7 @@ public class RngStream { * {i, i + 1, . . . , j} */ public native int randInt(int i, int j); - + /** * Class initializer, to initialize various JNI stuff */