initial stub for metis ordering
parent
9bb6beed92
commit
f447481844
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include <gtsam/inference/Ordering.h>
|
#include <gtsam/inference/Ordering.h>
|
||||||
#include <gtsam/3rdparty/CCOLAMD/Include/ccolamd.h>
|
#include <gtsam/3rdparty/CCOLAMD/Include/ccolamd.h>
|
||||||
|
#include <gtsam/3rdparty/metis-5.1.0/include/metis.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -196,6 +197,12 @@ namespace gtsam {
|
||||||
return Ordering::COLAMDConstrained(variableIndex, cmember);
|
return Ordering::COLAMDConstrained(variableIndex, cmember);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
Ordering Ordering::METIS(const VariableIndex& variableIndex)
|
||||||
|
{
|
||||||
|
gttic(Ordering_METIS);
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void Ordering::print(const std::string& str, const KeyFormatter& keyFormatter) const
|
void Ordering::print(const std::string& str, const KeyFormatter& keyFormatter) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,6 +146,14 @@ namespace gtsam {
|
||||||
return Ordering(keys);
|
return Ordering(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Compute an ordering determined by METIS from a VariableIndex
|
||||||
|
static GTSAM_EXPORT Ordering METIS(const VariableIndex& variableIndex);
|
||||||
|
|
||||||
|
template<class FACTOR>
|
||||||
|
static Ordering METIS(const FactorGraph<FACTOR>& graph){
|
||||||
|
return METIS(VariableIndex(graph)); }
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// @name Testable @{
|
/// @name Testable @{
|
||||||
|
|
|
@ -77,6 +77,11 @@ TEST(Ordering, grouped_constrained_ordering) {
|
||||||
EXPECT(assert_equal(expConstrained, actConstrained));
|
EXPECT(assert_equal(expConstrained, actConstrained));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
TEST(Ordering, metis_ordering) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
int main() { TestResult tr; return TestRegistry::runAllTests(tr); }
|
int main() { TestResult tr; return TestRegistry::runAllTests(tr); }
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
Loading…
Reference in New Issue