#include <CComparisonResults.h>
Public Member Functions | |
| CComparisonResults (lCContainerType &inContainer, const CWeightingFunction &inPrototype, TID inID, const CRelevanceLevel &inQuery) | |
| double | calculateImageScore (TID inDID, const CDocumentFrequencyList &inList) const |
| double | addImageScore (TID inDID, const CDocumentFrequencyList &inList) const |
| CBitVector | compare (const CComparisonResults &inResults) const |
| double | getAsymmetry (const CComparisonResults &inResults) const |
| CWeightingFunctionPointerHash & | getWeighters () |
| void | setRelevanceLevel (double) |
| TID | getID () const |
| CRelevanceLevel const & | getQuery () const |
Private Types | |
| typedef CIFQPicHunter | lCContainerType |
| typedef set < CDocumentFrequencyElement, CSortByID_DFE > | lCScoreSet |
Private Attributes | |
| CWeightingFunctionPointerHash | mWeighters |
| lCContainerType & | mContainer |
| lCScoreSet | mScores |
| CRelevanceLevel | mQueryImage |
| TID | mID |
| CBitVector | mReturnSet |
If you want a suggestion of n< > elements get 2n< > elements. Call them the s_i.
For the same dbSize/10 (or something) elements (which we will call the e_i) calculate the distance (s_i,d_j) for all i and j possible. (Leading to something like 500 comparisons in our case).
For each s_i the delta_{ij} will be stored in a structure of the type CComparisonResults
Definition at line 70 of file CComparisonResults.h.
typedef CIFQPicHunter CComparisonResults::lCContainerType [private] |
Definition at line 72 of file CComparisonResults.h.
typedef set<CDocumentFrequencyElement,CSortByID_DFE> CComparisonResults::lCScoreSet [private] |
Definition at line 78 of file CComparisonResults.h.
| CComparisonResults::CComparisonResults | ( | lCContainerType & | inContainer, | |
| const CWeightingFunction & | inPrototype, | |||
| TID | inID, | |||
| const CRelevanceLevel & | inQuery | |||
| ) |
Definition at line 143 of file CComparisonResults.cc.
References mContainer, and mWeighters.
00146 : 00147 mContainer(inContainer), 00148 mWeighters(inPrototype), 00149 mQueryImage(inQuery), 00150 mID(inID){ 00151 mContainer.buildNormalizedQueryHash(inQuery, 00152 mWeighters); 00153 };
| double CComparisonResults::calculateImageScore | ( | TID | inDID, | |
| const CDocumentFrequencyList & | inList | |||
| ) | const |
Definition at line 107 of file CComparisonResults.cc.
References mContainer, and mWeighters.
Referenced by addImageScore().
00108 { 00109 return mContainer.FeatureListToScore(inDID, 00110 inList, 00111 mWeighters); 00112 }
| double CComparisonResults::addImageScore | ( | TID | inDID, | |
| const CDocumentFrequencyList & | inList | |||
| ) | const |
Definition at line 125 of file CComparisonResults.cc.
References calculateImageScore(), and mScores.
00126 { 00127 mScores.insert(CDocumentFrequencyElement(inDID, 00128 calculateImageScore(inDID, 00129 inList))); 00130 }
| CBitVector CComparisonResults::compare | ( | const CComparisonResults & | inResults | ) | const |
Definition at line 63 of file CComparisonResults.cc.
References mScores.
00063 { 00064 CBitVector lReturnSet; 00065 { 00066 lCScoreSet::const_iterator i=inResults.mScores.begin(); 00067 lCScoreSet::const_iterator j=mScores.begin(); 00068 for(; 00069 (i!=inResults.mScores.end()) && (i!=mScores.end()); 00070 i++,j++){ 00071 if((*j).getDocumentFrequency()>(*j).getDocumentFrequency()) 00072 lReturnSet.addBit((*i).getID()); 00073 } 00074 } 00075 00076 return lReturnSet; 00077 };
| double CComparisonResults::getAsymmetry | ( | const CComparisonResults & | inResults | ) | const |
| CWeightingFunctionPointerHash & CComparisonResults::getWeighters | ( | ) |
Definition at line 91 of file CComparisonResults.cc.
References mWeighters.
00091 { 00092 return mWeighters; 00093 }
| void CComparisonResults::setRelevanceLevel | ( | double | inRL | ) |
Definition at line 155 of file CComparisonResults.cc.
References mQueryImage, and CRelevanceLevel::setRelevanceLevel().
00155 { 00156 mQueryImage.setRelevanceLevel(inRL); 00157 }
| TID CComparisonResults::getID | ( | ) | const |
Definition at line 159 of file CComparisonResults.cc.
References mID.
00159 { 00160 return mID; 00161 }
| CRelevanceLevel const & CComparisonResults::getQuery | ( | ) | const |
Definition at line 163 of file CComparisonResults.cc.
References mQueryImage.
00163 { 00164 return mQueryImage; 00165 }
Definition at line 74 of file CComparisonResults.h.
Referenced by calculateImageScore(), CComparisonResults(), and getWeighters().
lCContainerType& CComparisonResults::mContainer [private] |
Definition at line 76 of file CComparisonResults.h.
Referenced by calculateImageScore(), and CComparisonResults().
lCScoreSet CComparisonResults::mScores [mutable, private] |
Definition at line 82 of file CComparisonResults.h.
Referenced by getQuery(), and setRelevanceLevel().
TID CComparisonResults::mID [private] |
CBitVector CComparisonResults::mReturnSet [mutable, private] |
For giving non-temporary references back: I think this is a workaround, but maybe also due to bad understanding
Definition at line 87 of file CComparisonResults.h.
1.5.6