Samplers

class discopygal.solvers.samplers.Sampler(scene=None)

Abstract class for sampling methods in the scene.

Parameters:

scene (Scene) – a scene to sample in

sample()

Return a sample in the space (might be invalid)

Returns:

sampled point

Return type:

Point_2

set_scene(scene)

Set the scene the sampler should use. Can be overridded to add additional processing.

Parameters:

scene (Scene) – a scene to sample in

class discopygal.solvers.samplers.Sampler_Uniform(scene=None)

Uniform sampler in the scene

Parameters:

scene (Scene) – a scene to sample in

sample()

Return a sample in the space (might be invalid)

Returns:

sampled point

Return type:

Point_2

set_bounds_manually(min_x, max_x, min_y, max_y)

Set the sampling bounds manually (instead of supplying a scene) Bounds are given in CGAL FT

set_scene(scene, bounding_box=None)

Set the scene the sampler should use. Can be overridded to add additional processing.

Parameters:

scene (Scene) – a scene to sample in