-
Notifications
You must be signed in to change notification settings - Fork 302
Closed
Milestone
Description
Background
Now the discrete range trait doesn't seem clean because of the following issue:
- No bound check, the
next_value
andprevious_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 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 makes Histogram::new
unsable to applied to most of the coord types. Thus this should be considered as an breaking change.
Metadata
Metadata
Assignees
Labels
No labels