-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/dictionary enhancements #60
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
Conversation
…rtially cast More info here: https://stackoverflow.com/a/62720142/5134722
…ould be useful in future.
Flatten unrolls the array to either row major or column major order
…e precedence We want the one-based version to take precedence for a one-based array
| /// <summary> | ||
| /// Converts this array to a reverse list-based dictionary | ||
| /// </summary> | ||
| public static IListValuedDictionary<TVal, int> ConvertToReverseListValuedDictionary<TVal>(this TVal[] array, int indexOffset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to add overrides for these functions that default the offset to 0. I think it's great that you support it, but I don't see many cases where they would be used (aside from one-based arrays, but they probably should implement a version of this that automatically sets the offset to 1 to avoid confusion).
| ISuccessTuple<V> TryGetValue(K key); | ||
| } | ||
|
|
||
| public interface ISuccessTuple<out V> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to split this into its own file. Same for the implementation class below.
Description
Added some enhancements to dictionaries covering some outstanding issues, including: