probability
probability copied to clipboard
Use default comparer for sorting supports in DiscreteHistogram
This is for example relevant for StandardDiscreteUniform, which changes from
0|***************************************
1|***************************************
2|**************************************
3|***************************************
-1|***************************************
-2|***************************************
-3|****************************************
to
-3|****************************************
-2|***************************************
-1|***************************************
0|***************************************
1|**************************************
2|***************************************
3|**************************************
This requires, of course, that T
implements IComparable
. I made the pull request quickly after #1. I'll just fix that.
There we go. Now it casts to IComparable
and defaults to ToLabel
. (The check could of course be moved outside of OrderBy
to do it fewer times, but it doesn't make much of a difference for the number of samples here.)