From 420e078b701028cdeb1d795c4be1c94df70d88a2 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sun, 15 Mar 2020 22:37:34 +0900 Subject: [PATCH] Some cleanup of the comments in the last commit. --- sub_crates/sobol/build.rs | 99 +++++++++++++++++++------------------ sub_crates/sobol/src/lib.rs | 6 +-- 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/sub_crates/sobol/build.rs b/sub_crates/sobol/build.rs index e93649f..778ae40 100644 --- a/sub_crates/sobol/build.rs +++ b/sub_crates/sobol/build.rs @@ -1,5 +1,6 @@ -/// This file generates the Sobol direction vectors used by this crate's -/// Sobol sequence. +//! This file generates the Sobol direction vectors used by this crate's +//! Sobol sequence. + use std::{env, fs::File, io::Write, path::Path}; /// How many components to generate. @@ -33,53 +34,53 @@ fn main() { //====================================================================== -/// The following code and data are adapted from code and data on this webpage: -/// -/// http://web.maths.unsw.edu.au/~fkuo/sobol/ -/// -/// From these papers: -/// -/// S. Joe and F. Y. Kuo, Remark on Algorithm 659: Implementing Sobol's -/// quasirandom sequence generator, ACM Trans. Math. Softw. 29, 49-57 -/// (2003) -/// -/// S. Joe and F. Y. Kuo, Constructing Sobol sequences with better -/// two-dimensional projections, SIAM J. Sci. Comput. 30, 2635-2654 (2008) -/// -/// The adapted code and data is under the following license: -/// -/// Copyright (c) 2008, Frances Y. Kuo and Stephen Joe -/// All rights reserved. -/// -/// Redistribution and use in source and binary forms, with or without -/// modification, are permitted provided that the following conditions are -/// met: -/// -/// * Redistributions of source code must retain the above copyright -/// notice, this list of conditions and the following disclaimer. -/// -/// * Redistributions in binary form must reproduce the above copyright -/// notice, this list of conditions and the following disclaimer in the -/// documentation and/or other materials provided with the -/// distribution. -/// -/// * Neither the names of the copyright holders nor the names of the -/// University of New South Wales and the University of Waikato -/// and its contributors may be used to endorse or promote products -/// derived from this software without specific prior written -/// permission. -/// -/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY -/// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -/// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -/// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE -/// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -/// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -/// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -/// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -/// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -/// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -/// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// The following code and data are adapted from code and data on this webpage: +// +// http://web.maths.unsw.edu.au/~fkuo/sobol/ +// +// From these papers: +// +// S. Joe and F. Y. Kuo, Remark on Algorithm 659: Implementing Sobol's +// quasirandom sequence generator, ACM Trans. Math. Softw. 29, 49-57 +// (2003) +// +// S. Joe and F. Y. Kuo, Constructing Sobol sequences with better +// two-dimensional projections, SIAM J. Sci. Comput. 30, 2635-2654 (2008) +// +// The adapted code and data is under the following license: +// +// Copyright (c) 2008, Frances Y. Kuo and Stephen Joe +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the +// distribution. +// +// * Neither the names of the copyright holders nor the names of the +// University of New South Wales and the University of Waikato +// and its contributors may be used to endorse or promote products +// derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. const SOBOL_BITS: usize = 32; diff --git a/sub_crates/sobol/src/lib.rs b/sub_crates/sobol/src/lib.rs index d31f5d8..cb5fe24 100644 --- a/sub_crates/sobol/src/lib.rs +++ b/sub_crates/sobol/src/lib.rs @@ -1,6 +1,6 @@ -/// An implementation of the Sobol low discrepancy sequence. -/// -/// Includes variants with random digit scrambling and Owen scrambling. +//! An implementation of the Sobol low discrepancy sequence. +//! +//! Includes variants with random digit scrambling and Owen scrambling. // The following `include` provides `MAX_DIMENSION` and `VECTORS`. // See the build.rs file for how this included file is generated.