63 template <
size_t kFullSize,
size_t kSize>
65 static_assert(kFullSize <= static_cast<size_t>(UINT8_MAX),
66 "Full vector space size is larger than the supported range");
67 static_assert(1
u <= kSize,
"Subspace size must be at least 1");
68 static_assert(kSize <= kFullSize,
69 "Subspace can only be as large as the full space");
71 template <
typename source_t>
73 template <
typename source_t>
75 Eigen::Matrix<typename source_t::Scalar, kFullSize, 1>;
76 template <
typename scalar_t>
78 template <
typename scalar_t>
95 template <
typename index_t>
97 for (
size_t i = 0
u;
i < kSize; ++
i) {
98 assert((indices[
i] < kFullSize) and
99 "Axis indices must be within the full space");
101 assert((indices[
i - 1
u] < indices[
i]) and
102 "Axis indices must be unique and ordered");
105 for (
size_t i = 0;
i < kSize; ++
i) {
106 m_axes[
i] =
static_cast<uint8_t
>(indices[
i]);
117 static constexpr
size_t size() {
return kSize; }
119 static constexpr
size_t fullSize() {
return kFullSize; }
126 constexpr
const std::array<uint8_t, kSize>&
indices()
const {
return m_axes; }
130 bool isContained =
false;
134 isContained = (isContained or (
a == index));
146 template <
typename fullspace_vector_t>
149 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(fullspace_vector_t, kFullSize);
152 for (
auto i = 0
u;
i < kSize; ++
i) {
165 template <
typename subspace_vector_t>
166 auto expandVector(
const Eigen::MatrixBase<subspace_vector_t>& sub)
const
168 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(subspace_vector_t, kSize);
172 for (
auto i = 0
u;
i < kSize; ++
i) {
181 template <
typename scalar_t>
185 for (
auto i = 0
u;
i < kSize; ++
i) {
194 template <
typename scalar_t>
198 for (
auto i = 0
u;
i < kSize; ++
i) {