Hoverbear/rust-rosetta — pull request #187 by pfalabella (2014-08-04 13:52:17+00:00)
Title: hamming numbers refactored

Added an alternative representation for Hamming Numbers. Instead of saving them directly as BigUints, it uses the fact that a Hamming number is represented as 2^i * 3^j * 5^k to only store i, j and k. BigUint is calculated as needed.
To generalize the algorithm and avoid code duplication I introduced a HammingNumber trait and reference it in hamming_numbers_alt.rs.

I also had to make the call to spsc_queue::new() unsafe (as new is now unsafe and was generating a build error). spsc_queue is probably not the right queue to use or I'm not using it 100% right, but I could not find another simple FIFO queue in the rust standard library. [ProirityQueue](http://doc.rust-lang.org/std/collections/struct.PriorityQueue.html) seems to be more complex than I need... Any suggestions?