Tomographer  v1.0a
Tomographer C++ Framework Documentation
Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim > Struct Template Reference

Helper intermediate class for MatrQ. More...

#include <tomographer/qit/matrq.h>

+ Inheritance diagram for Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >:
+ Collaboration diagram for Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >:

Public Member Functions

std::size_t dim () const
 The dimension of the quantum system. See MatrQBase<Derived>::FixedDim.
 
std::size_t dim2 () const
 The squared dimension of the quantum system. See MatrQBase<Derived>::FixedDim2.
 
std::size_t ndof () const
 The squared dimension of the quantum system, minus one. See MatrQBase<Derived>::FixedNdof.
 
 MatrQBaseDimStore (std::size_t dim_)
 
MatrQBase< Derived >::MatrixType::ConstantReturnType initMatrixType () const
 Zero initializer for a MatrixType. More...
 
MatrQBase< Derived >::VectorParamType::ConstantReturnType initVectorParamType () const
 Zero initializer for a VectorParamType. More...
 
MatrQBase< Derived >::VectorParamNdofType::ConstantReturnType initVectorParamNdofType () const
 Zero initializer for a VectorParamNdofType. More...
 
MatrQBase< Derived >::VectorParamListType::ConstantReturnType initVectorParamListType (std::size_t len) const
 Zero initializer for a VectorParamListType. More...
 
MatrQBase< Derived >::FreqListType::ConstantReturnType initFreqListType (std::size_t len) const
 Zero initializer for a FreqListType. More...
 

Additional Inherited Members

- Public Types inherited from Tomographer::MatrQBase< Derived >
enum  
 Values that are either fixed at compile-time, or set to Eigen::Dynamic. More...
 
typedef tomo_internal::matrq_traits< Derived >::RealScalar RealScalar
 Real scalar type (usually double)
 
typedef tomo_internal::matrq_traits< Derived >::ComplexScalar ComplexScalar
 Complex scalar type (usually std::complex<double>)
 
typedef tomo_internal::matrq_traits< Derived >::IntFreqType IntFreqType
 Integer type, used to count measurement frequencies. (int is fine)
 
typedef Eigen::Matrix< std::complex< RealScalar >, FixedDim, FixedDimMatrixType
 Complex dim x dim Matrix.
 
typedef Eigen::Matrix< RealScalar, FixedDim2, 1 > VectorParamType
 Real dim*dim Vector.
 
typedef Eigen::Matrix< RealScalar, FixedNdof, 1 > VectorParamNdofType
 Real dim*dim-1 Vector.
 
typedef Eigen::Matrix< RealScalar, Eigen::Dynamic, FixedDim2, Eigen::RowMajor, FixedMaxParamList, FixedDim2VectorParamListType
 dynamic Matrix with rows = dim*dim Vectors (row-major) [maximum FixedMaxParamList rows, or Dynamic]
 
typedef Eigen::Array< IntFreqType, Eigen::Dynamic, 1, 0, FixedMaxParamList, 1 > FreqListType
 dynamic Array of integers [maximum FixedMaxParamList entries or Dynamic]
 

Detailed Description

template<typename Derived, bool has_fixed_dim>
struct Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >

Helper intermediate class for MatrQ.

This helper class allows the definition of the initializer methods initMatrixType(), initVectorParamType(), etc. via template specialization, without having to specialize all the base definitions in e.g. MatrQBase.

This class stores the dimension given at runtime if has_fixed_dim is false, or, if we have a fixed dimension, then provides statically fixed implementations of all its member functions. In all cases, dim() returns the dimension.

In fact, we could have been directly defined the MatrQ class this way, but this additional intermediary makes the specialization more flexible, i.e. one can specialize the definition of MatrQ not only a particular value of one of its template parameters, but for a more global condition on its template parameters. (But which is in fact not needed here.)

Definition at line 171 of file matrq.h.

Constructor & Destructor Documentation

template<typename Derived, bool has_fixed_dim>
Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >::MatrQBaseDimStore ( std::size_t  dim_)
inline

Constructor. If a fixed dimension is given (has_fixed_dim is true), then we assert that the given dimension matches the compile-time fixed dimension FixedDim (with eigen_assert()). Otherwise, if the dimension is given at runtime, we store the dimension.

The value of the dimension can in all cases be obtained using the dim() method.

Definition at line 190 of file matrq.h.

Member Function Documentation

template<typename Derived, bool has_fixed_dim>
MatrQBase<Derived>::FreqListType::ConstantReturnType Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >::initFreqListType ( std::size_t  len) const
inline

Zero initializer for a FreqListType.

This function returns an initializer, which when assigned to a FreqListType, should initialize it with zeros.

Definition at line 250 of file matrq.h.

template<typename Derived, bool has_fixed_dim>
MatrQBase<Derived>::MatrixType::ConstantReturnType Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >::initMatrixType ( ) const
inline

Zero initializer for a MatrixType.

This function returns an initializer, which when assigned to a MatrixType, should initialize it with zeros.

Definition at line 205 of file matrq.h.

template<typename Derived, bool has_fixed_dim>
MatrQBase<Derived>::VectorParamListType::ConstantReturnType Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >::initVectorParamListType ( std::size_t  len) const
inline

Zero initializer for a VectorParamListType.

This function returns an initializer, which when assigned to a VectorParamListType, should initialize it with zeros.

Definition at line 238 of file matrq.h.

template<typename Derived, bool has_fixed_dim>
MatrQBase<Derived>::VectorParamNdofType::ConstantReturnType Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >::initVectorParamNdofType ( ) const
inline

Zero initializer for a VectorParamNdofType.

This function returns an initializer, which when assigned to a VectorParamNdofType, should initialize it with zeros.

Definition at line 227 of file matrq.h.

template<typename Derived, bool has_fixed_dim>
MatrQBase<Derived>::VectorParamType::ConstantReturnType Tomographer::MatrQBaseDimStore< Derived, has_fixed_dim >::initVectorParamType ( ) const
inline

Zero initializer for a VectorParamType.

This function returns an initializer, which when assigned to a VectorParamType, should initialize it with zeros.

Definition at line 216 of file matrq.h.


The documentation for this struct was generated from the following file: