ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
lwtDev::DummySource Class Reference

#include <Source.h>

Inheritance diagram for lwtDev::DummySource:
Collaboration diagram for lwtDev::DummySource:

Public Member Functions

 DummySource (const std::vector< size_t > &input_sizes, const std::vector< std::pair< size_t, size_t > > &={})
 
virtual VectorXd at (size_t index) const override
 
virtual MatrixXd matrix_at (size_t index) const override
 

Private Attributes

std::vector< size_t > m_sizes
 
std::vector< std::pair< size_t, size_t > > m_matrix_sizes
 

Detailed Description

Definition at line 36 of file Source.h.

Constructor & Destructor Documentation

◆ DummySource()

lwtDev::DummySource::DummySource ( const std::vector< size_t > &  input_sizes,
const std::vector< std::pair< size_t, size_t > > &  ma = {} 
)

Definition at line 36 of file Graph.cxx.

37  :
38  m_sizes(input_sizes),
40  {
41  }

Member Function Documentation

◆ at()

VectorXd lwtDev::DummySource::at ( size_t  index) const
overridevirtual

Implements lwtDev::ISource.

Definition at line 42 of file Graph.cxx.

42  {
43  if (index >= m_sizes.size()) {
45  "Dummy Source: no size defined at " + std::to_string(index));
46  }
47  size_t n_entries = m_sizes.at(index);
48  VectorXd vec(n_entries);
49  for (size_t iii = 0; iii < n_entries; iii++) {
50  vec(iii) = iii;
51  }
52  return vec;
53  }

◆ matrix_at()

MatrixXd lwtDev::DummySource::matrix_at ( size_t  index) const
overridevirtual

Implements lwtDev::ISource.

Definition at line 54 of file Graph.cxx.

54  {
55  if (index >= m_matrix_sizes.size()) {
57  "Dummy Source: no size defined at " + std::to_string(index));
58  }
59  size_t n_rows = m_matrix_sizes.at(index).first;
60  size_t n_cols = m_matrix_sizes.at(index).second;
61  MatrixXd mat(n_rows, n_cols);
62  for (size_t iii = 0; iii < n_rows; iii++) {
63  for (size_t jjj = 0; jjj < n_cols; jjj++) {
64  mat(iii, jjj) = jjj + n_cols * iii;
65  }
66  }
67  return mat;
68  }

Member Data Documentation

◆ m_matrix_sizes

std::vector<std::pair<size_t, size_t> > lwtDev::DummySource::m_matrix_sizes
private

Definition at line 45 of file Source.h.

◆ m_sizes

std::vector<size_t> lwtDev::DummySource::m_sizes
private

Definition at line 44 of file Source.h.


The documentation for this class was generated from the following files:
lwtDev::DummySource::m_matrix_sizes
std::vector< std::pair< size_t, size_t > > m_matrix_sizes
Definition: Source.h:45
index
Definition: index.py:1
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
lwtDev::NNEvaluationException
Definition: Reconstruction/tauRecTools/tauRecTools/lwtnn/Exceptions.h:27
lwtDev::DummySource::m_sizes
std::vector< size_t > m_sizes
Definition: Source.h:44
PowhegPythia8EvtGen_H2a4X_ctauY.ma
int ma
Definition: PowhegPythia8EvtGen_H2a4X_ctauY.py:26