Some cleanup of the comments in the last commit.
This commit is contained in:
parent
047e66d9aa
commit
420e078b70
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user