The user should provide the number of points n_samples
to be generated on
the torus and the dimension dim
of the torus on which points would be
generated in \(R^{2 \mathrm{dim}}\). The sample
argument is optional and
is set to "random"
by default. The generated points are
returned as an array of shape \(n_\mathrm{samples} \times R^{2
\mathrm{dim}}\).
Usage
torus(n_samples, dim, sample = c("random", "grid"))
Arguments
- n_samples
An integer value specifying the sample size.
- dim
An integer value specifying the dimension \(R^{2 \mathrm{dim}}\) of the torus.
- sample
A string specifying the sampling type. Choices are
"random"
or"grid"
. Defaults to"random"
.