Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Feb 15, 2022
1 parent 42f22d2 commit 24f9858
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions gtsam/hybrid/tests/Switching.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

#include <gtsam/discrete/DiscreteDistribution.h>
#include <gtsam/hybrid/DCMixtureFactor.h>
#include <gtsam/hybrid/NonlinearHybridFactorGraph.h>
#include <gtsam/hybrid/GaussianHybridFactorGraph.h>
#include <gtsam/slam/BetweenFactor.h>
#include <gtsam/linear/NoiseModel.h>
#include <gtsam/hybrid/NonlinearHybridFactorGraph.h>
#include <gtsam/inference/Symbol.h>
#include <gtsam/linear/NoiseModel.h>
#include <gtsam/slam/BetweenFactor.h>

namespace gtsam {
using MotionModel = BetweenFactor<double>;
Expand Down Expand Up @@ -52,7 +52,7 @@ struct Switching {

// Create hybrid factor graph.
// Add a prior on X(1).
auto prior = boost::make_shared < PriorFactor < double >> (
auto prior = boost::make_shared<PriorFactor<double>>(
X(1), 0, noiseModel::Isotropic::Sigma(1, prior_sigma));
nonlinearFactorGraph.push_nonlinear(prior);

Expand All @@ -67,7 +67,7 @@ struct Switching {
// Add measurement factors
auto measurement_noise = noiseModel::Isotropic::Sigma(1, 0.1);
for (size_t k = 1; k <= K; k++) {
nonlinearFactorGraph.emplace_nonlinear < PriorFactor < double >> (
nonlinearFactorGraph.emplace_nonlinear<PriorFactor<double>>(
X(k), 1.0 * (k - 1), measurement_noise);
}

Expand All @@ -83,16 +83,16 @@ struct Switching {
}

// Create motion models for a given time step
static std::vector <MotionModel::shared_ptr> motionModels(size_t k,
double sigma = 1.0) {
static std::vector<MotionModel::shared_ptr> motionModels(size_t k,
double sigma = 1.0) {
using symbol_shorthand::M;
using symbol_shorthand::X;

auto noise_model = noiseModel::Isotropic::Sigma(1, sigma);
auto still =
boost::make_shared<MotionModel>(X(k), X(k + 1), 0.0, noise_model),
moving =
boost::make_shared<MotionModel>(X(k), X(k + 1), 1.0, noise_model);
boost::make_shared<MotionModel>(X(k), X(k + 1), 0.0, noise_model),
moving =
boost::make_shared<MotionModel>(X(k), X(k + 1), 1.0, noise_model);
return {still, moving};
}

Expand Down Expand Up @@ -121,4 +121,4 @@ struct Switching {
}
};

}
} // namespace gtsam

0 comments on commit 24f9858

Please sign in to comment.