Skip to content

Commit 1db8dda

Browse files
committed
getEntity: wrong template argument, declaration and definition separated
1 parent 4ce69b0 commit 1db8dda

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

src/adjustment.h

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,10 @@ class AdjustmentFramework
6666
Eigen::Array<Attribute,Eigen::Dynamic,1> & status,
6767
Eigen::Array<bool,Eigen::Dynamic,1> & enforced);
6868

69-
//! Get s-th entity represented by vector of length N
69+
//! Get s-th entity represented by vector of length N and covariance matrix
7070
template <int N>
71-
std::pair<Eigen::Vector<double,N>,Eigen::Matrix<double,N,N> >
72-
getEntity( const Eigen::Index s) const
73-
{
74-
const Eigen::Index offset = N*s;
75-
const Eigen::Matrix<double,N,N> RR = Geometry::Rot_ab<double,3>(
76-
l_.segment(offset,N),
77-
l0_.segment(offset,N) );
78-
79-
return { l0_.segment(offset,N),
80-
RR*Cov_ll_.block(offset,offset,N,N)*RR.adjoint() };
81-
}
71+
std::pair< Eigen::Vector<double,N>, Eigen::Matrix<double,N,N> >
72+
getEntity( Eigen::Index s) const;
8273

8374
private:
8475
[[nodiscard]] static int nIterMax() { return nIterMax_; }
@@ -117,4 +108,20 @@ class AdjustmentFramework
117108
static constexpr double numericalCheck = 1e-5; // numerical check of constraints
118109
};
119110

111+
112+
//! Get s-th entity represented by vector of length N and covariance matrix
113+
template <int N>
114+
std::pair< Eigen::Vector<double,N>, Eigen::Matrix<double,N,N> >
115+
AdjustmentFramework::getEntity( const Eigen::Index s) const
116+
{
117+
const Eigen::Index offset = N*s;
118+
const Eigen::Matrix<double,N,N> RR = Geometry::Rot_ab<double,N>(
119+
l_.segment(offset,N),
120+
l0_.segment(offset,N) );
121+
122+
return { l0_.segment(offset,N),
123+
RR*Cov_ll_.block(offset,offset,N,N)*RR.transpose() };
124+
}
125+
126+
120127
#endif // ADJUSTMENT_H

0 commit comments

Comments
 (0)