keep using DecisionTreeFactor for DiscreteConditional
parent
853241c6d0
commit
199c0a0f24
|
|
@ -201,7 +201,7 @@ DiscreteConditional::shared_ptr DiscreteConditional::choose(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
DiscreteFactor::shared_ptr DiscreteConditional::likelihood(
|
DecisionTreeFactor::shared_ptr DiscreteConditional::likelihood(
|
||||||
const DiscreteValues& frontalValues) const {
|
const DiscreteValues& frontalValues) const {
|
||||||
// Get the big decision tree with all the levels, and then go down the
|
// Get the big decision tree with all the levels, and then go down the
|
||||||
// branches based on the value of the frontal variables.
|
// branches based on the value of the frontal variables.
|
||||||
|
|
@ -226,7 +226,7 @@ DiscreteFactor::shared_ptr DiscreteConditional::likelihood(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************************************************************/
|
/* ****************************************************************************/
|
||||||
DiscreteFactor::shared_ptr DiscreteConditional::likelihood(
|
DecisionTreeFactor::shared_ptr DiscreteConditional::likelihood(
|
||||||
size_t frontal) const {
|
size_t frontal) const {
|
||||||
if (nrFrontals() != 1)
|
if (nrFrontals() != 1)
|
||||||
throw std::invalid_argument(
|
throw std::invalid_argument(
|
||||||
|
|
|
||||||
|
|
@ -188,11 +188,11 @@ class GTSAM_EXPORT DiscreteConditional
|
||||||
shared_ptr choose(const DiscreteValues& given) const;
|
shared_ptr choose(const DiscreteValues& given) const;
|
||||||
|
|
||||||
/** Convert to a likelihood factor by providing value before bar. */
|
/** Convert to a likelihood factor by providing value before bar. */
|
||||||
DiscreteFactor::shared_ptr likelihood(
|
DecisionTreeFactor::shared_ptr likelihood(
|
||||||
const DiscreteValues& frontalValues) const;
|
const DiscreteValues& frontalValues) const;
|
||||||
|
|
||||||
/** Single variable version of likelihood. */
|
/** Single variable version of likelihood. */
|
||||||
DiscreteFactor::shared_ptr likelihood(size_t frontal) const;
|
DecisionTreeFactor::shared_ptr likelihood(size_t frontal) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sample
|
* sample
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue