Fixed missing copy constructor and assignment operators in Marginals
parent
510e2eacac
commit
edc4ffa683
|
@ -73,6 +73,19 @@ Matrix Marginals::marginalInformation(Key variable) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
JointMarginal::JointMarginal(const JointMarginal& other) :
|
||||||
|
blockView_(fullMatrix_) {
|
||||||
|
*this = other;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
JointMarginal& JointMarginal::operator=(const JointMarginal& rhs) {
|
||||||
|
indices_ = rhs.indices_;
|
||||||
|
blockView_.assignNoalias(rhs.blockView_);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
JointMarginal Marginals::jointMarginalCovariance(const std::vector<Key>& variables) const {
|
JointMarginal Marginals::jointMarginalCovariance(const std::vector<Key>& variables) const {
|
||||||
JointMarginal info = jointMarginalInformation(variables);
|
JointMarginal info = jointMarginalInformation(variables);
|
||||||
|
|
|
@ -102,6 +102,12 @@ public:
|
||||||
Block operator()(Key iVariable, Key jVariable) const {
|
Block operator()(Key iVariable, Key jVariable) const {
|
||||||
return blockView_(indices_[iVariable], indices_[jVariable]); }
|
return blockView_(indices_[iVariable], indices_[jVariable]); }
|
||||||
|
|
||||||
|
/** Copy constructor */
|
||||||
|
JointMarginal(const JointMarginal& other);
|
||||||
|
|
||||||
|
/** Assignment operator */
|
||||||
|
JointMarginal& operator=(const JointMarginal& rhs);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Matrix fullMatrix_;
|
Matrix fullMatrix_;
|
||||||
BlockView blockView_;
|
BlockView blockView_;
|
||||||
|
|
Loading…
Reference in New Issue