13 #include <type_traits>
26 template <
typename source_link_t>
32 template <
typename T,
bool select>
33 using ConstIf = std::conditional_t<select, const T, T>;
37 template <
typename Storage,
size_t kSizeIncrement>
45 size_t index =
m_size + (
n - 1);
47 data.conservativeResize(Eigen::NoChange,
data.cols() + kSizeIncrement);
53 data.col(index).setZero();
55 return data.col(index);
59 auto col(
size_t index) {
return data.col(index); }
62 auto col(
size_t index)
const {
return data.col(index); }
65 size_t capacity()
const {
return static_cast<size_t>(
data.cols()); }
75 template <
size_t Size,
bool ReadOnlyMaps = true>
78 Flags = Eigen::ColMajor | Eigen::AutoAlign,
84 using Covariance = Eigen::Matrix<Scalar, Size, Size, Flags>;
125 template <
typename source_link_t,
size_t N,
size_t M,
bool ReadOnly = true>
140 Eigen::Matrix<typename Covariance::Scalar, M, N, ProjectorFlags>;
142 Eigen::Matrix<
typename Projector::Scalar, Eigen::Dynamic, Eigen::Dynamic,
156 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
175 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
277 template <
typename Derived,
bool RO = ReadOnly,
278 typename = std::enable_if_t<!RO>>
280 constexpr
int rows = Eigen::MatrixBase<Derived>::RowsAtCompileTime;
281 constexpr
int cols = Eigen::MatrixBase<Derived>::ColsAtCompileTime;
283 static_assert(rows != -1 && cols != -1,
284 "Assignment of dynamic matrices is currently not supported.");
291 static_assert(rows <= max_measdim,
"Given projector has too many rows");
292 static_assert(cols <= max_measdim,
"Given projector has too many columns");
296 decltype(fullProjector)::Zero();
300 fullProjector.template topLeftCorner<rows, max_measdim>() = projector;
319 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
340 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
379 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>,
399 std::shared_ptr<const Surface>& refSrf =
418 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>,
424 traj.m_meas.addCol();
425 traj.m_measCov.addCol();
430 traj.m_sourceLinks.emplace_back();
433 traj.m_projectors.emplace_back();
434 dataref.
iprojector = traj.m_projectors.size() - 1;
445 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
460 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
473 template <
bool RO = ReadOnly,
typename = std::enable_if_t<!RO>>
494 template <
typename T,
typename TS>
497 template <
typename T,
typename TS>
499 concept ::either<concept ::identical_to<bool, call_operator_t, T, TS>,
500 concept ::identical_to<void, call_operator_t, T, TS>>>;
510 namespace TrackStatePropMask {
523 constexpr
Type All{
static_cast<unsigned long long>(-1)};
536 template <
typename source_link_t>
548 MeasurementSizeMax,
false>;
563 template <
typename parameters_t>
565 size_t iprevious = SIZE_MAX);
573 size_t addTrackState(
575 size_t iprevious = SIZE_MAX);
581 return {*
this, istate};
593 template <
typename F>
594 void visitBackwards(
size_t iendpoint, F&& callable)
const;
603 template <
typename F>
604 void applyBackwards(
size_t iendpoint, F&& callable);