Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RModel_GraphIndependent.hxx
Go to the documentation of this file.
1#ifndef TMVA_SOFIE_RMODEL_GraphIndependent
2#define TMVA_SOFIE_RMODEL_GraphIndependent
3
4#include <ctime>
5
7#include "TMVA/RModel.hxx"
8#include "TMVA/RFunction.hxx"
9
10namespace TMVA {
11namespace Experimental {
12namespace SOFIE {
13
14class RFunction_Update;
15
17
18 // Explicitly define default constructor so cppyy doesn't attempt
19 // aggregate initialization.
21
22 // update blocks
23 std::unique_ptr<RFunction_Update> edges_update_block;
24 std::unique_ptr<RFunction_Update> nodes_update_block;
25 std::unique_ptr<RFunction_Update> globals_update_block;
26
27 std::size_t num_nodes;
28 std::vector<std::pair<int, int>> edges;
29
33
34 std::string filename;
35
36 template <typename T>
38 {
39 switch (updateFunction.GetFunctionTarget()) {
42 break;
43 }
46 break;
47 }
50 break;
51 }
52 default: {
53 throw std::runtime_error(
54 "TMVA SOFIE: Invalid Update function supplied for creating GraphIndependent function block.");
55 }
56 }
57 }
58};
59
61
62private:
63 // updation function for edges, nodes & global attributes
64 std::unique_ptr<RFunction_Update> edges_update_block;
65 std::unique_ptr<RFunction_Update> nodes_update_block;
66 std::unique_ptr<RFunction_Update> globals_update_block;
67
68 std::size_t num_nodes;
69 std::size_t num_edges;
70
71 std::size_t num_node_features;
72 std::size_t num_edge_features;
74
75public:
77
78 void Generate() final;
79};
80
81} // namespace SOFIE
82} // namespace Experimental
83} // namespace TMVA
84
85#endif // TMVA_SOFIE_RMODEL_GNN
RModel_GraphIndependent(GraphIndependent_Init &graph_input_struct)
create variable transformations
std::unique_ptr< RFunction_Update > globals_update_block