ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
ProbCache.cpp File Reference

Cache of compiled d-DNNFs and folding of independent parts (implementation). More...

#include "ProbCache.h"
#include "provsql_utils.h"
#include <algorithm>
#include <cassert>
#include <numeric>
Include dependency graph for ProbCache.cpp:

Go to the source code of this file.

Namespaces

namespace  provsql

Functions

bool provsql::probCacheEligible (const BooleanCircuit &c, gate_t root)
 Whether the circuit below root is one the cache and the fold handle: AND, OR and NOT gates over inputs that carry a UUID.
double provsql::probFoldedProbability (const BooleanCircuit &c, gate_t root, const ProbFoldEval &eval)
 Probability of the circuit below root, folding the independent groups of AND and OR gates from the root down and leaving the rest to eval.
double provsql::probCachedProbability (const BooleanCircuit &c, gate_t root, const ProbCacheCompileFn &compile, bool *ran_compiler=nullptr, const ProbCacheOptions &options=ProbCacheOptions())
 Probability of the circuit below root through the fold and the cache.

Detailed Description

Cache of compiled d-DNNFs and folding of independent parts (implementation).

Definition in file ProbCache.cpp.