Le ven. 23 avr. 2021 à 23:42, Alex Herbert <alex.d.herb...@gmail.com> a écrit : > > I recently added a UnitBallSampler to the sampling module to sample > coordinates inside a unit ball. I also have a working TriangleSampler to > sample within a triangle and intend to create a TetrahedronSampler to > sample within a tetrahedron. > > Currently in the released version (1.3) we only have a UnitSphereSampler in: > > o.a.c.rng.sampling > > The only other package is o.a.c.rng.sampling.distribution for probability > distributions. > > Should new coordinate based samplers be moved to a package inside for > example: > > o.a.c.rng.sampling.geometry > o.a.c.rng.sampling.shape
Maybe. I guess that "UnitSphereSampler" would be moved too (and thus deprecated in the package where it currently resides). Do you foresee many "shapes"? And a way to "combine" them? > These shape samplers also require a valid input for the geometry. Currently > in my working example for the TriangleSampler I have not validated the > input is a triangle. I state that if the points are collinear then the > distribution of the samples is undefined. It will not be uniform on the > line segment connecting the vertices. > > I think that validation of the input shape is out of scope. I'd tend to agree; otherwise, it would duplicate code that would certainly also be needed in [Geometry]. > Are shape > samplers themselves also out of scope for RNG and would be a better fit in > commons Geometry? At first sight, sampling codes would seem more out of scope in [Geometry] than "shape" sampling in [RNG]. Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org