More things, more tests
This commit is contained in:
@@ -4,6 +4,7 @@ use crate::{
|
||||
agent::Agent, game::Game, gaussian::Gaussian, player::Player, tuple_gt, tuple_max, N_INF,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Skill {
|
||||
pub(crate) forward: Gaussian,
|
||||
backward: Gaussian,
|
||||
@@ -52,7 +53,8 @@ impl Event {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct Batch {
|
||||
#[derive(Debug)]
|
||||
pub struct Batch {
|
||||
pub(crate) events: Vec<Event>,
|
||||
pub(crate) skills: HashMap<String, Skill>,
|
||||
pub(crate) time: u64,
|
||||
@@ -220,7 +222,7 @@ impl Batch {
|
||||
self.iteration(from, agents);
|
||||
}
|
||||
|
||||
pub(crate) fn posterior(&self, agent: &str) -> Gaussian {
|
||||
pub fn posterior(&self, agent: &str) -> Gaussian {
|
||||
let skill = &self.skills[agent];
|
||||
|
||||
skill.likelihood * skill.backward * skill.forward
|
||||
|
||||
Reference in New Issue
Block a user