![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Registry of ProbabilityMethod objects.
More...
#include "ProbabilityMethod.h"
Public Member Functions | |
| void | registerMethod (std::unique_ptr< ProbabilityMethod > m) |
| const ProbabilityMethod * | byName (const std::string &name) const |
Exact match on name(); nullptr if absent. | |
| double | chooseAndRun (EvalContext &ctx, const Tolerance &tol) const |
Run the auto-chooser for tol: the portfolio methods admissible for the tolerance and applicable, sorted cheapest-first by estimatedCost and tried until one succeeds. | |
| dDNNF | chooseAndBuildDD (EvalContext &ctx, const Tolerance &tol) const |
The d-DNNF analogue of chooseAndRun: cost-select among the producesDD() portfolio (interpret-as-dd / tree-decomposition / compilation) with the same uniform-cost search and speculative budget, and return the chosen d-DNNF artifact (rather than a probability). | |
Static Public Member Functions | |
| static const MethodCatalog & | instance () |
| The process-wide catalog, lazily populated with the built-in methods. | |
Private Attributes | |
| std::vector< std::unique_ptr< ProbabilityMethod > > | methods_ |
Registry of ProbabilityMethod objects.
Mirrors the external-tool registry: adding a method is a new subclass plus one registerMethod call – the dispatcher never changes (open/closed).
Definition at line 176 of file ProbabilityMethod.h.
| const ProbabilityMethod * provsql::MethodCatalog::byName | ( | const std::string & | name | ) | const |
Exact match on name(); nullptr if absent.
Definition at line 1633 of file probability_evaluate.cpp.

| dDNNF provsql::MethodCatalog::chooseAndBuildDD | ( | EvalContext & | ctx, |
| const Tolerance & | tol ) const |
The d-DNNF analogue of chooseAndRun: cost-select among the producesDD() portfolio (interpret-as-dd / tree-decomposition / compilation) with the same uniform-cost search and speculative budget, and return the chosen d-DNNF artifact (rather than a probability).
This is the makeDD route optimizer – the same selection the probability chooser makes among these routes, surfaced for the d-D-artifact callers.
Definition at line 1785 of file probability_evaluate.cpp.


| double provsql::MethodCatalog::chooseAndRun | ( | EvalContext & | ctx, |
| const Tolerance & | tol ) const |
Run the auto-chooser for tol: the portfolio methods admissible for the tolerance and applicable, sorted cheapest-first by estimatedCost and tried until one succeeds.
The costliest method's exception propagates (the portfolio is exhausted).
Definition at line 1770 of file probability_evaluate.cpp.


|
static |
The process-wide catalog, lazily populated with the built-in methods.
Definition at line 1800 of file probability_evaluate.cpp.


| void provsql::MethodCatalog::registerMethod | ( | std::unique_ptr< ProbabilityMethod > | m | ) |
Definition at line 1607 of file probability_evaluate.cpp.

|
private |
Definition at line 201 of file ProbabilityMethod.h.