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

#include <Graph.h>

Inheritance diagram for lwtDev::ConcatenateNode:
Collaboration diagram for lwtDev::ConcatenateNode:

Public Member Functions

 ConcatenateNode (const std::vector< const INode * > &)
 
virtual VectorXd compute (const ISource &) const override
 
virtual size_t n_outputs () const override
 

Private Attributes

std::vector< const INode * > m_sources
 
size_t m_n_outputs
 

Detailed Description

Definition at line 55 of file Graph.h.

Constructor & Destructor Documentation

◆ ConcatenateNode()

lwtDev::ConcatenateNode::ConcatenateNode ( const std::vector< const INode * > &  sources)

Definition at line 104 of file Graph.cxx.

104  :
105  m_sources(sources),
106  m_n_outputs(0)
107  {
108  for (const auto source: sources) {
109  m_n_outputs += source->n_outputs();
110  }
111  }

Member Function Documentation

◆ compute()

VectorXd lwtDev::ConcatenateNode::compute ( const ISource source) const
overridevirtual

Implements lwtDev::INode.

Definition at line 112 of file Graph.cxx.

112  {
113  VectorXd output(m_n_outputs);
114  size_t offset = 0;
115  for (const auto node: m_sources) {
116  VectorXd input = node->compute(source);
117  size_t n_elements = input.rows();
118  assert(n_elements == node->n_outputs());
119  output.segment(offset, n_elements) = input;
120  offset += n_elements;
121  }
122  assert(offset == m_n_outputs);
123  return output;
124  }

◆ n_outputs()

size_t lwtDev::ConcatenateNode::n_outputs ( ) const
overridevirtual

Implements lwtDev::INode.

Definition at line 125 of file Graph.cxx.

125  {
126  return m_n_outputs;
127  }

Member Data Documentation

◆ m_n_outputs

size_t lwtDev::ConcatenateNode::m_n_outputs
private

Definition at line 63 of file Graph.h.

◆ m_sources

std::vector<const INode*> lwtDev::ConcatenateNode::m_sources
private

Definition at line 62 of file Graph.h.


The documentation for this class was generated from the following files:
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
lwtDev::ConcatenateNode::m_sources
std::vector< const INode * > m_sources
Definition: Graph.h:62
merge.output
output
Definition: merge.py:17
lwtDev::ConcatenateNode::m_n_outputs
size_t m_n_outputs
Definition: Graph.h:63
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
copySelective.source
string source
Definition: copySelective.py:32
node
Definition: memory_hooks-stdcmalloc.h:74