ATLAS Offline Software
Loading...
Searching...
No Matches
EigenZeroDefs.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef XAODMEASUREMENTBASE_EIGENZERODEFS_H
14#define XAODMEASUREMENTBASE_EIGENZERODEFS_H
15
16
19
20
21namespace SG {
22
23
24// The default Matrix constructor does not initialize the matrix contents.
25// Specialize this for Matrix, so that when we have Matrix auxiliary variables,
26// they'll be fully initialized after a resize, etc.
27template <typename SCALAR, int ROWS, int COLS, int OPTIONS, int MAXROWS, int MAXCOLS>
28struct Zero<Eigen::Matrix<SCALAR, ROWS, COLS, OPTIONS, MAXROWS, MAXCOLS> >
29{
30 typedef Eigen::Matrix<SCALAR, ROWS, COLS, OPTIONS, MAXROWS, MAXCOLS> Matrix;
31 static Matrix zero()
32 {
33 Matrix m;
34 m.setZero();
35 return m;
36 }
37};
38
39
40} // namespace SG
41
42
43#endif // not XAODMEASUREMENTBASE_EIGENZERODEFS_H
Allow customizing how aux data types are treated.
Forward declaration.
Eigen::Matrix< SCALAR, ROWS, COLS, OPTIONS, MAXROWS, MAXCOLS > Matrix
Helper to specialize how to make an initialized instance of T.