This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit b05d7552a869a3aecb6c53c9579ea673de989284
Author: Alex Herbert <[email protected]>
AuthorDate: Sun Jun 9 13:37:37 2019 +0100

    RNG-97: Define the JumpableUniformRandomProvider interface.
---
 .../commons/rng/JumpableUniformRandomProvider.java | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git 
a/commons-rng-client-api/src/main/java/org/apache/commons/rng/JumpableUniformRandomProvider.java
 
b/commons-rng-client-api/src/main/java/org/apache/commons/rng/JumpableUniformRandomProvider.java
new file mode 100644
index 0000000..59646d8
--- /dev/null
+++ 
b/commons-rng-client-api/src/main/java/org/apache/commons/rng/JumpableUniformRandomProvider.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rng;
+
+/**
+ * Applies to generators that can be advanced a large number of 
+ * steps of the output sequence in a single operation.
+ *
+ * @since 1.3
+ */
+public interface JumpableUniformRandomProvider extends UniformRandomProvider {
+    /**
+     * Creates a copy of the UniformRandomProvider and then advances the
+     * state of the current instance. The copy is returned.
+     *
+     * <p>The current state will be advanced in a single operation by the 
equivalent of a
+     * number of sequential calls to a method that updates the state of the 
provider. The
+     * size of the jump is implementation-dependent.</p>
+     *
+     * <p>Repeat invocations of this method will create a series of generators
+     * that are uniformly spaced at intervals of the output sequence. Each 
generator provides
+     * non-overlapping output for the length of the jump for use in parallel 
computations.</p>
+     *
+     * @return A copy of the current state.
+     */
+    UniformRandomProvider jump();
+}

Reply via email to