CAcIFMySQL Class

# CAcIFMySQL Class Reference

[CADIHash.h Index] [CADIHash.h Hierarchy]

An accessor to an inverted file More...

`#include <../libInvertedFile/include/CAcIFMySQL.h>`

Inherits: CAccessor

## Public Members

- virtual bool operator() ()
- CAcIFMySQL (const CXMLElement& inCollectionElement)
- ~CAcIFMySQL ()
- virtual string IDToURL (TID inID)
- virtual pair<bool,TID> URLToID (const string& inURL)
- virtual CDocumentFrequencyList* FeatureToList (TFeatureID inFID)
- virtual CDocumentFrequencyList* URLToFeatureList (string inURL)
- virtual CDocumentFrequencyList* DIDToFeatureList (TID inDID)
- virtual double FeatureToCollectionFrequency (TFeatureID)
- virtual unsigned int getFeatureDescription (TID inFeatureID)
- virtual double DIDToMaxDocumentFrequency (TID)
- virtual double DIDToDFSquareSum (TID)
- virtual double DIDToSquareDFLogICFSum (TID)
- void CAcIFMySQL::getAllIDs ( list<TID > &)
- void CAcIFMySQL::getAllAccessorElements ( list<CAccessorElement> &)
- void CAcIFMySQL::getRandomIDs (list<TID > &, size_t)
- void CAcIFMySQL::getRandomAccessorElements (list<CAccessorElement > &, size_t)
- virtual list<TID>* getAllFeatureIDs ()
- virtual pair<bool,CAccessorElement> IDToAccessorElement (TID inID)
- int CAcIFMySQL::size ()
- CAcIFMySQL::operator bool ()

## Protected Members

- int CAcIFMySQL::recordCount (string ltableName)
- bool CAcIFMySQL::selectDB ( string)
- bool CAcIFMySQL::createDB ( string)
- bool CAcIFMySQL::dropDB ( string)
- void CAcIFMySQL::initialiseGIFTTables (bool, bool,string)

## Detailed Description

An accessor to an inverted file. This access is done "by hand" at present this not really efficient, however we plan to move to memory mapped files.

## virtual bool operator()()

for testing if the inverted file is correctly constructed

## CAcIFMySQL(const CXMLElement& inCollectionElement)

This opens an exsisting inverted file, and then inits this structure. After that it is fully usable

As a paramter it takes an XMLElement which contains a "collection" element and its content.

If the attribute vi-generate-inverted-file is true, then a new inverted file will be generated using the parameters given in inCollectionElement. you will NOT be able to use *this afterwards.

The REAL constructor.

## ~CAcIFMySQL()

Destructor

## virtual string IDToURL(TID inID)

Translate a DocumentID to a URL (for output)

## virtual pair<bool,TID> URLToID(const string& inURL)

Translate an URL to its document ID

## virtual CDocumentFrequencyList* FeatureToList(TFeatureID inFID)

Give the List of documents containing the feature inFID

CORNELIA: CDocumentFrequencyList ist nichts anderes als eine liste von

int,float paaren:

struct{ int mID, float mFrequency; }

## virtual CDocumentFrequencyList* URLToFeatureList(string inURL)

List of features contained by a document with URL inURL

## virtual CDocumentFrequencyList* DIDToFeatureList(TID inDID)

List of features contained by a document with ID inDID

## virtual double FeatureToCollectionFrequency(TFeatureID)

Collection frequency for a given feature

## virtual unsigned int getFeatureDescription(TID inFeatureID)

What kind of feature is the feature with ID inFeatureID?

## virtual double DIDToMaxDocumentFrequency(TID)

returns the maximum document frequency for one document ID

## virtual double DIDToDFSquareSum(TID)

Returns the document-frequency square sum for a given document ID

## virtual double DIDToSquareDFLogICFSum(TID)

Returns this function for a given document ID

## void CAcIFMySQL::getAllIDs( list<TID > &)

Getting a list of all features contained in this.This function is necessary, because in the present system only about 50 percent of the features are really used.

A feature is considered used if it arises in at least one image

## virtual pair<bool,CAccessorElement> IDToAccessorElement(TID inID)

Translate a DocumentID to an accessor Element

| Kdoc