System documentation of the GNU Image-Finding Tool

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      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/CSelfDestroyPointer.h"
00058 #include "libMRML/include/CArraySelfDestroyPointer.h"
00059 #include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h"
00060 #include "CCollectionFrequencyList.h"
00061 #include "libGIFTAcInvertedFile/include/CADIHash.h"
00062 #include "libGIFTAcURL2FTS/include/CAcURL2FTS.h"
00063 #include <iostream>
00064 #include <fstream>
00065 #include <map>
00066 #include <vector>
00067 #ifdef HAS_HASH_MAP
00068 #include <hash_map>
00069 #else
00070 #define hash_map map
00071 #endif
00072 #include <functional>
00073 #include <algorithm>
00074 
00075 #include "libMRML/include/CMagic.h"
00076 
00077 
00078 typedef TID TFeatureID ;
00079 
00086 class CAcInvertedFileAbstraction{  
00087 
00088 public:
00090   virtual bool operator()()const =0;
00091 
00106   CAcInvertedFileAbstraction(const CXMLElement& inCollectionElement);
00108   ~CAcInvertedFileAbstraction();
00109 
00113   virtual string IDToURL(TID inID)const =0;
00114 
00116   virtual TID URLToID(const string& inURL)const =0;
00117   
00134   virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)const =0;
00135 
00137   virtual CDocumentFrequencyList* URLToFeatureList(string inURL)const =0;
00138 
00140   virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)const =0;
00141 
00154 
00155 
00159   virtual double FeatureToCollectionFrequency(TFeatureID)const =0;
00160 
00162   virtual unsigned int getFeatureDescription(TID inFeatureID)const =0;
00164 
00168   virtual double DIDToMaxDocumentFrequency(TID)const =0;
00169 
00171   virtual double DIDToDFSquareSum(TID)const =0;
00172 
00174   virtual double DIDToSquareDFLogICFSum(TID)const =0;
00176 
00177   /*@name Inverted File Generation and Consistency Checking*/
00179 
00182   virtual bool generateInvertedFile() =0;
00183 
00186   virtual bool checkConsistency() =0;
00187 
00189 
00197   virtual list<TID>* getAllFeatureIDs()const =0;
00198 };
00199 
00200 #endif

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