System documentation of the GNU Image-Finding Tool

CQuery.h
1 /* -*- mode: c++ -*-
2 */
3 /*
4 
5  GIFT, a flexible content based image retrieval system.
6  Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva
7 
8  Copyright (C) 2003, 2004 Bayreuth University
9  2005 Bamberg University
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 
24 */
25 // -*- mode: c++ -*-
26 
27 #include "libMRML/include/CAccessorElement.h"
28 #include "libMRML/include/CXMLElement.h"
50 #ifndef _CQUERY
51 #define _CQUERY
52 #include "libMRML/include/uses-declarations.h"
53 #include <memory>
54 #include <map>
55 #include "libMRML/include/CSelfDestroyPointer.h"
56 #include "libMRML/include/CIDRelevanceLevelPairList.h"
57 #include "libMRML/include/CXMLElement.h"
58 
59 //#include "CWeightingFunctionPointerList.h"
60 //#include "CWeightingFunctionPointerHash.h"
61 
62 #include "libMRML/include/CAlgorithm.h"
63 #include "libMRML/include/CAccessor.h"
64 #include "libMRML/include/CAccessorAdminCollection.h"
65 #include "libMRML/include/CAccessorAdmin.h"
66 #include "libMRML/include/CMagic.h" //public CMagic
67 
68 class CScoreBoard;
69 class CAccessor;
70 
71 
73 class CQuery:public CMagic{
74 
75 protected:
92 
93 
99 
103  class lCChild{
104  public:
108  double mWeight;
109  };
111  typedef list<lCChild> lCChildren;
115 
116 
117 
118 protected:
124  virtual void init()=0;
125 
126 public:
132  CQuery();
138  virtual ~CQuery();
151  CQuery(CAccessorAdminCollection& inAccessorAdminCollection,
152  CAlgorithm& inAlgorithm);
153 
159  void addChild(CQuery* inChild,
160  double inWeight=1);
161 
162 
168  virtual CXMLElement* query(const CXMLElement& inQuery);
169 
176  virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery,
177  int inNumberOfInterestingImages,
178  double inDifferenceToBest)=0;
179 
185  virtual CXMLElement* getRandomImages(int inNumberOfInterestingImages)const;
191  virtual CIDRelevanceLevelPairList* getRandomIDs(int inNumberOfInterestingImages)const;
197  virtual list<TID>* getAllIDs()const;
203  virtual list<CAccessorElement>* getAllAccessorElements()const;
210  virtual bool setAlgorithm(CAlgorithm& inAlgorithm);
217  const CAlgorithm& getAlgorithm()const;
218 
226  virtual void finishInit();
227 
228 }; /* end of class */
229 
230 #endif
231 

Need for discussion? Want to contribute? Contact
help-gift@gnu.org Generated using Doxygen