Added testable functions to GenericMultifrontalSolver and SymbolicMultifrontalSolver
parent
835d1d6b50
commit
6f58726a21
|
|
@ -39,6 +39,22 @@ namespace gtsam {
|
|||
structure_(variableIndex), junctionTree_(new JT(*graph, *structure_)) {
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class F, class JT>
|
||||
void GenericMultifrontalSolver<F, JT>::print(const std::string& s) const {
|
||||
this->structure_->print(s + " structure:\n");
|
||||
this->junctionTree_->print(s + " jtree:");
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class F, class JT>
|
||||
bool GenericMultifrontalSolver<F, JT>::equals(
|
||||
const GenericMultifrontalSolver& expected, double tol) const {
|
||||
if (!this->structure_->equals(*expected.structure_, tol)) return false;
|
||||
if (!this->junctionTree_->equals(*expected.junctionTree_, tol)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class F, class JT>
|
||||
void GenericMultifrontalSolver<F, JT>::replaceFactors(const sharedGraph& graph) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,17 @@ namespace gtsam {
|
|||
GenericMultifrontalSolver(const sharedGraph& factorGraph,
|
||||
const VariableIndex::shared_ptr& variableIndex);
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
/// @name Testable
|
||||
/// @{
|
||||
|
||||
/** Print to cout */
|
||||
void print(const std::string& name = "GenericMultifrontalSolver: ") const;
|
||||
|
||||
/** Test whether is equal to another */
|
||||
bool equals(const GenericMultifrontalSolver& other, double tol = 1e-9) const;
|
||||
|
||||
/// @}
|
||||
/// @name Standard Interface
|
||||
/// @{
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ namespace gtsam {
|
|||
SymbolicMultifrontalSolver(const SymbolicFactorGraph::shared_ptr& factorGraph,
|
||||
const VariableIndex::shared_ptr& variableIndex) : Base(factorGraph, variableIndex) {};
|
||||
|
||||
/** Print to cout */
|
||||
void print(const std::string& name = "SymbolicMultifrontalSolver: ") const { Base::print(name); };
|
||||
|
||||
/** Test whether is equal to another */
|
||||
bool equals(const SymbolicMultifrontalSolver& other, double tol = 1e-9) const { return Base::equals(other, tol); };
|
||||
|
||||
/**
|
||||
* Eliminate the factor graph sequentially. Uses a column elimination tree
|
||||
* to recursively eliminate.
|
||||
|
|
|
|||
Loading…
Reference in New Issue