System documentation of the GNU Image-Finding Tool

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

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     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 */
00023 // -*- mode: c++ -*-
00024 
00025 
00026 class CXMLElement;
00027 
00050 #ifndef _CINVERTEDFILEACCESSOR
00051 #define _CINVERTEDFILEACCESSOR
00052 #include "libGIFTAcInvertedFile/include/uses-declarations.h"
00053 #include <string>
00054 #include "libMRML/include/TID.h"
00055 #include "libMRML/include/CAccessor.h"
00056 #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h"
00057 #include <iostream>
00058 #include <fstream>
00059 #include <map>
00060 #include <vector>
00061 #ifdef HAS_HASH_MAP
00062 #include <hash_map>
00063 #else
00064 #define hash_map map
00065 #endif
00066 
00067 #include <functional>
00068 #include <algorithm>
00069 
00070 #include "libMRML/include/CMagic.h"
00071 
00072 
00073 typedef TID TFeatureID ;
00074 
00081 class CAcInvertedFile:public CAccessor{  
00082 
00083 public:
00085   virtual bool operator()()const =0;
00086 
00090   virtual string IDToURL(TID inID)const =0;
00091 
00093   virtual pair<bool,TID> URLToID(const string& inURL)const =0;
00094   
00111   virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const =0;
00112 
00114   virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const =0;
00115 
00117   virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const =0;
00118 
00131 
00132 
00136   virtual double FeatureToCollectionFrequency(TFeatureID)const =0;
00137 
00139   virtual unsigned int getFeatureDescription(TID inFeatureID)const =0;
00141 
00145   virtual double DIDToMaxDocumentFrequency(TID)const =0;
00146 
00148   virtual double DIDToDFSquareSum(TID)const =0;
00149 
00151   virtual double DIDToSquareDFLogICFSum(TID)const =0;
00153 
00154   /*@name Inverted File Generation and Consistency Checking*/
00156 
00159   virtual bool generateInvertedFile() =0;
00160 
00163   virtual bool checkConsistency() =0;
00164 
00166 
00174   virtual list<TID>* getAllFeatureIDs()const =0;
00175 };
00176 
00177 #endif

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