69 samples = Create(num_samples);
70 if (samples_map.
find(num_samples) == samples_map.
end()) {
71 samples_map[num_samples] = samples;
74 if (samples_map.
find(num_samples) == samples_map.
end()) {
75 samples = Create(num_samples);
76 samples_map[num_samples] = samples;
78 samples = samples_map[num_samples];
99 MiniMap<int, VecXT<Vec3d>> samples_map;
const Pair< T_key, T_val > * find(const T_key &key) const
Definition mini_map.hpp:37
const Pair< T_key, T_val > * end() const
Definition mini_map.hpp:23
static std::tuple< VecXT< Vec3d >, VecXT< VecXT< int > > > Solve(VecXT< Vec3d > const &vt_seeds)
Compute the Voronoi diagram for a set of seeds with uniform weights.
Definition spherical_voronoi.cpp:16
A class for generating samples from a weighted spherical centroidal Voronoi tessellation.
Definition wscvt_sampler.hpp:17
static WSCVTSampler & GetInstance()
Get a reference to the singleton WSCVTSampler instance.
Definition wscvt_sampler.hpp:48
VecXT< Vec3d > Get(int num_samples, bool new_random=false)
Generate a specified number of sample points.
Definition wscvt_sampler.hpp:66
int max_iters
The maximum number of iterations to perform during tessellation (default: 10000).
Definition wscvt_sampler.hpp:23
double tol
The convergence tolerance for tessellation (default: 1.0e-4).
Definition wscvt_sampler.hpp:28
WSCVTSampler(const WSCVTSampler &)=delete
Delete copy constructor.
WSCVTSampler & operator=(const WSCVTSampler &)=delete
Delete copy assignment operator.
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31