diff --git a/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherDL.cpp b/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherDL.cpp index ca6a89380..0b91644e2 100644 --- a/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherDL.cpp +++ b/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherDL.cpp @@ -73,7 +73,7 @@ Values BatchOptimize(const NonlinearFactorGraph& graph, const Values& theta, int /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, equals ) +TEST( ConcurrentIncrementalSmootherDL, equals ) { // TODO: Test 'equals' more vigorously @@ -99,7 +99,7 @@ TEST( ConcurrentIncrementalSmoother, equals ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getFactors ) +TEST( ConcurrentIncrementalSmootherDL, getFactors ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -150,7 +150,7 @@ TEST( ConcurrentIncrementalSmoother, getFactors ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getLinearizationPoint ) +TEST( ConcurrentIncrementalSmootherDL, getLinearizationPoint ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -201,19 +201,19 @@ TEST( ConcurrentIncrementalSmoother, getLinearizationPoint ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getOrdering ) +TEST( ConcurrentIncrementalSmootherDL, getOrdering ) { // TODO: Think about how to check ordering... } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getDelta ) +TEST( ConcurrentIncrementalSmootherDL, getDelta ) { // TODO: Think about how to check ordering... } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, calculateEstimate ) +TEST( ConcurrentIncrementalSmootherDL, calculateEstimate ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -287,7 +287,7 @@ TEST( ConcurrentIncrementalSmoother, calculateEstimate ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, update_empty ) +TEST( ConcurrentIncrementalSmootherDL, update_empty ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -300,7 +300,7 @@ TEST( ConcurrentIncrementalSmoother, update_empty ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, update_multiple ) +TEST( ConcurrentIncrementalSmootherDL, update_multiple ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -358,7 +358,7 @@ TEST( ConcurrentIncrementalSmoother, update_multiple ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_empty ) +TEST( ConcurrentIncrementalSmootherDL, synchronize_empty ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -388,7 +388,7 @@ TEST( ConcurrentIncrementalSmoother, synchronize_empty ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_1 ) +TEST( ConcurrentIncrementalSmootherDL, synchronize_1 ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -450,7 +450,7 @@ TEST( ConcurrentIncrementalSmoother, synchronize_1 ) /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_2 ) +TEST( ConcurrentIncrementalSmootherDL, synchronize_2 ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -531,7 +531,7 @@ TEST( ConcurrentIncrementalSmoother, synchronize_2 ) /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_3 ) +TEST( ConcurrentIncrementalSmootherDL, synchronize_3 ) { // Create a set of optimizer parameters ISAM2Params parameters; diff --git a/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherGN.cpp b/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherGN.cpp index 5c608b2cb..bdca9238c 100644 --- a/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherGN.cpp +++ b/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherGN.cpp @@ -73,7 +73,7 @@ Values BatchOptimize(const NonlinearFactorGraph& graph, const Values& theta, int /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, equals ) +TEST( ConcurrentIncrementalSmootherGN, equals ) { // TODO: Test 'equals' more vigorously @@ -99,7 +99,7 @@ TEST( ConcurrentIncrementalSmoother, equals ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getFactors ) +TEST( ConcurrentIncrementalSmootherGN, getFactors ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -150,7 +150,7 @@ TEST( ConcurrentIncrementalSmoother, getFactors ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getLinearizationPoint ) +TEST( ConcurrentIncrementalSmootherGN, getLinearizationPoint ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -201,19 +201,19 @@ TEST( ConcurrentIncrementalSmoother, getLinearizationPoint ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getOrdering ) +TEST( ConcurrentIncrementalSmootherGN, getOrdering ) { // TODO: Think about how to check ordering... } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, getDelta ) +TEST( ConcurrentIncrementalSmootherGN, getDelta ) { // TODO: Think about how to check ordering... } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, calculateEstimate ) +TEST( ConcurrentIncrementalSmootherGN, calculateEstimate ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -287,7 +287,7 @@ TEST( ConcurrentIncrementalSmoother, calculateEstimate ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, update_empty ) +TEST( ConcurrentIncrementalSmootherGN, update_empty ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -300,7 +300,7 @@ TEST( ConcurrentIncrementalSmoother, update_empty ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, update_multiple ) +TEST( ConcurrentIncrementalSmootherGN, update_multiple ) { // Create a Concurrent Batch Smoother ISAM2Params parameters; @@ -358,7 +358,7 @@ TEST( ConcurrentIncrementalSmoother, update_multiple ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_empty ) +TEST( ConcurrentIncrementalSmootherGN, synchronize_empty ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -388,7 +388,7 @@ TEST( ConcurrentIncrementalSmoother, synchronize_empty ) } /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_1 ) +TEST( ConcurrentIncrementalSmootherGN, synchronize_1 ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -450,7 +450,7 @@ TEST( ConcurrentIncrementalSmoother, synchronize_1 ) /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_2 ) +TEST( ConcurrentIncrementalSmootherGN, synchronize_2 ) { // Create a set of optimizer parameters ISAM2Params parameters; @@ -531,7 +531,7 @@ TEST( ConcurrentIncrementalSmoother, synchronize_2 ) /* ************************************************************************* */ -TEST( ConcurrentIncrementalSmoother, synchronize_3 ) +TEST( ConcurrentIncrementalSmootherGN, synchronize_3 ) { // Create a set of optimizer parameters ISAM2Params parameters; diff --git a/gtsam_unstable/slam/BetweenFactorEM.h b/gtsam_unstable/slam/BetweenFactorEM.h index 9c3736387..9eb253f22 100644 --- a/gtsam_unstable/slam/BetweenFactorEM.h +++ b/gtsam_unstable/slam/BetweenFactorEM.h @@ -165,17 +165,17 @@ namespace gtsam { Vector err_wh_eq; err_wh_eq.resize(err_wh_inlier.rows()*2); - err_wh_eq << sqrt(p_inlier) * err_wh_inlier.array() , sqrt(p_outlier) * err_wh_outlier.array(); + err_wh_eq << std::sqrt(p_inlier) * err_wh_inlier.array() , std::sqrt(p_outlier) * err_wh_outlier.array(); if (H){ // stack Jacobians for the two indicators for each of the key - Matrix H1_inlier = sqrt(p_inlier)*model_inlier_->Whiten(H1); - Matrix H1_outlier = sqrt(p_outlier)*model_outlier_->Whiten(H1); + Matrix H1_inlier = std::sqrt(p_inlier)*model_inlier_->Whiten(H1); + Matrix H1_outlier = std::sqrt(p_outlier)*model_outlier_->Whiten(H1); Matrix H1_aug = gtsam::stack(2, &H1_inlier, &H1_outlier); - Matrix H2_inlier = sqrt(p_inlier)*model_inlier_->Whiten(H2); - Matrix H2_outlier = sqrt(p_outlier)*model_outlier_->Whiten(H2); + Matrix H2_inlier = std::sqrt(p_inlier)*model_inlier_->Whiten(H2); + Matrix H2_outlier = std::sqrt(p_outlier)*model_outlier_->Whiten(H2); Matrix H2_aug = gtsam::stack(2, &H2_inlier, &H2_outlier); (*H)[0].resize(H1_aug.rows(),H1_aug.cols()); diff --git a/gtsam_unstable/slam/tests/testBetweenFactorEM.cpp b/gtsam_unstable/slam/tests/testBetweenFactorEM.cpp index 08cbb856c..c7772a125 100644 --- a/gtsam_unstable/slam/tests/testBetweenFactorEM.cpp +++ b/gtsam_unstable/slam/tests/testBetweenFactorEM.cpp @@ -104,7 +104,7 @@ TEST( BetweenFactorEM, EvaluateError) Vector actual_err_wh_outlier = Vector_(3, actual_err_wh[3], actual_err_wh[4], actual_err_wh[5]); // in case of inlier, inlier-mode whitented error should be dominant - assert(actual_err_wh_inlier.norm() > 1000.0*actual_err_wh_outlier.norm()); + CHECK(actual_err_wh_inlier.norm() > 1000.0*actual_err_wh_outlier.norm()); cout << "Inlier test. norm of actual_err_wh_inlier, actual_err_wh_outlier: "<