diff --git a/lib/src/adf.rs b/lib/src/adf.rs index 95eee11..2b568eb 100644 --- a/lib/src/adf.rs +++ b/lib/src/adf.rs @@ -32,8 +32,11 @@ use self::heuristics::Heuristic; /// /// Please note that due to the nature of the underlying reduced and ordered Bdd the concept of a [`Term`][crate::datatypes::Term] represents one (sub) formula as well as truth-values. pub struct Adf { + /// The ordering or the variables in the ADF including a dictionary for the statements pub ordering: VarContainer, + /// The underlying binary decision diagram that respresents the ADF pub bdd: Bdd, + /// Acceptance Conditions for the ADF pub ac: Vec, #[serde(skip, default = "Adf::default_rng")] rng: RefCell, @@ -63,6 +66,7 @@ impl Default for Adf { } impl Adf { + /// Instntiates an ADF based on the publically available data pub fn from_ord_nodes_and_ac( ordering: VarContainer, bdd_nodes: Vec, diff --git a/lib/src/datatypes/adf.rs b/lib/src/datatypes/adf.rs index 5ddba5e..0940704 100644 --- a/lib/src/datatypes/adf.rs +++ b/lib/src/datatypes/adf.rs @@ -26,6 +26,7 @@ impl Default for VarContainer { } impl VarContainer { + /// Create [VarContainer] from its components pub fn from_parser( names: Arc>>, mapping: Arc>>, @@ -51,10 +52,12 @@ impl VarContainer { .and_then(|name| name.get(var.value()).cloned()) } + /// Return ordered names from [VarContainer] pub fn names(&self) -> Arc>> { Arc::clone(&self.names) } + /// Return map from names to indices in [VarContainer] pub fn mappings(&self) -> Arc>> { Arc::clone(&self.mapping) } diff --git a/lib/src/obdd.rs b/lib/src/obdd.rs index f8313bf..a5aae9d 100644 --- a/lib/src/obdd.rs +++ b/lib/src/obdd.rs @@ -13,6 +13,7 @@ use std::{cell::RefCell, cmp::min, collections::HashMap, fmt::Display}; /// Each roBDD is identified by its corresponding [`Term`], which implicitly identifies the root node of a roBDD. #[derive(Debug, Serialize, Deserialize)] pub struct Bdd { + /// The nodes of the [Bdd] with their edges pub nodes: Vec, #[cfg(feature = "variablelist")] #[serde(skip)] @@ -100,6 +101,7 @@ impl Bdd { RefCell::new(HashMap::new()) } + /// Construct [Bdd] from a list of nodes by adding one after the other pub fn from_nodes(nodes: Vec) -> Self { let mut bdd = Self::new();