Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
MuonML::NodeConnector Class Reference

The NodeConnector is indicating whether two space points inside a bucket, the graph nodes, shall have a connection in their graph neural net representation. More...

#include <NodeConnector.h>

Collaboration diagram for MuonML::NodeConnector:

Public Types

using Bucket_t = NodeFeature::Bucket_t
 
using Evaluator_t = std::function< bool(const Bucket_t &, size_t, size_t)>
 Function type to connect two space points in a bucket. More...
 

Public Member Functions

 NodeConnector (const std::string &cName, const Evaluator_t conFunc)
 Standard constructor taking the name of the node connector & a connector function definition. More...
 
const std::string & name () const
 Returns the name of the node connector. More...
 
bool connect (const Bucket_t &bucket, size_t i, size_t j) const
 returns the decision of the connector function More...
 

Private Attributes

std::string m_name {}
 
Evaluator_t m_func {[](const Bucket_t, size_t, size_t) { return false; }}
 

Detailed Description

The NodeConnector is indicating whether two space points inside a bucket, the graph nodes, shall have a connection in their graph neural net representation.

In short terms, the node connector is std::function with the bucket & the two indices to the space point inside as input arguments and then returning a boolean decision whether the connection shall be built. In order, to verify that two instances of the neural net graph are identical, the node connector also has a name as attribute.

Definition at line 19 of file NodeConnector.h.

Member Typedef Documentation

◆ Bucket_t

Definition at line 21 of file NodeConnector.h.

◆ Evaluator_t

using MuonML::NodeConnector::Evaluator_t = std::function<bool(const Bucket_t&, size_t, size_t)>

Function type to connect two space points in a bucket.

The signature takes the reference to the bucket and then the two indices of the space points which shall be connected. The function needs to return true or false

Definition at line 25 of file NodeConnector.h.

Constructor & Destructor Documentation

◆ NodeConnector()

MuonML::NodeConnector::NodeConnector ( const std::string &  cName,
const Evaluator_t  conFunc 
)
inline

Standard constructor taking the name of the node connector & a connector function definition.

cName: Name of the connector function

conFunc: Definition of the connector function

Definition at line 30 of file NodeConnector.h.

30  :
31  m_name{cName}, m_func{conFunc} {}

Member Function Documentation

◆ connect()

bool MuonML::NodeConnector::connect ( const Bucket_t bucket,
size_t  i,
size_t  j 
) const
inline

returns the decision of the connector function

Parameters
bucketReference to the space point bucket
iIndex of the first space point to connect
jIndex of the second space point to connect

Definition at line 40 of file NodeConnector.h.

40  {
41  return m_func(bucket, i, j);
42  }

◆ name()

const std::string& MuonML::NodeConnector::name ( ) const
inline

Returns the name of the node connector.

Definition at line 33 of file NodeConnector.h.

33  {
34  return m_name;
35  }

Member Data Documentation

◆ m_func

Evaluator_t MuonML::NodeConnector::m_func {[](const Bucket_t, size_t, size_t) { return false; }}
private

Definition at line 46 of file NodeConnector.h.

◆ m_name

std::string MuonML::NodeConnector::m_name {}
private

Definition at line 45 of file NodeConnector.h.


The documentation for this class was generated from the following file:
MuonML::NodeConnector::m_func
Evaluator_t m_func
Definition: NodeConnector.h:46
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonML::NodeConnector::m_name
std::string m_name
Definition: NodeConnector.h:45