Belle II Software development
ParameterVectorUtil Struct Reference

Structure to gather some utility functions for the ParameterVector. More...

#include <ParameterVectorUtil.h>

Static Public Member Functions

template<class AParameterVector , int I = 0, int N = 0>
static AParameterVector getSub (const ParameterVector< N > &par)
 Gets a sub vector from a parameter vector.
 
template<int N1, int N2>
static ParameterVector< N1+N2 > stack (const ParameterVector< N1 > &upperPar, const ParameterVector< N2 > &lowerPar)
 Combines two parameter vectors by stacking them over each other.
 

Detailed Description

Structure to gather some utility functions for the ParameterVector.

Definition at line 24 of file ParameterVectorUtil.h.

Member Function Documentation

◆ getSub()

static AParameterVector getSub ( const ParameterVector< N > &  par)
inlinestatic

Gets a sub vector from a parameter vector.

Definition at line 28 of file ParameterVectorUtil.h.

29 {
30 constexpr const int M =
31 std::remove_reference_t<decltype(mapToEigen(AParameterVector()))>::RowsAtCompileTime;
32 return par.template block<M, 1>(I, 0);
33 }

◆ stack()

static ParameterVector< N1+N2 > stack ( const ParameterVector< N1 > &  upperPar,
const ParameterVector< N2 > &  lowerPar 
)
inlinestatic

Combines two parameter vectors by stacking them over each other.

Definition at line 37 of file ParameterVectorUtil.h.

39 {
40 ParameterVector < N1 + N2 > result;
41 mapToEigen(result) << mapToEigen(upperPar), mapToEigen(lowerPar);
42 return result;
43 }

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