ATLAS Offline Software
Loading...
Searching...
No Matches
NodeConnector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONINFERENCEINTERACES_NODECONNECTOR_H
5#define MUONINFERENCEINTERACES_NODECONNECTOR_H
6
7#include <string>
8#include <functional>
9
11namespace MuonML{
20 public:
25 using Evaluator_t = std::function<bool(const Bucket_t&, size_t, size_t)>;
30 NodeConnector(const std::string& cName, const Evaluator_t conFunc):
31 m_name{cName}, m_func{conFunc} {}
32
33 const std::string& name() const {
34 return m_name;
35 }
36
40 bool connect(const Bucket_t& bucket, size_t i, size_t j) const {
41 return m_func(bucket, i, j);
42 }
43
44 private:
45 std::string m_name{};
46 Evaluator_t m_func{[](const Bucket_t, size_t, size_t) { return false; }};
47
48 };
49}
50#endif
NodeFeature::Bucket_t Bucket_t
bool connect(const Bucket_t &bucket, size_t i, size_t j) const
returns the decision of the connector function
std::function< bool(const Bucket_t &, size_t, size_t)> Evaluator_t
Function type to connect two space points in a bucket.
const std::string & name() const
Returns the name of the node connector.
NodeConnector(const std::string &cName, const Evaluator_t conFunc)
Standard constructor taking the name of the node connector & a connector function definition.
LayerSpBucket Bucket_t
Abreviation of the Space point bucket type.
Definition NodeFeature.h:19