CAcInvertedFileAbstraction Class

# CAcInvertedFileAbstraction Class Reference

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

An accessor to an inverted file More...

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

## Public Members

- virtual bool operator() ()
- CAcInvertedFileAbstraction (const CXMLElement& inCollectionElement)
- ~CAcInvertedFileAbstraction ()
- virtual string IDToURL (TID inID)
- virtual 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)
- virtual bool generateInvertedFile ()
- virtual bool checkConsistency ()
- virtual list<TID>* getAllFeatureIDs ()

## 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

## CAcInvertedFileAbstraction(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.

## ~CAcInvertedFileAbstraction()

Destructor

## virtual string IDToURL(TID inID)

Translate a DocumentID to a URL (for output)

## virtual 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

## virtual bool generateInvertedFile()

Generating an inverted File, if there is none.

## virtual bool checkConsistency()

Check the consistency of the inverted file system accessed

## virtual list<TID>* getAllFeatureIDs()

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

| Kdoc