![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
d-DNNF circuit operations and evaluation algorithms. More...
#include "dDNNF.h"#include "Circuit.hpp"#include <unordered_map>#include <stack>#include <variant>#include <cassert>#include <algorithm>#include <numeric>
Go to the source code of this file.
Functions | |
| static long long | comb (unsigned n, unsigned k) |
| Compute the binomial coefficient C(n, k). | |
d-DNNF circuit operations and evaluation algorithms.
Implements all methods of dDNNF declared in dDNNF.h:
vars(): set of reachable input (IN) gates.makeSmooth(): smooth the circuit so every OR gate's children mention the same variable set.makeGatesBinary(): binarise n-ary AND/OR gates.simplify(): constant propagation.condition() / conditionAndSimplify(): fix one variable.probabilityEvaluation(): exact probability in linear time.shapley() / banzhaf(): power index computation.topological_order(): DFS topological sort.The private helpers shapley_delta() and shapley_alpha() implement the polynomial-time Shapley-value algorithm for d-DNNFs.
Definition in file dDNNF.cpp.
|
static |
Compute the binomial coefficient C(n, k).
| n | Total number of elements. |
| k | Number of elements to choose; must satisfy k ≤ n. |
Definition at line 400 of file dDNNF.cpp.

