Use a LinkedHashMap to respect the order of the input data

Note: The int/real enumerated distributions do not specify that the
input must be sorted. This change supports the legacy behaviour enforced
by the unit test which is assuming input values are processed in
encounter order (which happens to be sorted).

Given int and double have a natural ordering it may be better to update
the distribution to sort input values. However this would contradict the
enumerated distribution which respects the input order of the list used
in the constructor.
2 files changed
tree: 63205c88cf0452b1dbfdd797aca9e5fb43757a0b
  1. .github/
  2. commons-math-core/
  3. commons-math-examples/
  4. commons-math-legacy/
  5. commons-math-legacy-core/
  6. commons-math-legacy-exception/
  7. commons-math-neuralnet/
  8. commons-math-transform/
  9. dist-archive/
  10. doc/
  11. docs-archive/
  12. siteMods/
  13. src/
  14. .asf.yaml
  15. .gitignore
  16. CODE_OF_CONDUCT.md
  17. CONTRIBUTING.md
  18. LICENSE
  19. NOTICE
  20. pom.xml
  21. PROPOSAL.html
  22. README.md
  23. SECURITY.md
README.md

Apache Commons Math

Build Status Coverage Status

“Commons Math” is undergoing major changes towards the next release (4.0):

Documentation

More information can be found on the Apache Commons Math homepage. The Javadoc can be browsed. Questions related to the usage of Apache Commons Math should be posted to the user mailing list.

Where can I get the latest release?

You can download source and binaries from our download page.

Please note that the last official version (3.6.1) is quite old and not supported anymore. Bug reports should be filed against the current development version.

Contributing

We accept Pull Requests via GitHub. The developer mailing list is the main channel of communication for contributors. There are some guidelines which will make applying PRs easier for us:

  • No tabs! Please use spaces for indentation.
  • Respect the code style.
  • Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
  • Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running mvn.

If you plan to contribute on a regular basis, please consider filing a contributor license agreement. You can learn more about contributing via GitHub in our contribution guidelines.

License

This code is under the Apache Licence v2.

See the NOTICE file for required notices and attributions.

Donations

You like Apache Commons Math? Then donate back to the ASF to support the development.

Additional Resources