pub struct Xgcf {
pub node_type: Vec<XgcfNodeType>,
pub child_offsets: Vec<u32>,
pub child_indices: Vec<u32>,
pub lit: Vec<i32>,
pub decision_var: Vec<u32>,
pub decision_child_false: Vec<u32>,
pub decision_child_true: Vec<u32>,
pub roots: Vec<u32>,
pub level_offsets: Vec<u32>,
pub level_nodes: Vec<u32>,
}Fields§
§node_type: Vec<XgcfNodeType>§child_offsets: Vec<u32>§child_indices: Vec<u32>§lit: Vec<i32>§decision_var: Vec<u32>§decision_child_false: Vec<u32>§decision_child_true: Vec<u32>§roots: Vec<u32>§level_offsets: Vec<u32>§level_nodes: Vec<u32>Implementations§
Source§impl Xgcf
impl Xgcf
pub fn from_ddnnf(ddnnf: &DecisionDnnf) -> Result<Self>
Sourcepub fn smooth_random_vars(&self, is_random_var: &[bool]) -> Result<Self>
pub fn smooth_random_vars(&self, is_random_var: &[bool]) -> Result<Self>
Return a semantically equivalent circuit that is smooth with respect to
the subset of variables marked as random in is_random_var.
Smoothness guarantees that, for any OR/DECISION node, all branches mention the same set of random variables. This makes WMC evaluation and gradients correct even when evidence/queries force random variables in non-smooth Decision-DNNF outputs.
pub fn eval_log_wmc<F>(&self, var_log_weights: F) -> Result<f64>
pub fn eval_log_wmc_and_grads( &self, var_log_weights: &[(f64, f64)], ) -> Result<(f64, Vec<f64>, Vec<f64>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Xgcf
impl RefUnwindSafe for Xgcf
impl Send for Xgcf
impl Sync for Xgcf
impl Unpin for Xgcf
impl UnsafeUnpin for Xgcf
impl UnwindSafe for Xgcf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more