diff --git a/src/main/java/org/apache/commons/math4/random/RngAdaptor.java b/src/main/java/org/apache/commons/math4/random/RngAdaptor.java new file mode 100644 index 000000000..d132c9576 --- /dev/null +++ b/src/main/java/org/apache/commons/math4/random/RngAdaptor.java @@ -0,0 +1,229 @@ +/* + * 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.math4.random; + +import java.io.Serializable; +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.io.ObjectInputStream; +import org.apache.commons.math4.util.FastMath; +import org.apache.commons.math4.rng.UniformRandomProvider; +import org.apache.commons.math4.rng.RandomSource; + +/** + * Adaptor that delegates to a {@link UniformRandomProvider} instance. + *

+ * It is provided for users who wish to test the new RNG implementations + * the current generators (up to version 3.6 of Commons Math) in + * codes that require the {@code RandomGenerator} interface. + *

+ *

+ * Applications should upgrade to use the new generators ASAP. + * If problems are found that jeopardize the upgrade, please report them + * on the project's + * + * issue tracking system. + *

+ * + *

+ * Notes: + *