File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Mode calculation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Mode calculation" Watch "Mode calculation" New topic

Mode calculation

Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
I can't seem to find a library that calculates mode.
the jakarta commons math is close, but the array must be in memory and no more than 100 rows.

I have an array that ranges between 20,000 and 90,000.

I found a C# version and converted it to java, but it's wrong (could be me, my conversion...). (excel's mode and PHP's mode of the same data proved that).

Ideally, I'd like a library to do it, but if someone has code they can provide that would be great too.

It is sorta covered in the JavaRanch Style Guide.
subject: Mode calculation
Similar Threads
Putting prime numbers into an array
accessing jsp array variable in javascript
am i missing something?
Expression in for loop
multithreading not working correctly