Cargo update.
This commit is contained in:
@@ -8,7 +8,7 @@ pub struct Gaussian {
|
||||
}
|
||||
|
||||
impl fmt::Debug for Gaussian {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"N(mu={:.03}, sigma={:.03}, pi={:.03}, tau={:.03})",
|
||||
|
||||
14
src/lib.rs
14
src/lib.rs
@@ -1,4 +1,5 @@
|
||||
#![allow(clippy::unreadable_literal, clippy::excessive_precision)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
mod factor_graph;
|
||||
mod gaussian;
|
||||
@@ -108,12 +109,12 @@ fn draw_margin(p: f64, beta: f64, total_players: f64) -> f64 {
|
||||
}
|
||||
|
||||
pub struct TrueSkill {
|
||||
mu: f64,
|
||||
sigma: f64,
|
||||
// mu: f64,
|
||||
// sigma: f64,
|
||||
pub beta: f64,
|
||||
pub tau: f64,
|
||||
pub draw_probability: f64,
|
||||
delta: f64,
|
||||
// delta: f64,
|
||||
}
|
||||
|
||||
impl TrueSkill {
|
||||
@@ -357,12 +358,12 @@ impl TrueSkill {
|
||||
impl Default for TrueSkill {
|
||||
fn default() -> TrueSkill {
|
||||
TrueSkill {
|
||||
mu: MU,
|
||||
sigma: SIGMA,
|
||||
// mu: MU,
|
||||
// sigma: SIGMA,
|
||||
beta: BETA,
|
||||
tau: TAU,
|
||||
draw_probability: DRAW_PROBABILITY,
|
||||
delta: DELTA,
|
||||
// delta: DELTA,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -370,7 +371,6 @@ impl Default for TrueSkill {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use approx::*;
|
||||
use env_logger;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ impl Matrix {
|
||||
if self.height == self.width && self.height == 1 {
|
||||
matrix[(0, 0)] = 1.0 / self[(0, 0)];
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
matrix
|
||||
|
||||
Reference in New Issue
Block a user