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