Go to the documentation of this file.
67 for (
const auto& frontalVals : allPosbValues) {
68 double pValueS = pFS(frontalVals);
78 (*values)[
j] = mpe[
j];
109 for (
auto&& conditional :
bayesNet) {
110 if (
auto lookupTable =
111 std::dynamic_pointer_cast<DiscreteLookupTable>(conditional)) {
114 throw std::runtime_error(
115 "DiscreteFactorGraph::maxProduct: Expected look up table.");
126 (*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 Sun Dec 22 2024 04:11:28