/* -*- mode: c++ -*-
*/
/*
GIFT, a flexible content based image retrieval system.
Copyright (C) 1998, 1999, 2000 CUI, University of Geneva
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// -*- mode: c++ -*-
#ifndef _CIFQUICKANDDIRTYHUNTER
#define _CIFQUICKANDDIRTYHUNTER
//#include "CComparisonResults.h"
//#include "CBitVector.h"
//#include "CBitSetCollection.h"
#include "CXMLElement.h"
#include "CEnhancedPicHunter.h"
#include "CSquasher.h"
#include "CQInvertedFile.h"
#include "CSelfDestroyPointer.h"
/**
*
* @name CIFQuickAndDirtyHunter
* @short A PicHunter like scheme, implemented using
* distance matrices for efficiency reasons
*
* modification history:
*
* WM : Created in April 1999
* submitted to CVS in
*
*
*
* compiler defines used:
*
*
*/
class CIFQuickAndDirtyHunter : public CQuery,
protected CEnhancedPicHunter{
protected:
/** */
int mNumberOfImages;
/** */
int mNumberOfTries;
/** */
double mPositiveThreshold;
/** */
double mNegativeThreshold;
public:
/**
*
* constructor
*
*/
CIFQuickAndDirtyHunter (CAccessorCollection& inAccessorCollection,
CAlgorithm& inAlgorithm);
/**
*
* initialize: common parts between constructors
*
*/
void init();
/**
*
* Setting the collection, i.e. distance matrix and accessor
*
*/
bool setCollection(class CAccessorProxy& inCollection);
/**
*
* Setting the algorithm, i.e. the squasher/feedback method etc.
*
*/
bool setAlgorithm(class CAlgorithm& inAlgorithm);
/**
*
* @short a query which returns ID/RelevanceLevel pairs instead of
* instead of URL/RelevanceLevel pairs
* In fact, this not a query, but it
* takes feedback and gives a suggestion
*
*/
virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery,
int inNumberOfInterestingImages,
double inDifferenceToBest);
/** */
void setSquasher(CSquasher* inSquasher);
/** */
void setNumberOfTries(int inNumberOfTries);
/** */
void setPositiveThreshold(double inPositiveThreshold);
/** */
void setNegativeThreshold(double inNegativeThreshold);
/** */
void setDepthOfMemory(int inDepthOfMemory);
/** */
void setForgetAfterNthInconsistency(int inFANI);
/** */
void makeEmptySet(CProbabilisticSet<int>& inoutSet);
/**
*
* functions for performing pseudo feedback
*
*/
bool getFeedbackList(TID inTargetID,
CRelevanceLevelList& outUserFeedback,
const CRelevanceLevelList& inSuggestion);
};
#endif
Documentation generated by muellerw@pc7170 on Son Okt 8 16:04:40 CEST 2000