29#include <unordered_map>
35class BatchExecutionEngine;
83 [[nodiscard]]
double probabilityOf(
const std::string &name)
const;
103 [[nodiscard]]
bool isDefined(
const std::string &name)
const;
113 std::unique_ptr<bncore::BatchExecutionEngine>
engine_;
A fault tree: nodes keyed by name, plus a designated top event.
Exact fault tree quantifier backed by a BNCore junction tree.
bool isDefined(const std::string &name) const
double probabilityOf(const std::string &name) const
Quantifier(const Quantifier &)=delete
std::unordered_map< std::string, std::size_t > var_of_node_
node name to BNCore variable id
std::vector< std::string > basicEventNames() const
Names of the basic events, in definition order.
std::unique_ptr< bncore::Graph > graph_
one binary variable per node
std::unique_ptr< bncore::BatchExecutionEngine > engine_
refers to junction_tree_
FaultTree tree_
validated private copy of the model
void setBasicEventProbability(const std::string &name, double probability)
std::unique_ptr< bncore::JunctionTree > junction_tree_
points at graph_
Quantifier(const FaultTree &tree)
double topEventProbability() const
Quantifier & operator=(const Quantifier &)=delete
Fault tree model of the faulttree library: FaultTreeError, GateType, Node, and the FaultTree containe...
constexpr std::size_t kMaxGateInputs
Largest number of inputs a single gate may have.