Skip to content
"Hit and Run" sampler
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
hitandrun Fix errors due to coercion to logical Jan 8, 2019
.gitignore gitignore Sep 20, 2013
Makefile Use testthat for testing Jul 10, 2015 Add build status badge to README May 20, 2018 Use testthat for testing Jul 10, 2015

"Hit and Run" sampler

Build Status

This project provides an implementation of the "Hit and Run" algorithm for sampling from convex shapes. Our motivation for doing this is to enable the fast generation of arbitrarily constrained weights in high-dimensional space. This should enable applying e.g. SMAA ( with more complex weight constraints.

R implementation

Releases of the R package are available on CRAN:

The source is available from GitHub:

See ??har, ?har, ?har-constraint and ?simplex.sample


hitandrun depends on rcdd, which requires GNU MP. On debian derivatives, the compile-time dependency is provided by libgmp-dev.


Thanks to Tommi Tervonen, Douwe Postmus, Ahmet Kandakoglu and Alexander Karlsson for reporting bugs and/or suggesting improvements.

You can’t perform that action at this time.