ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t > Class Template Reference

Helper class for fixed subspace operations. More...

#include <Acts/EventData/SubspaceHelpers.hpp>

Inheritance diagram for Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >:
[legend]
Collaboration diagram for Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >:
[legend]

Public Types

template<std::size_t K>
using ApplyLeftResult = ActsMatrix<kSubspaceSize, kSubspaceSize>
 Type alias for left application result matrix.
template<std::size_t N>
using ApplyRightResult = ActsMatrix<kSubspaceSize, kSubspaceSize>
 Type alias for right application result matrix.
using Container = std::array<IndexType, kSubspaceSize>
 Type alias for container storing subspace indices.
using Expander = ActsMatrix<kFullSize, kSubspaceSize>
 Type alias for expansion matrix (full x subspace).
using IndexType = index_t
 Type alias for index type used to specify subspace indices.
using Projector = ActsMatrix<kSubspaceSize, kFullSize>
 Type alias for projection matrix (subspace x full).
using size_type = std::size_t
 Type alias for size type.
using SquareMatrix = ActsSquareMatrix<kSubspaceSize>
 Type alias for subspace square matrix.
using Vector = ActsVector<kSubspaceSize>
 Type alias for subspace vector.

Public Member Functions

template<std::ranges::sized_range other_index_range_t>
 FixedSubspaceHelper (const other_index_range_t &indices)
 Construct a fixed subspace helper with specified indices.
template<std::size_t K, typename Derived>
ApplyLeftResult< K > applyLeftOf (const Eigen::DenseBase< Derived > &matrix) const
 Apply subspace projection on the left side of a matrix.
template<std::size_t N, typename Derived>
ApplyRightResult< N > applyRightOf (const Eigen::DenseBase< Derived > &matrix) const
 Apply subspace projection on the right side of a matrix.
auto begin () const
 Get iterator to beginning of indices.
bool empty () const
 Check if the subspace is empty.
auto end () const
 Get iterator to end of indices.
Expander expander () const
 Create an expansion matrix from subspace to full space.
const Containerindices () const
 Get the container of subspace indices.
IndexType operator[] (std::uint32_t i) const
 Access subspace index at position i.
template<typename Derived>
SquareMatrix projectMatrix (const Eigen::DenseBase< Derived > &fullMatrix) const
 Project a full-space square matrix to subspace.
Projector projector () const
 Create a projection matrix from full space to subspace.
template<typename Derived>
Vector projectVector (const Eigen::DenseBase< Derived > &fullVector) const
 Project a full-space vector to subspace.
std::size_t size () const
 Get the size of the subspace.

Static Public Attributes

static constexpr std::size_t kFullSize = FullSize
 Size of the full parameter space.
static constexpr std::size_t kSubspaceSize = SubspaceSize
 Size of the subspace parameter space.

Detailed Description

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
class Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >

Helper class for fixed subspace operations.

Template Parameters
FullSizethe full size of the subspace
SubspaceSizethe size of the subspace
index_tthe index type

Member Typedef Documentation

◆ ApplyLeftResult

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<std::size_t K>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::ApplyLeftResult = ActsMatrix<kSubspaceSize, kSubspaceSize>

Type alias for left application result matrix.

◆ ApplyRightResult

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<std::size_t N>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::ApplyRightResult = ActsMatrix<kSubspaceSize, kSubspaceSize>

Type alias for right application result matrix.

◆ Container

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::Container = std::array<IndexType, kSubspaceSize>

Type alias for container storing subspace indices.

◆ Expander

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::Expander = ActsMatrix<kFullSize, kSubspaceSize>

Type alias for expansion matrix (full x subspace).

◆ IndexType

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::IndexType = index_t

Type alias for index type used to specify subspace indices.

◆ Projector

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::Projector = ActsMatrix<kSubspaceSize, kFullSize>

Type alias for projection matrix (subspace x full).

◆ size_type

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::size_type = std::size_t

Type alias for size type.

◆ SquareMatrix

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::SquareMatrix = ActsSquareMatrix<kSubspaceSize>

Type alias for subspace square matrix.

◆ Vector

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
using Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::Vector = ActsVector<kSubspaceSize>

Type alias for subspace vector.

Constructor & Destructor Documentation

◆ FixedSubspaceHelper()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<std::ranges::sized_range other_index_range_t>
Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::FixedSubspaceHelper ( const other_index_range_t & indices)
explicit

Construct a fixed subspace helper with specified indices.

Template Parameters
other_index_range_tType of the index range
Parameters
indicesRange of indices defining the subspace, must match SubspaceSize

Member Function Documentation

◆ applyLeftOf()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<std::size_t K, typename Derived>
ApplyLeftResult< K > Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::applyLeftOf ( const Eigen::DenseBase< Derived > & matrix) const

Apply subspace projection on the left side of a matrix.

Template Parameters
KNumber of columns in the input matrix
DerivedEigen matrix type
Parameters
matrixInput matrix with rows matching full space size
Returns
Matrix with subspace rows and K columns

◆ applyRightOf()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<std::size_t N, typename Derived>
ApplyRightResult< N > Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::applyRightOf ( const Eigen::DenseBase< Derived > & matrix) const

Apply subspace projection on the right side of a matrix.

Template Parameters
NNumber of rows in the input matrix
DerivedEigen matrix type
Parameters
matrixInput matrix with columns matching subspace size
Returns
Matrix with N rows and subspace columns

◆ begin()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
auto Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::begin ( ) const

Get iterator to beginning of indices.

Returns
Iterator to the first index

◆ empty()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
bool Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::empty ( ) const

Check if the subspace is empty.

Returns
True if the subspace contains no indices (always false for fixed subspaces)

◆ end()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
auto Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::end ( ) const

Get iterator to end of indices.

Returns
Iterator past the last index

◆ expander()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
Expander Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::expander ( ) const

Create an expansion matrix from subspace to full space.

Returns
Matrix that expands from subspace to full space dimensions

◆ indices()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
const Container & Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::indices ( ) const

Get the container of subspace indices.

Returns
Reference to the array holding the indices

◆ operator[]()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
IndexType Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::operator[] ( std::uint32_t i) const

Access subspace index at position i.

Parameters
iPosition index
Returns
The subspace index at position i

◆ projectMatrix()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<typename Derived>
SquareMatrix Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::projectMatrix ( const Eigen::DenseBase< Derived > & fullMatrix) const

Project a full-space square matrix to subspace.

Template Parameters
DerivedEigen matrix type
Parameters
fullMatrixInput square matrix with full space dimensions
Returns
Square matrix projected to subspace dimensions

◆ projector()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
Projector Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::projector ( ) const

Create a projection matrix from full space to subspace.

Returns
Matrix that projects from full space to subspace dimensions

◆ projectVector()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
template<typename Derived>
Vector Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::projectVector ( const Eigen::DenseBase< Derived > & fullVector) const

Project a full-space vector to subspace.

Template Parameters
DerivedEigen vector type
Parameters
fullVectorInput vector with full space dimensions
Returns
Vector projected to subspace dimensions

◆ size()

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
std::size_t Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::size ( ) const

Get the size of the subspace.

Returns
Number of indices in the subspace (always SubspaceSize)

Member Data Documentation

◆ kFullSize

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
std::size_t Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::kFullSize = FullSize
staticconstexpr

Size of the full parameter space.

◆ kSubspaceSize

template<std::size_t FullSize, std::size_t SubspaceSize, typename index_t = std::uint8_t>
std::size_t Acts::FixedSubspaceHelper< FullSize, SubspaceSize, index_t >::kSubspaceSize = SubspaceSize
staticconstexpr

Size of the subspace parameter space.