FIXME: The name WRONGLY suggests that this actually does parallel processing. More...
#include <CQParallel.h>
Classes | |
class | lCLocalAccessor |
used in CLocalAccessorMap | |
class | lCLocalAccessorMap |
Main idea of this class is to translate URLs from each collection involved into IDs. |
Public Member Functions | |
~CQParallel () | |
we need to unregister the accessors used | |
CQParallel (CAccessorAdminCollection &inAccessorAdminCollection, CAlgorithm &inAlgorithm) | |
In fact, what we are doing here is to get ourselves an accessor ACURL2FTS to do a proper fastQuery. | |
virtual CXMLElement * | query (const CXMLElement &inQuery, int inNumberOfInterestingImages, double inDifferenceToBest) |
calls fastQuery for every child, merges the results and translates them back into URLs difficulty: take into account that each child might operate on a different collection. | |
virtual CIDRelevanceLevelPairList * | fastQuery (const CXMLElement &inQuery, int inNumberOfInterestingImages, double inDifferenceToBest) |
FIXME: useless in current scenario. | |
virtual CXMLElement * | getRandomImages (int inNumberOfInterestingImages) const |
get some random images | |
virtual list< TID > * | getAllIDs () const |
get the IDs of all images (handed through to accessor) | |
virtual list< string > * | getAllURLs () const |
get the IDs of all images (handed through to accessor) | |
virtual list< pair< TID, string > > * | getAllIDURLPairs () const |
get the IDs of all images (handed through to accessor) | |
virtual bool | setAlgorithm (CAlgorithm &inAlgorithm) |
set the Algorithm. | |
void | finishInit () |
it might be necessary to wait until all the children are added before ending the initialisation phase. | |
![]() | |
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 CXMLElement * | query (const CXMLElement &inQuery) |
do a query | |
virtual CIDRelevanceLevelPairList * | getRandomIDs (int inNumberOfInterestingImages) const |
get some random images (handed through to accessor) | |
virtual list< CAccessorElement > * | getAllAccessorElements () const |
get the IDs of all images (handed through to accessor) | |
const CAlgorithm & | getAlgorithm () const |
get the Algorithm. | |
![]() | |
void | check () const |
This function checks the magic number of this and asserts to zero, if something is wrong, if things are ok, this function keeps quiet. | |
void | checkNPrint () const |
as check(), but it also prints a small message to cout, saying that the check worked. | |
CMagic () | |
sets the magic number to 42 | |
~CMagic () | |
sets the magic number to another value (36) |
Protected Member Functions | |
virtual void | init () |
Initializer, used by both construcors. |
Additional Inherited Members | |
![]() | |
typedef list< lCChild > | lCChildren |
type for children of this | |
![]() | |
CAccessor * | mAccessor |
needed to translate URLs to IDs this is a pointer, only because we cannot change references it does not imply any destruction responsability | |
CAccessorAdmin * | mAccessorAdmin |
This is where the the Accessor comes from. | |
CAlgorithm * | mAlgorithm |
the structure containing everything we know about the algorithm used do not destroy this | |
lCChildren | mChildren |
The children of this. |
FIXME: The name WRONGLY suggests that this actually does parallel processing.
It should be relatively quick to add, it is intendend, but it is not yet done.
This is going to be one of our main building blocks. It is a structure which contains a couple of CQuery structures, hands a query through to them, and then unifies the result. In fact this is the center of all this query tree business.
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.
: Wolfgang Müller
CQParallel::~CQParallel | ( | ) |
we need to unregister the accessors used
|
virtual |
FIXME: useless in current scenario.
Generally using IDs instead of URLs (for keeping communication overhead low, when doing things like CORBA).
in this case we simply hand things through. this might be some kind of "take it and translate it" thing. however, at present we save the work.
Implements CQuery.
|
virtual |
it might be necessary to wait until all the children are added before ending the initialisation phase.
This function is called by CAlgorithm.
What we are doing here is to find out the necessary accessor information for each child, and construct an accessor for it.
Reimplemented from CQuery.
|
virtual |
get the IDs of all images (handed through to accessor)
Reimplemented from CQuery.
|
virtual |
get the IDs of all images (handed through to accessor)
|
virtual |
get the IDs of all images (handed through to accessor)
|
virtual |
get some random images
Reimplemented from CQuery.
|
protectedvirtual |
Initializer, used by both construcors.
Implements CQuery.
|
virtual |