Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

GestureGraph.h

Go to the documentation of this file.
00001 
00040 #ifndef __GESTURE_GRAPH_H__
00041 #define __GESTURE_GRAPH_H__
00042 
00043 #include "DAG.h"
00044 #include "GGNode.h"
00045 
00046 
00052 class GestureGraph : public DAG
00053 {
00054         SmartArray<int> hierarchyLevels;                                
00055         SmartMatrix<int> hierarchicalMatrix;                    
00056         SmartMatrix<GGRelation> relationMatrix;                 
00057   Matrix EuclideanDistance;  
00058   Matrix Scale;     
00059   Matrix Bearing;   
00060 
00061         int m_nRootNodeCount;
00062 
00063 public:
00064   float Get_distance(int, int);
00065         int Get_number_of_relations(int);
00066         int Get_nth_relation(int, int);
00067         int Get_xpos(int);
00068         int Get_ypos(int);
00069 
00070         GestureGraph() { m_nRootNodeCount = 0; }
00071 
00072         const GGRelation& GetRelation(int v1, int v2) const
00073         {
00074                 return relationMatrix[v1 - 2][v2 - 1];
00075         }
00076   
00077   void BuildMatrices();
00078   void BuildNodeHistograms();
00079         bool Read(String strFileName);
00080 
00081         // DAG virtual functions
00082         virtual DAG& operator=(const DAG& rhs);
00083         virtual void Clear();
00084 
00085         // DAG pure virtual functions
00086         virtual double NodeDistance(leda_node g1Node, const DAG& g2, leda_node g2Node) const;
00087         virtual bool AreNodesRelated(leda_node g1Node, const DAG& g2, leda_node g2Node) const;
00088         virtual DAG* CreateObject() const;
00089         virtual DAGNodePtr CreateNodeObject(NODE_LABEL lbl) const;
00090         virtual DAGNodePtr ReadNode(istream& is) const;
00091         virtual String ClassName() const;
00092         virtual int NodeType(leda_node v) const { return 0; }
00093 
00094         virtual istream& Read(istream& is, bool bOnlyDataForMatching = false);
00095         virtual ostream& Write(ostream& os) const;
00096         virtual void Print(ostream& os = cout) const;
00097 
00098         const GGNode* GetGGNode(leda_node v) const { return (const GGNode*)(const DAGNode*)GetNode(v); }
00099 };
00100 
00101 #endif //__GESTURE_GRAPH_H__

Generated on Sat Nov 13 11:21:23 2004 for Noisy DAG Matcher by doxygen1.2.18