-
Notifications
You must be signed in to change notification settings - Fork 2
Add mode function #42
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
Comments
There is no consistency in the documentation about how to handle the situation where every element occurs equally often, so the decision has been taken to returns an array of all the unique values of a given array. For example:
It has also been decided to require an array of at least two elements. |
This is the same as the approach taken by the Calculator Soup online calculator. |
Also adding:
|
Implemented by merge commit bb32805 |
The following Mode function applies to countable sets. It obeys the rule that if all items in a sequence of values are unique then there is no mode. The following function returns an empty array in that case. If sequence in mono-modal an array of one element containing the mode is returned, while if sequence is multi-modal, an array containing all the modes is returned.
This function illustrates the case for a sequence of
Integer
values. Overloads for other ordinal types are obvious.This issue was extracted from issue #16
The text was updated successfully, but these errors were encountered: