#include <CQMultiple.h>
Inheritance diagram for CQMultiple:
Public Member Functions | |
CQMultiple () | |
~CQMultiple () | |
CQMultiple (CAccessorAdminCollection &inAccessorAdminCollection, CAlgorithm &inAlgorithm) | |
In fact, what we are doing here is to get ourselves an accessor ACURL2FTS to do a proper fastQuery. | |
virtual CIDRelevanceLevelPairList * | fastQuery (const CXMLElement &inQuery, int inNumberOfInterestingImages, double inDifferenceToBest) |
virtual CXMLElement * | query (const CXMLElement &inQuery) |
virtual bool | setAlgorithm (CAlgorithm &inAlgorithm) |
Static Public Member Functions | |
static void * | doFastQueryThread (void *) |
This function processes is in the inner loop of fastQuery. | |
static void * | doQueryThread (void *) |
This function processes is in the inner loop of query. | |
Protected Member Functions | |
void | init () |
Protected Attributes | |
bool | mUsesResultURLs |
do we merge result URLs or result IDs? |
Probably we will put another layer into the class tree: The CQTreeNode, but let's first start.
Important: The basic assumption here is, that all children operate on the same collections. If this is not the case we have to be more careful, and most of all: we have to operate using URLs.
[in the following I am talking about things I WANT to do, so the two modes stuff is not yet implemented]
CQMultiple has two minor modes:
Merge-by-ID or Merge-by-URL
In the first case, we need information on how to translate image IDs to image URLs. We dispatche a fastQuery()
to each child node, and then we merge the results (by imageID). The resulting list of ID-relevancelevel pairs is translated back to URLs using an URL2FTS accessor.
Please note that I am aware that this needs refactoring: we should have an ULRToID accessor superclass, which provides the necessary translation services, without being fixed on a given data representation.
In the second case, we do not need any additional information: we dispatch a query()
(as opposed to fastQuery()
) to the child nodes, and then we merge the results. This means we have to merge plenty of XML.
: Wolfgang Müller
|
default constructor |
|
we need to unregister the accessors used |
|
This function processes is in the inner loop of fastQuery. If multithreading is possible on the system on which GIFT was compiled, then this function will run in a thread, and fastQuery will wait for it |
|
This function processes is in the inner loop of query. If multithreading is possible on the system on which GIFT was compiled, then this function will run in a thread, and fastQuery will wait for it |
|
calls fastQuery for every child, merges the results Implements CQuery. |
|
Initializer, used by both construcors Implements CQuery. |
|
calls query for every child, merges the results by URLs Reimplemented from CQuery. |
|
set the Algorithm. same scheme as in setCollection Reimplemented from CQuery. |