blue_sampler.from_geometry
- blue_sampler.from_geometry(geometry, gtype, p=3, **kwargs)[source]
Convert tessels or clusters into low-discrepancy point set.
Each tessel or cluster is replaced by n points by solving a moment-matching problem (Levenberg-Marquardt) via momentum_fit.
- Parameters:
geometry (
NDArray) –Batch of tessels or clusters to convert. - gtype=”polygons” : quadrilaterals of shape (N, 4, 2),
e.g. the quad output of sample_tessels.
gtype=”clusters” : point sets of shape (N, K, D), e.g. the output of sample_clusters, or the atoms output of sample_tessels(…, return_atoms=True).
gtype (
str) – Geometry type. “polygons” only supports D = 2.p (
int) – Maximum total moment order to match (centroid plus central moments up to order p).**kwargs – Additional arguments passed to momentum_fit (e.g., n_restarts, random_state, tol).
- Returns:
n points per tessel or cluster, matching its moments up to order p.
- Return type:
NDArray