System documentation of the GNU Image-Finding Tool

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

CAcInvertedFileAbstraction.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/CSelfDestroyPointer.h"
00056 #include "libMRML/include/CArraySelfDestroyPointer.h"
00057 #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h"
00058 #include "CCollectionFrequencyList.h"
00059 #include "libGIFTAcInvertedFile/include/CADIHash.h"
00060 #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h"
00061 #include <iostream>
00062 #include <fstream>
00063 #include <map>
00064 #include <vector>
00065 #ifdef HAS_HASH_MAP
00066 #include <hash_map>
00067 #else
00068 #define hash_map map
00069 #endif
00070 #include <functional>
00071 #include <algorithm>
00072 
00073 #include "libMRML/include/CMagic.h"
00074 
00075 
00076 typedef TID TFeatureID ;
00077 
00084 class CAcInvertedFileAbstraction{  
00085 
00086 public:
00088   virtual bool operator()()const =0;
00089 
00104   CAcInvertedFileAbstraction(const CXMLElement& inCollectionElement);
00106   ~CAcInvertedFileAbstraction();
00107 
00111   virtual string IDToURL(TID inID)const =0;
00112 
00114   virtual TID URLToID(const string& inURL)const =0;
00115   
00132   virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const =0;
00133 
00135   virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const =0;
00136 
00138   virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const =0;
00139 
00152 
00153 
00157   virtual double FeatureToCollectionFrequency(TFeatureID)const =0;
00158 
00160   virtual unsigned int getFeatureDescription(TID inFeatureID)const =0;
00162 
00166   virtual double DIDToMaxDocumentFrequency(TID)const =0;
00167 
00169   virtual double DIDToDFSquareSum(TID)const =0;
00170 
00172   virtual double DIDToSquareDFLogICFSum(TID)const =0;
00174 
00175   /*@name Inverted File Generation and Consistency Checking*/
00177 
00180   virtual bool generateInvertedFile() =0;
00181 
00184   virtual bool checkConsistency() =0;
00185 
00187 
00195   virtual list<TID>* getAllFeatureIDs()const =0;
00196 };
00197 
00198 #endif

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