InfoVis 2013  1.0
Information Visualisation project - "Mapping Text with Phrase Nets"
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GraphNode.h
Go to the documentation of this file.
1 #ifndef GRAPH_NODE_H
2 #define GRAPH_NODE_H
3 
4 #include <map>
5 
6 class GraphNode;
7 typedef std::map<const GraphNode*, int> CountedGraphNodeMapType;
8 
10 class GraphNode
11 {
12 public:
13  GraphNode(const std::string& word);
14  ~GraphNode();
15 
16  void addSubsequentNode(GraphNode* node);
17  void addPreviousNode(GraphNode* node);
19 
22  const std::string& getWord() const;
23  int getOccuranceCount() const;
26  int getHighestOutgoingCount() const;
27  int getHighestIncomingCount() const;
28 
29  void setEdgeWeight(float weight);
30  float getEdgeWeight() const;
31  void setOccuranceWeight(float weight);
32  float getOccuranceWeight() const;
33 
34 
35 private:
36  std::string m_word;
37  int m_occuranceCount;
38  int m_previousNodeConnectionsCount;
39  int m_subsequentNodeConnectionsCount;
40  int m_highestOutgoingCount;
41  int m_highestIncomingCount;
42 
43  float m_edgeWeight;
44  float m_occuranceWeight;
45 
46 
47  CountedGraphNodeMapType m_previousNodes;
48  CountedGraphNodeMapType m_subsequentNodes;
49 };
50 
51 #endif