hot-ranking-algorithm 2.0.0

Algorithm that measures how relevant a given data set is, kinda like Reddit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate time;

use super::rank;

#[test]
fn should_rank_stuff() {
    let epoch = time::now_utc();

    let timestamp = time::now_utc();
    let upvotes: i32 = 3;
    let downvotes: i32 = 1;
    let ranking = rank(&upvotes, &downvotes, timestamp, epoch);
    assert_eq!(ranking > 1, true);
}