Description Usage Arguments Value References Examples
The ddimensional unit simplex is the set of points \vec{x}\in \R^d, s.t.: ∑_i x_i≤q 1, x_i≥q 0. The ddimensional canonical simplex is the set of points \vec{x}\in \R^d, s.t.: ∑_i x_i = 1, x_i≥q 0.
1  direct_sampling(body, n)

body 
A list to request exact uniform sampling from special well known convex bodies through the following input parameters:

n 
The number of points that the function is going to sample. 
A d\times n matrix that contains, columnwise, the sampled points from the convex polytope P.
R.Y. Rubinstein and B. Melamed, “Modern simulation and modeling” Wiley Series in Probability and Statistics, 1998.
A Smith, Noah and W Tromble, Roy, “Sampling Uniformly from the Unit Simplex,” Center for Language and Speech Processing Johns Hopkins University, 2004.
1 2  # 100 uniform points from the 2d unit ball
points = direct_sampling(n = 100, body = list("type" = "ball", "dimension" = 2))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.