runif_unitSimplex | R Documentation |
Uniform sampling on or in a unit simplex (arbitrary dimension).
runif_on_unitSimplex(n, d)
runif_in_unitSimplex(n, d)
n |
number of simulations |
d |
dimension of the space |
The simulations in a n
times d
matrix.
runif_in_tetrahedron
for sampling in an arbitrary
tetrahedron in dimension 3; runif_in_simplex
for sampling
in an arbitrary simplex.
library(rgl)
sims <- runif_on_unitSimplex(300, d = 3)
points3d(sims)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.