![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Boolean circuit implementation and evaluation algorithms. More...
#include "BooleanCircuit.h"#include "Circuit.hpp"#include <type_traits>#include <unistd.h>#include <math.h>#include <cassert>#include <string>#include <fstream>#include <sstream>#include <cstdlib>#include <iostream>#include <vector>#include <stack>#include <boost/archive/text_oarchive.hpp>#include <boost/archive/text_iarchive.hpp>#include "dDNNFTreeDecompositionBuilder.h"#include "provsql_utils.h"#include "utils/elog.h"#include "provsql_error.h"
Go to the source code of this file.
Functions | |
| static constexpr bool | almost_equals (double a, double b) |
| Check whether two double values are approximately equal. | |
Boolean circuit implementation and evaluation algorithms.
Implements the methods declared in BooleanCircuit.h, including:
addGate, setGate, setInfo, setProb).compilation() (external tools), interpretAsDD() (direct from circuit structure), makeDD() (dispatcher).rewriteMultivaluedGates(): replaces MULVAR/MULIN clusters with standard AND/OR/NOT circuits.Tseytin(): DIMACS/weighted CNF generation for model counters.exportCircuit(): serialisation in the tdkc text format.toString(): human-readable gate description.In the standalone tdkc build (when TDKC is defined) a lightweight elog() stub replaces the PostgreSQL error-reporting function.
Definition in file BooleanCircuit.cpp.
|
staticconstexpr |
Check whether two double values are approximately equal.
| a | First value. |
| b | Second value. |
true if a and b differ by less than 10× machine epsilon. Definition at line 752 of file BooleanCircuit.cpp.
