1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.commons.rng; 18 19 /** 20 * Applies to generators that can be advanced a very large number of 21 * steps of the output sequence in a single operation. 22 * 23 * @since 1.3 24 */ 25 public interface LongJumpableUniformRandomProvider extends JumpableUniformRandomProvider { 26 /** 27 * Creates a copy of the JumpableUniformRandomProvider and then advances the 28 * state of the current instance. The copy is returned. 29 * 30 * <p>The current state will be advanced in a single operation by the equivalent of a 31 * number of sequential calls to a method that updates the state of the provider. The 32 * size of the long jump is implementation dependent.</p> 33 * 34 * <p>Repeat invocations of this method will create a series of generators 35 * that are uniformly spaced at intervals of the output sequence. Each generator provides 36 * non-overlapping output for the length of the long jump for use in parallel computations.</p> 37 * 38 * <p>The returned copy may be jumped {@code m / n} times before overlap with the current 39 * instance where {@code m} is the long jump length and {@code n} 40 * is the jump length of the {@link #jump()} method. 41 * 42 * @return A copy of the current state. 43 */ 44 JumpableUniformRandomProvider longJump(); 45 }