Skip to content

Commit

Permalink
fix(lib): enums are now namespaced
Browse files Browse the repository at this point in the history
See rust-lang/rust#18973

`Tails` variants: `OneTailed` and `TwoTailed` have been renamed to
`Tails::{One, Two}`

[breaking-change]
  • Loading branch information
Jorge Aparicio committed Aug 18, 2016
1 parent d3899fa commit f106686
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/outliers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use std::num;

use outliers::Label::{HighMild, HighSevere, LowMild, LowSevere, NotAnOutlier};
use {Simd, Stats};

// TODO Add more outlier classification methods
Expand Down
8 changes: 4 additions & 4 deletions src/ttest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ impl<A: Float> TDistribution<A> {

match tails {
// XXX This division by two assumes that the t-distribution is symmetric
OneTailed => p_value / num::cast(2f64).unwrap(),
TwoTailed => p_value,
Tails::One => p_value / num::cast(2f64).unwrap(),
Tails::Two => p_value,
}
}
}

/// Number of tails to consider for the t-test
pub enum Tails {
OneTailed,
TwoTailed,
One,
Two,
}

#[cfg(test)]
Expand Down

0 comments on commit f106686

Please sign in to comment.