ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
HyPERAnalysisAlgorithms
HyPERAnalysisAlgorithms
HyPERGraph.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef HYPERANALYSISALGORITHMS_HYPERGRAPH_H
6
#define HYPERANALYSISALGORITHMS_HYPERGRAPH_H
7
8
#include <math.h>
9
10
#include <iostream>
11
#include <list>
12
#include <map>
13
#include <vector>
14
15
#include "
HyPERAnalysisAlgorithms/GraphBase.h
"
16
17
namespace
EventReco
{
18
// @class HyPERGraph
19
// @brief This class is in charge of storing the graph structure and features of
20
// the HyPER model. It inherits from the GraphBase class.
21
class
HyPERGraph
:
public
GraphBase
{
22
using
HyperEdgeIndex
= std::vector<int64_t>;
23
24
public
:
25
HyPERGraph
() :
GraphBase
() {};
26
virtual
~HyPERGraph
() =
default
;
27
28
virtual
void
addNode
(
const
Features
& attributes)
override
;
29
virtual
void
addEdge
(int64_t source, int64_t target,
30
const
Features
& attributes)
override
;
31
virtual
void
addGlobal
(
const
Features
& attributes)
override
;
32
33
void
buildEdgeIndices
();
34
void
buildHyperEdges
(int64_t order);
35
const
std::vector<EdgeIndex>&
getEdgeIndicesVector
()
const
{
36
return
m_edgeIndices
;
37
}
38
HyperEdgeIndex
getHyperEdgeIndices
(std::size_t
index
)
const
{
39
return
m_hyperEdgeIndices
[
index
];
40
}
41
int64_t
nHyperEdges
()
const
{
return
m_nHyperEdges
; }
42
int64_t
hyperEdgeOrder
()
const
{
return
m_hyperEdgeOrder
; }
43
44
virtual
void
printGraph
()
const
;
45
virtual
void
printGraphInputsForValidation
()
const
;
46
virtual
void
clearGraph
();
47
48
protected
:
49
std::vector<EdgeIndex>
m_edgeIndices
= {};
50
std::vector<HyperEdgeIndex>
m_hyperEdgeIndices
= {};
51
int64_t
m_nHyperEdges
= 0;
52
int64_t
m_hyperEdgeOrder
= 0;
53
};
54
}
// namespace EventReco
55
56
#endif
// HYPERANALYSISALGORITHMS_HYPERGRAPH_H
GraphBase.h
EventReco::GraphBase::GraphBase
GraphBase()=default
EventReco::HyPERGraph::HyPERGraph
HyPERGraph()
Definition
HyPERGraph.h:25
EventReco::HyPERGraph::m_edgeIndices
std::vector< EdgeIndex > m_edgeIndices
Definition
HyPERGraph.h:49
EventReco::HyPERGraph::m_nHyperEdges
int64_t m_nHyperEdges
Definition
HyPERGraph.h:51
EventReco::HyPERGraph::hyperEdgeOrder
int64_t hyperEdgeOrder() const
Definition
HyPERGraph.h:42
EventReco::HyPERGraph::m_hyperEdgeIndices
std::vector< HyperEdgeIndex > m_hyperEdgeIndices
Definition
HyPERGraph.h:50
EventReco::HyPERGraph::clearGraph
virtual void clearGraph()
Definition
HyPERGraph.cxx:170
EventReco::HyPERGraph::addNode
virtual void addNode(const Features &attributes) override
Definition
HyPERGraph.cxx:14
EventReco::HyPERGraph::getEdgeIndicesVector
const std::vector< EdgeIndex > & getEdgeIndicesVector() const
Definition
HyPERGraph.h:35
EventReco::HyPERGraph::m_hyperEdgeOrder
int64_t m_hyperEdgeOrder
Definition
HyPERGraph.h:52
EventReco::HyPERGraph::addEdge
virtual void addEdge(int64_t source, int64_t target, const Features &attributes) override
Definition
HyPERGraph.cxx:20
EventReco::HyPERGraph::nHyperEdges
int64_t nHyperEdges() const
Definition
HyPERGraph.h:41
EventReco::HyPERGraph::HyperEdgeIndex
std::vector< int64_t > HyperEdgeIndex
Definition
HyPERGraph.h:22
EventReco::HyPERGraph::buildHyperEdges
void buildHyperEdges(int64_t order)
Definition
HyPERGraph.cxx:44
EventReco::HyPERGraph::printGraphInputsForValidation
virtual void printGraphInputsForValidation() const
Definition
HyPERGraph.cxx:90
EventReco::HyPERGraph::buildEdgeIndices
void buildEdgeIndices()
Definition
HyPERGraph.cxx:31
EventReco::HyPERGraph::printGraph
virtual void printGraph() const
Definition
HyPERGraph.cxx:55
EventReco::HyPERGraph::~HyPERGraph
virtual ~HyPERGraph()=default
EventReco::HyPERGraph::addGlobal
virtual void addGlobal(const Features &attributes) override
Definition
HyPERGraph.cxx:27
EventReco::HyPERGraph::getHyperEdgeIndices
HyperEdgeIndex getHyperEdgeIndices(std::size_t index) const
Definition
HyPERGraph.h:38
EventReco
Definition
GraphBase.h:14
EventReco::Features
std::vector< float > Features
Definition
GraphBase.h:16
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0