meritrank 0.4.0

MeritRank is a Rust library for computing merit scores and rankings in a directed graph.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub fn sign<T>(x: T) -> i32
where
    T: Into<f64> + Copy,
{
    let x: f64 = x.into();

    if x > 0.0 {
        return 1;
    } else if x < 0.0 {
        return -1;
    }
    return 0;
}