-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support incomplete list for sorter
and renamer
#384
base: master
Are you sure you want to change the base?
Conversation
About the implementation, instead of overloading struct Renamed{S, T}
original::S
value::T # maybe `Union{T, Nothing}` is cleaner, otherwise just a random one if the correct one is not found
idx::UInt32 # use `0` if `original` is not found in `uniquevalues`
end object. Then, this gets all simplified to something reasonable using |
Ah yes, I see, that is probably a better way to do it! Above is just an initial commit/sketch. It's untested, and I haven't added any new tests yet. |
This addresses the proposal in #329 to make it possible to handle palettes a little more cleanly:
Specifically the missing piece this adds is to handle the case where sorter and renamer are provided only a partial enumeration of values.
Then, to quote @piever, the old:
can now be achieved with