Closed Osburg closed 7 months ago
Hi @Osburg,
Thanks for the PR, I will have a look over the Christmas days. Sorry for the delay.
Best,
Johannes
is it on purpose that you inherit from the
SamplerStrategy
, because then you also inherit from their the handling of NChooseKs, which is totally fine for me, but I just wanted to ask ;)
Thanks for pointing this out :) This was not my intention, I did not pay attention apparently. So I guess I should let UniversalConstraintSampler
inherit from Strategy
instead?
Yep, I would then recommend to inherit from Strategy
.
This PR adds a new sampler that supports nonlinear/linear equality/inequality constraints and NChooseKConstraints as discussed in #314. This only works for continuous inputs. In principle also batch constraints (and all other constraints you can compute a jacobian for) are supported, but since the returned sample is sampled from a larger set of candidates, the batch structure is no longer respected. By adapting the sampling logic in this last step this method can be made available for batch constraints. Closes #314.