Sobol-Burley

Latest Release Documentation

A seedable Owen-scrambled Sobol sequence based on the paper Practical Hash-based Owen Scrambling by Brent Burley, but with an improved hash from Building a Better LK Hash and more dimensions due to Kuo et al.

This crate is geared towards practical graphics applications, and as such has some limitations:

These are all trade-offs for the sake of better performance and a smaller memory footprint.

Expanding this crate to be more suitable for a wider range of applications is a tentative goal for the future. However, efficient execution for graphics applications will always be the top priority.

Basic usage

Basic usage is pretty straightforward:

```rust use sobol_burley::sample;

// Print the first 16 dimensions of the first sample. for d in 0..16 { let n = sample(0, d, 0); println!("{}", n); }

// Print the first 16 dimensions of the second sample. for d in 0..16 { let n = sample(1, d, 0); println!("{}", n); } ```

The first parameter of sample() is the index of the sample you want, and the second parameter is the index of the dimension you want. The parameters are zero-indexed, and the output is in the interval [0, 1).

If all you want is a single standard Owen-scrambled Sobol sequence, then this is all you need. For more advanced usage, see the crate documentation.

License

The main code in this project is licensed under either of

at your option.

The Sobol direction numbers under direction_numbers/ and some of the code in build.rs (demarcated by comments) is adapted from work by Stephen Joe and Frances Y. Kuo, and is under the 3-clause BSD license. See licenses/JOE_KUO.txt for details.

Contributing

Contributions are absolutely welcome! Please keep in mind that this crate aims to be:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you will be licensed as above (MIT/Apache dual-license), without any additional terms or conditions.