1
0
mirror of https://github.com/ellmau/adf-obdd.git synced 2025-12-19 09:29:36 +01:00

ADD API function for accessing var_depencies

This commit is contained in:
Stefan Ellmauthaler 2022-03-04 15:03:02 +01:00
parent e4f67261b3
commit f6ae495700
Failed to extract signature

View File

@ -2,7 +2,6 @@
pub mod vectorize;
use crate::datatypes::*;
use serde::{Deserialize, Serialize};
#[cfg(feature = "HashSet")]
use std::collections::HashSet;
use std::{cell::RefCell, cmp::min, collections::HashMap, fmt::Display};
@ -211,6 +210,8 @@ impl Bdd {
}
/// Computes the number of counter-models and models for a given BDD-tree
///
/// Use the flag `_memoization` to choose between using the memoization approach or not. (This flag does nothing if the feature `adhoccounting` is used)
pub fn models(&self, term: Term, _memoization: bool) -> ModelCounts {
#[cfg(feature = "adhoccounting")]
{
@ -314,6 +315,15 @@ impl Bdd {
}
});
}
pub fn var_depencies(self, tree: Term) -> HashSet<Var> {
#[cfg(feature = "variablelist")]
{
return self.var_deps[tree.value()].clone();
}
HashSet::new()
// TODO!
}
}
#[cfg(test)]