runif_unitSimplex {uniformly} | R Documentation |
Uniform sampling on/in a unit simplex
Description
Uniform sampling on or in a unit simplex (arbitrary dimension).
Usage
runif_on_unitSimplex(n, d)
runif_in_unitSimplex(n, d)
Arguments
n |
number of simulations |
d |
dimension of the space |
Value
The simulations in a n
times d
matrix.
See Also
runif_in_tetrahedron
for sampling in an arbitrary
tetrahedron in dimension 3; runif_in_simplex
for sampling
in an arbitrary simplex.
Examples
library(rgl)
sims <- runif_on_unitSimplex(300, d = 3)
points3d(sims)
[Package uniformly version 0.5.0 Index]