@@ -60,10 +60,10 @@ class AdjustmentFramework
6060 Eigen::Array<Attribute,Eigen::Dynamic,1 > & status,
6161 Eigen::Array<bool ,Eigen::Dynamic,1 > & enforced);
6262
63- // ! Get s -th entity represented by vector of length N and covariance matrix
64- template < int N>
65- std::pair< Eigen::Vector<double ,N>, Eigen::Matrix<double ,N,N> >
66- getEntity ( Eigen::Index s ) const ;
63+ // ! Get i -th uncertain entity represented by N-vector and covariance matrix
64+ template < typename T, int N>
65+ std::pair< Eigen::Vector<T ,N>, Eigen::Matrix<T ,N,N> >
66+ getEntity ( Eigen::Index i ) const ;
6767
6868private:
6969 [[nodiscard]] static int nIterMax () { return nIterMax_; }
@@ -110,18 +110,17 @@ class AdjustmentFramework
110110};
111111
112112
113- // ! Get s -th entity represented by vector of length N and covariance matrix
114- template < int N>
115- std::pair< Eigen::Vector<double ,N>, Eigen::Matrix<double ,N,N> >
116- AdjustmentFramework::getEntity ( const Eigen::Index s ) const
113+ // ! Get i -th uncertain entity represented by N-vector and covariance matrix
114+ template < typename T, int N>
115+ std::pair< Eigen::Vector<T ,N>, Eigen::Matrix<T ,N,N> >
116+ AdjustmentFramework::getEntity ( const Eigen::Index i ) const
117117{
118- const Eigen::Index offset = N*s;
119- const Eigen::Matrix<double ,N,N> RR = Geometry::Rot_ab<double ,N>(
120- l_.segment (offset,N),
121- l0_.segment (offset,N) );
118+ const Eigen::Index offset = N*i; // start position
119+ const Eigen::Matrix<T,N,N> RR = Geometry::Rot_ab<T,N>(
120+ l_.segment <N>(offset), l0_.segment <N>(offset) );
122121
123- return { l0_.segment (offset,N ),
124- RR*Sigma_ll_.block (offset,offset,N,N)*RR.transpose () };
122+ return {l0_.segment <N> (offset),
123+ RR*Sigma_ll_.block (offset,offset,N,N)*RR.transpose ()};
125124}
126125
127126
0 commit comments