|
28 | 28 |
|
29 | 29 | #include "qcontainerfwd.h" |
30 | 30 |
|
| 31 | +#include "geometry/minrot.h" |
| 32 | + |
31 | 33 |
|
32 | 34 | namespace Constraint {class ConstraintBase;} // namespace Constraint |
33 | 35 | namespace Graph {class IncidenceMatrix;} // namespace Graph |
@@ -64,8 +66,19 @@ class AdjustmentFramework |
64 | 66 | Eigen::Array<Attribute,Eigen::Dynamic,1> & status, |
65 | 67 | Eigen::Array<bool,Eigen::Dynamic,1> & enforced); |
66 | 68 |
|
67 | | - //! Get s-th entity, i.e., segment, represented by vector of length len |
68 | | - [[nodiscard]] std::pair<Eigen::Vector3d, Eigen::Matrix3d> getEntity( Eigen::Index s) const; |
| 69 | + //! Get s-th entity represented by vector of length N |
| 70 | + 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( |
| 76 | + l_.segment(offset,N).eval(), |
| 77 | + l0_.segment(offset,N).eval() ); |
| 78 | + |
| 79 | + return { l0_.segment(offset,N), |
| 80 | + RR*Cov_ll_.block(offset,offset,N,N)*RR.adjoint() }; |
| 81 | + } |
69 | 82 |
|
70 | 83 | private: |
71 | 84 | [[nodiscard]] static int nIterMax() { return nIterMax_; } |
|
0 commit comments