← Documentation
ADS-IDAC Engine 5.0.0
manager.hpp
Go to the documentation of this file.
1#pragma once
11#include <cstdint>
12#include <vector>
13
14namespace bncore {
15
19public:
22 explicit DiscretizationManager(std::size_t max_bins_per_var = 50);
23
29 bool should_split(const Graph &graph, NodeId var) const;
30
43 void split_bin(Graph &graph, NodeId var, std::size_t state_idx);
44
45private:
46 std::size_t max_bins_per_var_;
47};
48
49} // namespace bncore
Splits states of graph variables while a per-variable bin limit allows it.
Definition: manager.hpp:18
DiscretizationManager(std::size_t max_bins_per_var=50)
Definition: manager.cpp:5
bool should_split(const Graph &graph, NodeId var) const
Tests whether a variable still has fewer states than the limit.
Definition: manager.cpp:8
void split_bin(Graph &graph, NodeId var, std::size_t state_idx)
Splits one state of a variable into two.
Definition: manager.cpp:13
std::size_t max_bins_per_var_
split_bin() is a no-op at or above this state count
Definition: manager.hpp:46
Directed graphical model over discrete variables.
Definition: graph.hpp:28
bncore::Graph, the discrete Bayesian network model: variables, their states, directed edges and condi...
std::uint32_t NodeId
Handle of a variable within one Graph.
Definition: node.hpp:20