Fixes to DiscreteConditional

release/4.3a0
Abhijit Kundu 2012-06-07 22:54:47 +00:00
parent 4213c5d4fd
commit b5ea7e1ba0
2 changed files with 13 additions and 1 deletions

View File

@ -192,7 +192,14 @@ namespace gtsam {
return sampled;
return 0;
}
}
/* ******************************************************************************** */
void DiscreteConditional::permuteWithInverse(const Permutation& inversePermutation){
IndexConditional::permuteWithInverse(inversePermutation);
Potentials::permute(inversePermutation);
}
/* ******************************************************************************** */

View File

@ -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);
/// @}
};