Learn R Programming

VBmix (version 0.2.8)

generateSparsePoints: generateSparsePoints

Description

generates a set of points pairwise-separated by a minimal distance. Is not guaranteed to converge: when maxit is reached, current points are returned.

Usage

generateSparsePoints(npoints, dim = 2, span = 10, mindist = 2, maxit = 20)

Arguments

npoints
number of points to generate (i.e. in a matrix with elements as rows.
dim
number of variables to generate.
span
[-span, span] is used as bounds to uniform sampling for all variables.
mindist
minimal distance that each element should have with all others. the "control" C routine is used to perform this verification. All points that do not respect this constraint are resampled.
maxit
maximal number of iterations before current elements are returned.

Value

  • matrix with well separated elements as its rows.

Examples

Run this code
temp <- generateSparsePoints(10)

Run the code above in your browser using DataLab