Public Member Functions | Private Attributes | List of all members
cvn::GCNGraphNode Class Reference

#include <GCNGraphNode.h>

Public Member Functions

 GCNGraphNode ()
 Default constructor. More...
 
 GCNGraphNode (std::vector< float > position, std::vector< float > features)
 Constructor with position and feature vectors. More...
 
 GCNGraphNode (std::vector< float > position, std::vector< float > features, std::vector< float > groundTruth)
 Constructor with position, feature and ground truth vectors. More...
 
 ~GCNGraphNode ()
 Destructor. More...
 
const std::vector< float > GetPosition () const
 Get the node position, features or ground truth. More...
 
const std::vector< float > GetFeatures () const
 Get the node features. More...
 
const std::vector< float > GetGroundTruth () const
 Get the node truth. More...
 
void AddPositionCoordinate (float pos)
 Add a node position coordinate. More...
 
void AddFeature (float feature)
 Add a node feature. More...
 
void AddGroundTruth (float truth)
 Set true ID. More...
 
const unsigned int GetNumberOfFeatures () const
 Get the number of features. More...
 
const unsigned int GetNumberOfCoordinates () const
 Get the number of position coordinates. More...
 
const float GetFeature (const unsigned int feature) const
 Get feature - zero indexed - and returns -999. if feature doesn't exist. More...
 

Private Attributes

std::vector< float > fPosition
 
std::vector< float > fFeatures
 
std::vector< float > fGroundTruth
 

Detailed Description

Definition at line 16 of file GCNGraphNode.h.

Constructor & Destructor Documentation

cvn::GCNGraphNode::GCNGraphNode ( )

Default constructor.

Definition at line 15 of file GCNGraphNode.cxx.

16  {}
cvn::GCNGraphNode::GCNGraphNode ( std::vector< float >  position,
std::vector< float >  features 
)

Constructor with position and feature vectors.

Definition at line 18 of file GCNGraphNode.cxx.

18  :
19  fPosition(position),
20  fFeatures(features)
21  {
22 
23  }
std::vector< float > fPosition
Definition: GCNGraphNode.h:54
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55
cvn::GCNGraphNode::GCNGraphNode ( std::vector< float >  position,
std::vector< float >  features,
std::vector< float >  groundTruth 
)

Constructor with position, feature and ground truth vectors.

Definition at line 25 of file GCNGraphNode.cxx.

26  :
27  fPosition(position),
28  fFeatures(features),
29  fGroundTruth(groundTruth)
30  {
31 
32  }
std::vector< float > fPosition
Definition: GCNGraphNode.h:54
std::vector< float > fGroundTruth
Definition: GCNGraphNode.h:56
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55
cvn::GCNGraphNode::~GCNGraphNode ( )
inline

Destructor.

Definition at line 28 of file GCNGraphNode.h.

28 {};

Member Function Documentation

void cvn::GCNGraphNode::AddFeature ( float  feature)

Add a node feature.

Definition at line 58 of file GCNGraphNode.cxx.

58  {
59  fFeatures.push_back(feature);
60  }
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55
void cvn::GCNGraphNode::AddGroundTruth ( float  truth)

Set true ID.

Add ground truth information.

Definition at line 63 of file GCNGraphNode.cxx.

63  {
64  fGroundTruth.push_back(truth);
65  }
std::vector< float > fGroundTruth
Definition: GCNGraphNode.h:56
void cvn::GCNGraphNode::AddPositionCoordinate ( float  pos)

Add a node position coordinate.

Definition at line 53 of file GCNGraphNode.cxx.

53  {
54  fPosition.push_back(pos);
55  }
std::vector< float > fPosition
Definition: GCNGraphNode.h:54
const float cvn::GCNGraphNode::GetFeature ( const unsigned int  feature) const

Get feature - zero indexed - and returns -999. if feature doesn't exist.

Get feature.

Definition at line 80 of file GCNGraphNode.cxx.

81  {
82  if(feature >= fFeatures.size()){
83  return fFeatures.at(feature);
84  }
85  else{
86  return -999.;
87  }
88  }
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55
const std::vector< float > cvn::GCNGraphNode::GetFeatures ( ) const

Get the node features.

Definition at line 41 of file GCNGraphNode.cxx.

42  {
43  return fFeatures;
44  }
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55
const std::vector< float > cvn::GCNGraphNode::GetGroundTruth ( ) const

Get the node truth.

Definition at line 47 of file GCNGraphNode.cxx.

48  {
49  return fGroundTruth;
50  }
std::vector< float > fGroundTruth
Definition: GCNGraphNode.h:56
const unsigned int cvn::GCNGraphNode::GetNumberOfCoordinates ( ) const

Get the number of position coordinates.

Get the number of features.

Definition at line 74 of file GCNGraphNode.cxx.

75  {
76  return fPosition.size();
77  }
std::vector< float > fPosition
Definition: GCNGraphNode.h:54
const unsigned int cvn::GCNGraphNode::GetNumberOfFeatures ( ) const

Get the number of features.

Definition at line 68 of file GCNGraphNode.cxx.

69  {
70  return fFeatures.size();
71  }
std::vector< float > fFeatures
Definition: GCNGraphNode.h:55
const std::vector< float > cvn::GCNGraphNode::GetPosition ( ) const

Get the node position, features or ground truth.

Get the node position.

Definition at line 35 of file GCNGraphNode.cxx.

36  {
37  return fPosition;
38  }
std::vector< float > fPosition
Definition: GCNGraphNode.h:54

Member Data Documentation

std::vector<float> cvn::GCNGraphNode::fFeatures
private

Definition at line 55 of file GCNGraphNode.h.

std::vector<float> cvn::GCNGraphNode::fGroundTruth
private

Definition at line 56 of file GCNGraphNode.h.

std::vector<float> cvn::GCNGraphNode::fPosition
private

Definition at line 54 of file GCNGraphNode.h.


The documentation for this class was generated from the following files: