Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
matchingSet.hpp
00001 #ifndef MATCHING
00002 #define MATCHING
00003 
00004 
00005 #include <iostream>
00006 #include <vector>
00007 
00008 namespace jafar{
00009   namespace lines{
00010     
00012 
00026     enum MatchRepres{
00027       FAST_OLD_LINE_MATCH_ACCESS,
00028       FAST_MATCH_ACCESS,
00029       BOTH_MATCH_ACCESS_TYPES
00030     };
00031     
00032     
00034 
00047     struct MatchStatistic{
00048       int right; 
00049       int wrong;  
00050       int notFound; 
00051       //int rightAssignmet;
00052       //int falseAssignment;
00053       
00054       void print(){
00055         std::cout << "== statistic print ==" << std::endl;
00056         std::cout << "\tright: " << right << std::endl;
00057         std::cout << "\twrong: " << wrong << std::endl;
00058         std::cout << "\tnotFound: " << notFound << std::endl;
00059       }
00060     };
00061     
00063 
00067     class MatchingSet{
00068     public:
00070 
00073       MatchingSet(MatchRepres _matchRep=FAST_MATCH_ACCESS);
00074       
00076 
00078       void clear();
00079       
00081 
00098       static void compareMatchingSets( MatchingSet* newMatching, MatchingSet* refMatching, MatchStatistic* statistic);
00099     
00101 
00106       static void clone(MatchingSet& old, MatchingSet& clone);
00107       
00109 
00115       void addMatching(int indA, int indB);
00116       
00118 
00122       void print();
00123       
00129       bool searchMatching(int indA, int indB);
00130     
00132       int getMaxInd(){return maxInd;}
00133     
00135 
00138       void erase(unsigned int index);
00139         
00140 
00141       
00143 
00148       std::vector< std::vector<int> > map;
00149       
00151       std::vector<int> oldIdx;
00153       std::vector<int> newIdx;
00154       
00155     private:
00157       int maxInd; 
00158       
00159       MatchRepres matchRep;   
00160     };
00161   } // namespace lines
00162 } // namespace jafar
00163 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:25 for Jafar by doxygen 1.7.6.1
LAAS-CNRS