LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar::util::details::DeterminantHelper< T, N, R1, R2, C1, C2 > Struct Template Reference

Determinant of a 2x2 submatrix. More...

#include "FastMatrixMathHelper.h"

Inheritance diagram for lar::util::details::DeterminantHelper< T, N, R1, R2, C1, C2 >:
lar::util::details::DeterminantHelperBase< N >

Static Public Member Functions

static constexpr T sqr (T v)
 
static T compute (T const *data)
 
static constexpr size_t index (unsigned int row, unsigned int col)
 

Detailed Description

template<typename T, unsigned int N, unsigned int R1, unsigned int R2, unsigned int C1, unsigned int C2>
struct lar::util::details::DeterminantHelper< T, N, R1, R2, C1, C2 >

Determinant of a 2x2 submatrix.

Definition at line 165 of file FastMatrixMathHelper.h.

Member Function Documentation

template<typename T , unsigned int N, unsigned int R1, unsigned int R2, unsigned int C1, unsigned int C2>
static T lar::util::details::DeterminantHelper< T, N, R1, R2, C1, C2 >::compute ( T const *  data)
inlinestatic

Definition at line 174 of file FastMatrixMathHelper.h.

175  {
176  return data[index(R1, C1)] * data[index(R2, C2)] -
177  data[index(R1, C2)] * data[index(R2, C1)];
178  /* // also
179  data[index(R1, C1)] * UpHelper<R2, C2>::compute(data)
180  - data[index(R1, C2)] * UpHelper<R2, C1>::compute(data)
181  */
182  }
static constexpr size_t index(unsigned int row, unsigned int col)
template<unsigned int N>
static constexpr size_t lar::util::details::DeterminantHelperBase< N >::index ( unsigned int  row,
unsigned int  col 
)
inlinestaticinherited

Definition at line 132 of file FastMatrixMathHelper.h.

References col.

133  {
134  return MatrixIndex<N>(row, col);
135  }
Int_t col[ntarg]
Definition: Style.C:29
template<typename T , unsigned int N, unsigned int R1, unsigned int R2, unsigned int C1, unsigned int C2>
static constexpr T lar::util::details::DeterminantHelper< T, N, R1, R2, C1, C2 >::sqr ( v)
inlinestatic

Definition at line 172 of file FastMatrixMathHelper.h.

172 { return v * v; }

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