Go to the documentation of this file.
66 for (
const auto& frontalVals : allPosbValues) {
67 double pValueS = pFS(frontalVals);
77 (*values)[
j] = mpe[
j];
108 for (
auto&& conditional :
bayesNet) {
109 if (
auto lookupTable =
110 std::dynamic_pointer_cast<DiscreteLookupTable>(conditional)) {
113 throw std::runtime_error(
114 "DiscreteFactorGraph::maxProduct: Expected look up table.");
125 (*it)->argmaxInPlace(&
result);
size_t argmax(const DiscreteValues &parentsValues) const
return assignment for single frontal variable that maximizes value.
void argmaxInPlace(DiscreteValues *parentsValues) const
Calculate assignment for frontal variables that maximizes value.
const KeyFormatter & formatter
DecisionTreeFactor ::const_iterator endParents() const
const HybridBayesNet bayesNet
DecisionTreeFactor ::const_iterator endFrontals() const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
std::vector< DiscreteValues > frontalAssignments() const
Return all assignments for frontal variables.
DecisionTreeFactor ::const_iterator beginFrontals() const
size_t nrFrontals() const
DecisionTreeFactor ::const_iterator beginParents() const
size_t cardinality(Key j) const
Key firstFrontalKey() const
KeyVector::const_iterator const_iterator
Const iterator over keys.
std::reverse_iterator< Iterator > make_reverse_iterator(Iterator i)
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
void print(const std::string &s="", const typename Base::LabelFormatter &labelFormatter=&DefaultFormatter) const
print method customized to value type double.
const_iterator end() const
const_iterator begin() const
shared_ptr choose(const DiscreteValues &given) const
< DiscreteValues version
DiscreteValues argmax(DiscreteValues given=DiscreteValues()) const
argmax by back-substitution, optionally given certain variables.
void print(const std::string &s="Discrete Lookup Table: ", const KeyFormatter &formatter=DefaultKeyFormatter) const override
GTSAM-style print.
std::uint64_t Key
Integer nonlinear key type.
static DiscreteLookupDAG FromBayesNet(const DiscreteBayesNet &bayesNet)
Create from BayesNet with LookupTables.
Frontals frontals() const
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:13