System documentation of the GNU Image-Finding Tool

CAcInvertedFile.h
00001 /* -*- mode: c++ -*- 
00002 */
00003 /* 
00004 
00005     GIFT, a flexible content based image retrieval system.
00006     Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva
00007 
00008      Copyright (C) 2003, 2004 Bayreuth University
00009       2005 Bamberg University
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019 
00020     You should have received a copy of the GNU General Public License
00021     along with this program; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 
00024 */
00025 // -*- mode: c++ -*-
00026 
00027 
00028 class CXMLElement;
00029 
00052 #ifndef _CINVERTEDFILEACCESSOR
00053 #define _CINVERTEDFILEACCESSOR
00054 #include "libGIFTAcInvertedFile/include/uses-declarations.h"
00055 #include <string>
00056 #include "libMRML/include/TID.h"
00057 #include "libMRML/include/CAccessor.h"
00058 #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h"
00059 #include <iostream>
00060 #include <fstream>
00061 #include <map>
00062 #include <vector>
00063 #ifdef HAS_HASH_MAP
00064 #include <hash_map>
00065 #else
00066 #define hash_map map
00067 #endif
00068 
00069 #include <functional>
00070 #include <algorithm>
00071 
00072 #include "libMRML/include/CMagic.h"
00073 
00074 
00075 typedef TID TFeatureID ;
00076 
00083 class CAcInvertedFile:public CAccessor{  
00084 
00085 public:
00087   virtual bool operator()()const =0;
00088 
00092   virtual string IDToURL(TID inID)const =0;
00093 
00095   virtual pair<bool,TID> URLToID(const string& inURL)const =0;
00096   
00113   virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const =0;
00114 
00116   virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const =0;
00117 
00119   virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const =0;
00120 
00133 
00134 
00138   virtual double FeatureToCollectionFrequency(TFeatureID)const =0;
00139 
00141   virtual unsigned int getFeatureDescription(TID inFeatureID)const =0;
00143 
00147   virtual double DIDToMaxDocumentFrequency(TID)const =0;
00148 
00150   virtual double DIDToDFSquareSum(TID)const =0;
00151 
00153   virtual double DIDToSquareDFLogICFSum(TID)const =0;
00155 
00156   /*@name Inverted File Generation and Consistency Checking*/
00158 
00161   virtual bool generateInvertedFile() =0;
00162 
00165   virtual bool checkConsistency() =0;
00166 
00168 
00176   virtual list<TID>* getAllFeatureIDs()const =0;
00177 };
00178 
00179 #endif

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