System documentation of the GNU Image-Finding Tool

CQuery Class Reference

The Query manager for Queries on inverted Files. More...

#include <CQuery.h>

Inheritance diagram for CQuery:

CMagic CQHierarchy CQInvertedFile CQMultiple CQParallel

List of all members.

Classes

class  lCChild
 A child of this. More...

Public Member Functions

 CQuery ()
 default constructor
virtual ~CQuery ()
 destructor
 CQuery (CAccessorAdminCollection &inAccessorAdminCollection, CAlgorithm &inAlgorithm)
 this constructor takes all the information ANY CQuery needs to configure itself.
void addChild (CQuery *inChild, double inWeight=1)
 adding a child to this.
virtual CXMLElementquery (const CXMLElement &inQuery)
 do a query
virtual CIDRelevanceLevelPairList * fastQuery (const CXMLElement &inQuery, int inNumberOfInterestingImages, double inDifferenceToBest)=0
 a query which returns ID/RelevanceLevel pairs instead of instead of URL/RelevanceLevel pairs
virtual CXMLElementgetRandomImages (int inNumberOfInterestingImages) const
 get some random images (handed through to accessor)
virtual CIDRelevanceLevelPairList * getRandomIDs (int inNumberOfInterestingImages) const
 get some random images (handed through to accessor)
virtual list< TID > * getAllIDs () const
 get the IDs of all images (handed through to accessor)
virtual list< CAccessorElement > * getAllAccessorElements () const
 get the IDs of all images (handed through to accessor)
virtual bool setAlgorithm (CAlgorithm &inAlgorithm)
 set the Algorithm.
const CAlgorithmgetAlgorithm () const
 get the Algorithm.
virtual void finishInit ()
 it might be necessary to wait until all the children are added before ending the initialisation phase.

Protected Types

typedef list< lCChildlCChildren
 type for children of this

Protected Member Functions

virtual void init ()=0
 Initializer, used by both construcors.

Protected Attributes

CAccessormAccessor
 needed to translate URLs to IDs this is a pointer, only because we cannot change references it does not imply any destruction responsability
CAccessorAdminmAccessorAdmin
 This is where the the Accessor comes from.
CAccessorAdminCollectionmAccessorAdminCollection
 Where to get CAccessorAdmins from.
CAlgorithmmAlgorithm
 the structure containing everything we know about the algorithm used do not destroy this
lCChildren mChildren
 The children of this.


Detailed Description

The Query manager for Queries on inverted Files.

Constructor & Destructor Documentation

CQuery::CQuery (  ) 

default constructor

virtual CQuery::~CQuery (  )  [virtual]

destructor

CQuery::CQuery ( CAccessorAdminCollection inAccessorAdminCollection,
CAlgorithm inAlgorithm 
)

this constructor takes all the information ANY CQuery needs to configure itself.

inAccessorAdminCollection The CQuery needs to know where to get the right accessor from. inAlgorithm This structure contains all the information about the algorithm, including which accessor to get.


Member Function Documentation

void CQuery::addChild ( CQuery inChild,
double  inWeight = 1 
)

adding a child to this.

We expect children to be nonzero and initialised when they are entered. this assumes no destruction responsabilities for the entered data.

virtual CIDRelevanceLevelPairList* CQuery::fastQuery ( const CXMLElement inQuery,
int  inNumberOfInterestingImages,
double  inDifferenceToBest 
) [pure virtual]

a query which returns ID/RelevanceLevel pairs instead of instead of URL/RelevanceLevel pairs

Implemented in CQMultiple, CQParallel, CQInvertedFile, and CQHierarchy.

virtual void CQuery::finishInit (  )  [virtual]

it might be necessary to wait until all the children are added before ending the initialisation phase.

This function is called by CAlgorithm.

Reimplemented in CQParallel, and CQInvertedFile.

const CAlgorithm& CQuery::getAlgorithm (  )  const

get the Algorithm.

same scheme as in setCollection

virtual list<CAccessorElement>* CQuery::getAllAccessorElements (  )  const [virtual]

get the IDs of all images (handed through to accessor)

virtual list<TID>* CQuery::getAllIDs (  )  const [virtual]

get the IDs of all images (handed through to accessor)

Reimplemented in CQParallel.

virtual CIDRelevanceLevelPairList* CQuery::getRandomIDs ( int  inNumberOfInterestingImages  )  const [virtual]

get some random images (handed through to accessor)

virtual CXMLElement* CQuery::getRandomImages ( int  inNumberOfInterestingImages  )  const [virtual]

get some random images (handed through to accessor)

Reimplemented in CQParallel.

virtual void CQuery::init (  )  [protected, pure virtual]

Initializer, used by both construcors.

Implemented in CQMultiple, CQParallel, CQInvertedFile, and CQHierarchy.

virtual CXMLElement* CQuery::query ( const CXMLElement inQuery  )  [virtual]

do a query

Reimplemented in CQMultiple.

virtual bool CQuery::setAlgorithm ( CAlgorithm inAlgorithm  )  [virtual]

set the Algorithm.

set a new algorithm. Build a new query if necessary.

Reimplemented in CQMultiple, CQParallel, CQInvertedFile, and CQHierarchy.


Member Data Documentation

This is where the the Accessor comes from.

Also the AccessorAdmin is not to be deleted by this.


The documentation for this class was generated from the following file:

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