improved type aliasing
parent
8e29d57251
commit
498079777d
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
using Y = HybridGaussianProductFactor::Y;
|
using Y = GaussianFactorGraphValuePair;
|
||||||
|
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
static Y add(const Y& y1, const Y& y2) {
|
static Y add(const Y& y1, const Y& y2) {
|
||||||
|
|
|
@ -26,12 +26,13 @@ namespace gtsam {
|
||||||
|
|
||||||
class HybridGaussianFactor;
|
class HybridGaussianFactor;
|
||||||
|
|
||||||
|
using GaussianFactorGraphValuePair = std::pair<GaussianFactorGraph, double>;
|
||||||
|
|
||||||
/// Alias for DecisionTree of GaussianFactorGraphs and their scalar sums
|
/// Alias for DecisionTree of GaussianFactorGraphs and their scalar sums
|
||||||
class GTSAM_EXPORT HybridGaussianProductFactor
|
class GTSAM_EXPORT HybridGaussianProductFactor
|
||||||
: public DecisionTree<Key, std::pair<GaussianFactorGraph, double>> {
|
: public DecisionTree<Key, GaussianFactorGraphValuePair> {
|
||||||
public:
|
public:
|
||||||
using Y = std::pair<GaussianFactorGraph, double>;
|
using Base = DecisionTree<Key, GaussianFactorGraphValuePair>;
|
||||||
using Base = DecisionTree<Key, Y>;
|
|
||||||
|
|
||||||
/// @name Constructors
|
/// @name Constructors
|
||||||
/// @{
|
/// @{
|
||||||
|
@ -46,7 +47,7 @@ class GTSAM_EXPORT HybridGaussianProductFactor
|
||||||
*/
|
*/
|
||||||
template <class FACTOR>
|
template <class FACTOR>
|
||||||
HybridGaussianProductFactor(const std::shared_ptr<FACTOR>& factor)
|
HybridGaussianProductFactor(const std::shared_ptr<FACTOR>& factor)
|
||||||
: Base(Y{GaussianFactorGraph{factor}, 0.0}) {}
|
: Base(GaussianFactorGraphValuePair{GaussianFactorGraph{factor}, 0.0}) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Construct from DecisionTree
|
* @brief Construct from DecisionTree
|
||||||
|
|
Loading…
Reference in New Issue