Allow users to implement their own distributions
This commit is contained in:
1 file changed
+1
-1
@@ -16,7 +16,7 @@ public abstract class Distribution<TNum> : IDistribution<TNum> where TNum : IFlo
|
||||
this.fitter = new ShapeFitter<TNum>(this.ShapeFunction, rng, 100);
|
||||
}
|
||||
|
||||
private protected abstract TNum ShapeFunction(TNum x);
|
||||
public abstract TNum ShapeFunction(TNum x);
|
||||
|
||||
public TNum GetDistributedValue(CancellationToken token = default) => this.fitter.NextNumber(token);
|
||||
|
||||
|
||||
Reference in new issue
Block a user