functional STL magic
parent
d234365d53
commit
715dc4474d
|
@ -13,6 +13,8 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <boost/tuple/tuple.hpp>
|
||||||
#include <colamd/colamd.h>
|
#include <colamd/colamd.h>
|
||||||
|
@ -110,10 +112,9 @@ void FactorGraph<Factor>::push_back(const FactorGraph<Factor>& factors) {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
template<class Factor>
|
template<class Factor>
|
||||||
Ordering FactorGraph<Factor>::keys() const {
|
Ordering FactorGraph<Factor>::keys() const {
|
||||||
string key;
|
|
||||||
Ordering keys;
|
Ordering keys;
|
||||||
list<int> indices_key;
|
transform(indices_.begin(), indices_.end(),
|
||||||
FOREACH_PAIR(key, indices_key, indices_) keys.push_back(key);
|
back_inserter(keys), _Select1st<Indices::value_type>());
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue