replace boost::function with std::function
parent
f62a1b0b81
commit
aab6af3368
|
@ -36,8 +36,6 @@
|
||||||
#include <gtsam/base/OptionalJacobian.h>
|
#include <gtsam/base/OptionalJacobian.h>
|
||||||
#include <gtsam/basis/Basis.h>
|
#include <gtsam/basis/Basis.h>
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -134,7 +132,7 @@ class GTSAM_EXPORT Chebyshev2 : public Basis<Chebyshev2> {
|
||||||
* Create matrix of values at Chebyshev points given vector-valued function.
|
* Create matrix of values at Chebyshev points given vector-valued function.
|
||||||
*/
|
*/
|
||||||
template <size_t M>
|
template <size_t M>
|
||||||
static Matrix matrix(boost::function<Eigen::Matrix<double, M, 1>(double)> f,
|
static Matrix matrix(std::function<Eigen::Matrix<double, M, 1>(double)> f,
|
||||||
size_t N, double a = -1, double b = 1) {
|
size_t N, double a = -1, double b = 1) {
|
||||||
Matrix Xmat(M, N);
|
Matrix Xmat(M, N);
|
||||||
for (size_t j = 0; j < N; j++) {
|
for (size_t j = 0; j < N; j++) {
|
||||||
|
|
|
@ -118,7 +118,7 @@ TEST(Chebyshev2, InterpolateVector) {
|
||||||
EXPECT(assert_equal(expected, fx(X, actualH), 1e-9));
|
EXPECT(assert_equal(expected, fx(X, actualH), 1e-9));
|
||||||
|
|
||||||
// Check derivative
|
// Check derivative
|
||||||
boost::function<Vector2(ParameterMatrix<2>)> f = boost::bind(
|
std::function<Vector2(ParameterMatrix<2>)> f = boost::bind(
|
||||||
&Chebyshev2::VectorEvaluationFunctor<2>::operator(), fx, _1, boost::none);
|
&Chebyshev2::VectorEvaluationFunctor<2>::operator(), fx, _1, boost::none);
|
||||||
Matrix numericalH =
|
Matrix numericalH =
|
||||||
numericalDerivative11<Vector2, ParameterMatrix<2>, 2 * N>(f, X);
|
numericalDerivative11<Vector2, ParameterMatrix<2>, 2 * N>(f, X);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <gtsam/base/types.h>
|
#include <gtsam/base/types.h>
|
||||||
#include <gtsam/discrete/Assignment.h>
|
#include <gtsam/discrete/Assignment.h>
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include <gtsam/base/numericalDerivative.h>
|
#include <gtsam/base/numericalDerivative.h>
|
||||||
#include <gtsam/geometry/Point3.h>
|
#include <gtsam/geometry/Point3.h>
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
using namespace gtsam;
|
using namespace gtsam;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue