Fixes to DiscreteConditional
parent
4213c5d4fd
commit
b5ea7e1ba0
|
@ -192,7 +192,14 @@ namespace gtsam {
|
|||
return sampled;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ******************************************************************************** */
|
||||
void DiscreteConditional::permuteWithInverse(const Permutation& inversePermutation){
|
||||
IndexConditional::permuteWithInverse(inversePermutation);
|
||||
Potentials::permute(inversePermutation);
|
||||
}
|
||||
|
||||
|
||||
/* ******************************************************************************** */
|
||||
|
||||
|
|
|
@ -111,6 +111,11 @@ namespace gtsam {
|
|||
/// sample in place, stores result in partial solution
|
||||
void sampleInPlace(Values& parentsValues) const;
|
||||
|
||||
/**
|
||||
* Permutes both IndexConditional and Potentials.
|
||||
*/
|
||||
void permuteWithInverse(const Permutation& inversePermutation);
|
||||
|
||||
/// @}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue