improved type aliasing

release/4.3a0
Varun Agrawal 2024-10-08 23:19:20 -04:00
parent 8e29d57251
commit 498079777d
2 changed files with 6 additions and 5 deletions

View File

@ -24,7 +24,7 @@
namespace gtsam {
using Y = HybridGaussianProductFactor::Y;
using Y = GaussianFactorGraphValuePair;
/* *******************************************************************************/
static Y add(const Y& y1, const Y& y2) {

View File

@ -26,12 +26,13 @@ namespace gtsam {
class HybridGaussianFactor;
using GaussianFactorGraphValuePair = std::pair<GaussianFactorGraph, double>;
/// Alias for DecisionTree of GaussianFactorGraphs and their scalar sums
class GTSAM_EXPORT HybridGaussianProductFactor
: public DecisionTree<Key, std::pair<GaussianFactorGraph, double>> {
: public DecisionTree<Key, GaussianFactorGraphValuePair> {
public:
using Y = std::pair<GaussianFactorGraph, double>;
using Base = DecisionTree<Key, Y>;
using Base = DecisionTree<Key, GaussianFactorGraphValuePair>;
/// @name Constructors
/// @{
@ -46,7 +47,7 @@ class GTSAM_EXPORT HybridGaussianProductFactor
*/
template <class FACTOR>
HybridGaussianProductFactor(const std::shared_ptr<FACTOR>& factor)
: Base(Y{GaussianFactorGraph{factor}, 0.0}) {}
: Base(GaussianFactorGraphValuePair{GaussianFactorGraph{factor}, 0.0}) {}
/**
* @brief Construct from DecisionTree