Skip to content

Commit

Permalink
Merge pull request #1232 from borglab/remove-boost-function
Browse files Browse the repository at this point in the history
Replace boost::function with std::function
  • Loading branch information
varunagrawal authored Jul 4, 2022
2 parents f62a1b0 + b0369c4 commit 33c9a34
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions gtsam/basis/Chebyshev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include <gtsam/base/OptionalJacobian.h>
#include <gtsam/basis/Basis.h>

#include <boost/function.hpp>

namespace gtsam {

/**
Expand Down Expand Up @@ -134,7 +132,7 @@ class GTSAM_EXPORT Chebyshev2 : public Basis<Chebyshev2> {
* Create matrix of values at Chebyshev points given vector-valued function.
*/
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) {
Matrix Xmat(M, N);
for (size_t j = 0; j < N; j++) {
Expand Down
2 changes: 1 addition & 1 deletion gtsam/basis/tests/testChebyshev2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ TEST(Chebyshev2, InterpolateVector) {
EXPECT(assert_equal(expected, fx(X, actualH), 1e-9));

// 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);
Matrix numericalH =
numericalDerivative11<Vector2, ParameterMatrix<2>, 2 * N>(f, X);
Expand Down
2 changes: 1 addition & 1 deletion gtsam/discrete/DecisionTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <gtsam/base/types.h>
#include <gtsam/discrete/Assignment.h>

#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <functional>
#include <iostream>
#include <map>
Expand Down
1 change: 1 addition & 0 deletions gtsam/geometry/Point3.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <gtsam/base/VectorSpace.h>
#include <gtsam/base/Vector.h>
#include <gtsam/dllexport.h>
#include <gtsam/base/VectorSerialization.h>
#include <boost/serialization/nvp.hpp>
#include <numeric>

Expand Down
2 changes: 0 additions & 2 deletions gtsam/geometry/tests/testPoint3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include <gtsam/base/numericalDerivative.h>
#include <gtsam/geometry/Point3.h>

#include <boost/function.hpp>

using namespace std::placeholders;
using namespace gtsam;

Expand Down

0 comments on commit 33c9a34

Please sign in to comment.