Skip to content

Commit

Permalink
[pyschlandals] get distribution values
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDubray committed Aug 14, 2023
1 parent f63a97e commit 01b316c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyschlandals/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ impl PyDac {
self.nodes[node].distribution_input[index]
}

pub fn get_distribution_number_value(&self, distribution: usize) -> usize {
self.distributions[distribution].probabilities.len()
}

pub fn get_distribution_probability(&self, distribution: usize, probability_index: usize) -> f64 {
self.distributions[distribution].probabilities[probability_index]
}

pub fn to_graphviz(&self, path: String) {

let mut out = String::new();
Expand Down

0 comments on commit 01b316c

Please sign in to comment.