Remove outdated code
This commit is contained in:
parent
1013a1ee17
commit
f905dfdbc3
28
src/sync.rs
28
src/sync.rs
|
@ -6,34 +6,6 @@ use crate::error;
|
||||||
use crate::queries::*;
|
use crate::queries::*;
|
||||||
use sqlite::*;
|
use sqlite::*;
|
||||||
|
|
||||||
// Score calculation
|
|
||||||
|
|
||||||
// /// Calculate the collective expected score for each team.
|
|
||||||
// fn expected_scores(ratings: &Teams<&mut f64>) -> Vec<f64> {
|
|
||||||
// let qs: Vec<f64> = ratings
|
|
||||||
// .into_iter()
|
|
||||||
// .map(|es| 10_f64.powf(es.iter().map(|x| **x).sum::<f64>() / es.len() as f64 / 400.0))
|
|
||||||
// .collect();
|
|
||||||
// let sumq: f64 = qs.iter().sum();
|
|
||||||
// qs.into_iter().map(|q| q / sumq).collect()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// Adjust the ratings of each player based on who won.
|
|
||||||
// fn adjust_ratings(ratings: Teams<&mut f64>, winner: usize) {
|
|
||||||
// let exp_scores = expected_scores(&ratings);
|
|
||||||
|
|
||||||
// ratings
|
|
||||||
// .into_iter()
|
|
||||||
// .zip(exp_scores.into_iter())
|
|
||||||
// .enumerate()
|
|
||||||
// .for_each(|(i, (es, exp_sc))| {
|
|
||||||
// let len = es.len() as f64;
|
|
||||||
// let score = f64::from(winner == i);
|
|
||||||
// es.into_iter()
|
|
||||||
// .for_each(|e| *e += 40.0 * (score - exp_sc) / len);
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Extract set data
|
// Extract set data
|
||||||
|
|
||||||
fn get_event_sets(event: EventId, auth: &str) -> Option<Vec<SetData>> {
|
fn get_event_sets(event: EventId, auth: &str) -> Option<Vec<SetData>> {
|
||||||
|
|
Loading…
Reference in a new issue