00001 #ifndef _GROUPS_MATCHING_HPP_
00002 #define _GROUPS_MATCHING_HPP_
00003
00004 #include "facetsmap/types.hpp"
00005
00006 namespace jafar {
00007 namespace facetsmap {
00008 struct Candidat {
00009 Facet* facet;
00010 double incdensity;
00011 vFacets closeOnes;
00012
00015 bool operator<(const Candidat& c ) const {
00016 return c.incdensity > incdensity;
00017 }
00018 };
00019 typedef std::vector<Candidat> vCandidats;
00020 typedef vCandidats::iterator vCandidats_it;
00021 typedef vCandidats::const_iterator vCandidats_cit;
00022 struct isCandidatForFacet {
00023 isCandidatForFacet(Facet* nf) : f(nf) { }
00024 bool operator()(const Candidat& c)
00025 {
00026 return c.facet == f;
00027 }
00028 Facet *f;
00029 };
00030
00031 class GroupsMatching {
00032 public:
00033 static void findGroupMatches(vCandidats& candidats, vFacets& candidatsFacets);
00034 };
00035
00036 }
00037 }
00038
00039 #endif