GCNGraphNode.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file GCNGraphNode.h
3 /// \brief Node for GCN
4 /// \author Leigh H. Whitehead - leigh.howard.whitehead@cern.ch
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef CVN_GCNGRAPHNODE_H
8 #define CVN_GCNGRAPHNODE_H
9 
10 #include <ostream>
11 #include <vector>
12 
13 namespace cvn
14 {
15 
17  {
18  public:
19 
20  /// Default constructor
21  GCNGraphNode();
22  /// Constructor with position and feature vectors
23  GCNGraphNode(std::vector<float> position, std::vector<float> features);
24  /// Constructor with position, feature and ground truth vectors
25  GCNGraphNode(std::vector<float> position, std::vector<float> features,
26  std::vector<float> groundTruth);
27  /// Destructor
29 
30  /// Get the node position, features or ground truth
31  const std::vector<float> GetPosition() const;
32  const std::vector<float> GetFeatures() const;
33  const std::vector<float> GetGroundTruth() const;
34 
35  /// Add a node position coordinate
36  void AddPositionCoordinate(float pos);
37 
38  /// Add a node feature
39  void AddFeature(float feature);
40 
41  /// Set true ID
42  void AddGroundTruth(float truth);
43 
44  /// Get the number of features
45  const unsigned int GetNumberOfFeatures() const;
46 
47  /// Get the number of position coordinates
48  const unsigned int GetNumberOfCoordinates() const;
49 
50  /// Get feature - zero indexed - and returns -999. if feature doesn't exist
51  const float GetFeature(const unsigned int feature) const;
52 
53  private:
54  std::vector<float> fPosition;
55  std::vector<float> fFeatures;
56  std::vector<float> fGroundTruth;
57  };
58 
59 }
60 
61 #endif // CVN_GCNGRAPHNODE_H
std::vector< float > fPosition
Definition: GCNGraphNode.h:54
const std::vector< float > GetGroundTruth() const
Get the node truth.
Utility class for truth labels.
const char features[]
Definition: feature_tests.c:2
const unsigned int GetNumberOfFeatures() const
Get the number of features.
void AddPositionCoordinate(float pos)
Add a node position coordinate.
~GCNGraphNode()
Destructor.
Definition: GCNGraphNode.h:28
const std::vector< float > GetFeatures() const
Get the node features.
const unsigned int GetNumberOfCoordinates() const
Get the number of position coordinates.
void AddFeature(float feature)
Add a node feature.
std::vector< float > fGroundTruth
Definition: GCNGraphNode.h:56
GCNGraphNode()
Default constructor.
const std::vector< float > GetPosition() const
Get the node position, features or ground truth.
void AddGroundTruth(float truth)
Set true ID.
const float GetFeature(const unsigned int feature) const
Get feature - zero indexed - and returns -999. if feature doesn&#39;t exist.
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55