You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now the discrete range trait doesn't seem clean because of the following issue:
No bound check, the next_value and previous_value requires always returns a value
Unknown number of distinct values
Linspace coord should be a discrete range, however this can't be used in Histogram since the hash table requires Equal trait but f64 doesn't impl the trait.
However, all the discrete range is equivalent to a integer range, thus we doesn't actually need put any restriction on the traits for the actual values. (Later we may use an array as an discrete coordinate and lifting the trait bound will make this possible)
Drawbacks
In order to know the number of values and handle the bound correctly, we have to make most of the RangeParam not an unit type, and this will makes Histogram::new unsable to applied to most of the coord types. Thus this should be considered as an breaking change.
The text was updated successfully, but these errors were encountered:
Background
Now the discrete range trait doesn't seem clean because of the following issue:
next_value
andprevious_value
requires always returns a valueHistogram
since the hash table requiresEqual
trait butf64
doesn't impl the trait.However, all the discrete range is equivalent to a integer range, thus we doesn't actually need put any restriction on the traits for the actual values. (Later we may use an array as an discrete coordinate and lifting the trait bound will make this possible)
Drawbacks
In order to know the number of values and handle the bound correctly, we have to make most of the
RangeParam
not an unit type, and this will makesHistogram::new
unsable to applied to most of the coord types. Thus this should be considered as an breaking change.The text was updated successfully, but these errors were encountered: