1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
|
diff -Nur gift-0.1.14.orig/libMRML/include/CAttributeList.h gift-0.1.14/libMRML/include/CAttributeList.h
--- gift-0.1.14.orig/libMRML/include/CAttributeList.h 2005-03-24 10:18:16.000000000 +0100
+++ gift-0.1.14/libMRML/include/CAttributeList.h 2007-05-13 09:31:05.000000000 +0200
@@ -79,7 +79,7 @@
virtual pair<bool,string> stringReadAttribute(const string& inAttribute)const;
/** Outputting a string to XML
*/
- void CAttributeList::toXML(string& outString)const;
+ void toXML(string& outString)const;
/** the destructor
in the case of char* as content it deletes the arrays of char.
*/
diff -Nur gift-0.1.14.orig/libMRML/include/CAccessorAdmin.h gift-0.1.14/libMRML/include/CAccessorAdmin.h
--- gift-0.1.14.orig/libMRML/include/CAccessorAdmin.h 2005-03-24 10:18:16.000000000 +0100
+++ gift-0.1.14/libMRML/include/CAccessorAdmin.h 2007-05-13 10:28:58.000000000 +0200
@@ -111,11 +111,11 @@
/** destructor */
~CAccessorAdmin();
/** */
- string CAccessorAdmin::getAlgorithmIDListID()const;
+ string getAlgorithmIDListID()const;
/** */
- string CAccessorAdmin::getName()const;
+ string getName()const;
/** */
- string CAccessorAdmin::getID()const;
+ string getID()const;
/** for sorting */
friend class CSortByName_pAP;
diff -Nur gift-0.1.14.orig/libMRML/include/CI18nTranslator.h gift-0.1.14/libMRML/include/CI18nTranslator.h
--- gift-0.1.14.orig/libMRML/include/CI18nTranslator.h 2005-03-24 10:18:16.000000000 +0100
+++ gift-0.1.14/libMRML/include/CI18nTranslator.h 2007-05-13 10:33:58.000000000 +0200
@@ -98,11 +98,11 @@
void translateXMLTree(string inLanguageCode,
CXMLElement& inoutToBeTranslated)const;
/** for parsing the config file */
- static void CI18nTranslator::startXMLElement(void *inUserData,
+ static void startXMLElement(void *inUserData,
const char *inElementName,
const char **inAttributes);
/** for parsing the config file */
- static void CI18nTranslator::endXMLElement(void *inUserData,
+ static void endXMLElement(void *inUserData,
const char *inElementName);
};
#endif
diff -Nur gift-0.1.14.orig/libMRML/include/CSessionManager.h gift-0.1.14/libMRML/include/CSessionManager.h
--- gift-0.1.14.orig/libMRML/include/CSessionManager.h 2005-03-24 10:18:16.000000000 +0100
+++ gift-0.1.14/libMRML/include/CSessionManager.h 2007-05-13 10:34:50.000000000 +0200
@@ -172,18 +172,18 @@
bool rename(const string& inName);
/** the list of preferred languages of this
is cleared */
- void CSession::clearLanguages();
+ void clearLanguages();
/** one language code is added at the back of the list
of preferred languages */
- void CSession::addLanguage(string inLanguageCode);
+ void addLanguage(string inLanguageCode);
/** commit the list of languages. That means, here the
actual language that will be used throughout the
translation is determined */
- void CSession::commitLanguages(const CI18nTranslator& inTranslator);
+ void commitLanguages(const CI18nTranslator& inTranslator);
/** get the preferred languages of this session */
list<string> CSession::getLanguages()const;
/** get the preferred languages of this session */
- string CSession::getPreferredLanguage()const;
+ string getPreferredLanguage()const;
//--------------------------------------------------
/** generating XML output for configuration/shandshake */
@@ -420,7 +420,7 @@
/** i18n: get the list of preferred languages of this session */
list<string> getSessionLanguages(const string& inSessionID)const;
/** i18n: get the list of preferred languages of this session */
- void CSessionManager::translate(string inSessionID,
+ void translate(string inSessionID,
CXMLElement& inoutToBeTranslated)const;
};
diff -Nur gift-0.1.14.orig/libMRML/include/CSessionManager.h gift-0.1.14/libMRML/include/CSessionManager.h
--- gift-0.1.14.orig/libMRML/include/CSessionManager.h 2007-05-13 10:35:39.000000000 +0200
+++ gift-0.1.14/libMRML/include/CSessionManager.h 2007-05-13 11:21:01.000000000 +0200
@@ -181,7 +181,7 @@
translation is determined */
void commitLanguages(const CI18nTranslator& inTranslator);
/** get the preferred languages of this session */
- list<string> CSession::getLanguages()const;
+ list<string> getLanguages()const;
/** get the preferred languages of this session */
string getPreferredLanguage()const;
diff -Nur gift-0.1.14.orig/libMRML/cc/CAttributeList.cc gift-0.1.14/libMRML/cc/CAttributeList.cc
--- gift-0.1.14.orig/libMRML/cc/CAttributeList.cc 2005-03-24 10:18:15.000000000 +0100
+++ gift-0.1.14/libMRML/cc/CAttributeList.cc 2007-05-13 11:30:47.000000000 +0200
@@ -94,7 +94,7 @@
if(strcmp(i->second.first,
i->second.second)){
- cout << "DELETING FAILED" << flush << int(i->second.second) << flush << i->second.first << i->second.second << endl;
+ cout << "DELETING FAILED" << flush << i->second.second << flush << i->second.first << i->second.second << endl;
assert(0);
}
delete[] i->second.first;
diff -Nur gift-0.1.14.orig/libMRML/cc/CAttributeList.cc~ gift-0.1.14/libMRML/cc/CAttributeList.cc~
--- gift-0.1.14.orig/libMRML/cc/CAttributeList.cc~ 1970-01-01 01:00:00.000000000 +0100
+++ gift-0.1.14/libMRML/cc/CAttributeList.cc~ 2005-03-24 10:18:15.000000000 +0100
@@ -0,0 +1,418 @@
+// -*- mode: c++ -*-
+/*
+
+ GIFT, a flexible content based image retrieval system.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva
+
+ Copyright (C) 2003, 2004 Bayreuth University
+ 2005 Bamberg University
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+#include "libMRML/include/CAttributeList.h"
+#include "string.h"
+#include <cstdio>
+#include "libMRML/include/CMutex.h"
+#include <iostream>
+#include <algorithm>
+extern CMutex* gMutex;
+
+CAttributeList::CAttributeList(const char * const * const inAttributeList){
+ clear();
+ if(inAttributeList){
+ const char*const* lAttributes(inAttributeList);
+ while(lAttributes[0] && strlen(lAttributes[0])){
+ if(strlen(lAttributes[0])>200){
+ cerr << __FILE__ << ":"
+ << __LINE__ << ":" << flush
+ << "lAttributes[0] too long:[" << endl
+ << lAttributes[0]
+ << "]ENDOF STRING"
+ << endl;
+ };//for debugging purposes DEBUG
+ if(strlen(lAttributes[1])>200){
+ cerr << __FILE__ << ":"
+ << __LINE__ << ":" << flush
+ << "lAttributes[1] too long:[" << endl
+ << lAttributes[1]
+ << "]ENDOF STRING"
+ << endl;
+ };//for debugging purposes DEBUG
+#ifndef _IS_SEQUENCE_AL
+ gMutex->lock();
+ if(lAttributes[1]){
+ // cout << "[L" << strlen(lAttributes[1]) << "L]" << flush;
+ if(strlen(lAttributes[1])){
+
+ int lLen(strlen(lAttributes[1])+1);
+ char* lBuffer(new char[lLen]);
+ strcpy(lBuffer,lAttributes[1]);
+ char* lBuffer2(new char[lLen]);
+ strcpy(lBuffer2,lAttributes[1]);
+
+ insert(make_pair(lAttributes[0],
+ make_pair(lBuffer,lBuffer2)));
+
+ //cout << "[" << lBuffer << "]" << flush;
+ assert(strlen(operator[](lAttributes[0]).second)==lLen-1);
+ assert(strlen(operator[](lAttributes[0]).first)==lLen-1);
+ }else{
+ char* lBuffer(new char[1]);
+ lBuffer[0]=char(0);
+ char* lBuffer2(new char[1]);
+ lBuffer2[0]=char(0);
+ insert(make_pair(string(lAttributes[0]),
+ make_pair(lBuffer,lBuffer2)));
+ }
+ }
+ gMutex->unlock();
+#else
+ push_back(make_pair(string(lAttributes[0]),
+ string((lAttributes[1] && strlen(lAttributes[1]))?lAttributes[1]:"")));
+#endif
+ lAttributes+=2;
+ }
+ }
+}
+CAttributeList::~CAttributeList(){
+ //checkNPrint();
+ for(iterator i=begin();
+ i!=end();
+ i++){
+
+ if(strcmp(i->second.first,
+ i->second.second)){
+ cout << "DELETING FAILED" << flush << int(i->second.second) << flush << i->second.first << i->second.second << endl;
+ assert(0);
+ }
+ delete[] i->second.first;
+ delete[] i->second.second;
+ }
+}
+
+CAttributeList::CAttributeList(const list<pair <string,string> >& inAttributes){
+ gMutex->lock();
+
+ clear();
+ for(list<pair <string,string> >::const_iterator i=inAttributes.begin();
+ i!=inAttributes.end();
+ i++){
+ if(i->second.size()>200){
+ cerr << __FILE__ << ":"
+ << __LINE__ << ":" << flush
+ << "i->second too long:[" << endl
+ << i->second
+ << "]ENDOF STRING"
+ << endl;
+ }
+#ifndef _IS_SEQUENCE_AL
+ int lLen(i->second.size()+1);
+ char* lBuffer(new char[lLen]);
+ strcpy(lBuffer,i->second.c_str());
+ char* lBuffer2(new char[lLen]);
+ strcpy(lBuffer2,i->second.c_str());
+ insert(make_pair(i->first,
+ make_pair(lBuffer,
+ lBuffer2)));
+
+ // insert(*i); if the representation is map<string,string>
+#else
+ push_back(*i);
+#endif
+ }
+ gMutex->unlock();
+}
+CAttributeList::CAttributeList(const CAttributeList& inAttributes){
+ gMutex->lock();
+ clear();
+ for(CAttributeList::const_iterator i=inAttributes.begin();
+ i!=inAttributes.end();
+ i++){
+#ifndef _IS_SEQUENCE_AL
+ if(strcmp(i->second.first,
+ i->second.second)){
+ if(strcmp(i->second.first,
+ i->second.second)){
+ cout << "ASSERTION FAILED" << i->second.first << "/" << i->second.second << endl;
+ assert(0);
+ }
+ }
+ assert(!strcmp(i->second.first,
+ i->second.second));
+ int lLen(strlen(i->second.first)+1);
+ char* lBuffer(new char[lLen]);
+ strcpy(lBuffer,i->second.first);
+ int lLen2(strlen(i->second.second)+1);
+ char* lBuffer2(new char[lLen2]);
+ strcpy(lBuffer2,i->second.second);
+
+ insert(make_pair(i->first,make_pair(lBuffer,lBuffer2)));
+#else
+ push_back(*i);
+#endif
+ }
+ gMutex->unlock();
+}
+CAttributeList::const_iterator CAttributeList::find(string inString)const{
+ //check();
+
+#ifdef _PRINTOUTS_AL
+ cout << endl
+ << "CAttributeList::find("
+ << flush;
+ cout << inString
+ << ") size " << flush;
+ cout << size()
+ << " "
+ << inString.size()
+ << endl;
+#endif
+
+#ifndef _CAL_FIND_WORKAROUND
+ return CAttributeList::CBase::find(inString);
+#else
+ for(const_iterator i=begin();
+ i!=end();
+ i++){
+#ifdef _PRINTOUTS_AL
+ cout << "~" << flush;
+ cout << "[" << flush;
+ cout << i->first <<flush;
+ cout << "," << flush;
+ cout << i->second << flush;
+ cout << "]" << flush;
+#endif
+
+ if(i->first==inString){
+#ifdef _PRINTOUTS_AL
+ cout << "+" << flush;
+#endif
+ return i;
+ }
+#ifdef _PRINTOUTS_AL
+ cout << "." << flush;
+#endif
+ }
+ cout << "-" << flush;
+ return end();
+#endif
+}
+void CAttributeList::add(const string& inFirst,
+ const string& inSecond){
+ gMutex->lock();
+
+
+#ifdef _PRINTOUTS_AL
+ checkNPrint();
+ cout << "Adding to CAttributeList "
+ << inFirst
+ << " "
+ << inSecond
+ << endl;
+#endif
+
+#ifndef _IS_SEQUENCE_AL
+ char* lBuffer=new char[inSecond.size()+1];
+ lBuffer[inSecond.size()]=char(0);
+ strncpy(lBuffer,inSecond.c_str(),inSecond.size());
+ char* lBuffer1=new char[inSecond.size()+1];
+ lBuffer1[inSecond.size()]=char(0);
+ strncpy(lBuffer1,inSecond.c_str(),inSecond.size());
+
+ operator[](inFirst)=make_pair(lBuffer,lBuffer1);
+ // (*this).insert(make_pair(inFirst,inSecond));
+#else
+ (*this).push_back(make_pair(inFirst,inSecond));
+#endif
+ gMutex->unlock();
+}
+/** adding an attribute for integers */
+void CAttributeList::add(const string& inAttribute,long inValue){
+ char lBuffer[20];
+ for(int i=0;
+ i<20;
+ i++){
+ lBuffer[i]=0;
+ }
+ sprintf(lBuffer,
+ "%ld",
+ inValue);
+ add(inAttribute,
+ lBuffer);
+};
+/** adding an attribute for doubles */
+void CAttributeList::add(const string& inAttribute,double inValue){
+ char lBuffer[20];
+
+ for(int i=0;
+ i<20;
+ i++){
+ lBuffer[i]=0;
+ }
+ sprintf(lBuffer,
+ "%lf",
+ inValue);
+ add(inAttribute,
+ lBuffer);
+};
+
+/** reading an attribute for integers */
+pair<bool,bool> CAttributeList::boolReadAttribute(const string& inAttribute)const{
+ pair<bool,string> lReadAttribute=stringReadAttribute(inAttribute);
+
+ if(!lReadAttribute.first){
+ return make_pair(bool(0),bool(0));
+ }else{
+ char* lLastCorrectCharacter=0;
+
+ bool lReturnValue=((lReadAttribute.second=="yes")
+ ||
+ (lReadAttribute.second=="y")
+ ||
+ (lReadAttribute.second=="true")
+ ||
+ (lReadAttribute.second=="t"));
+ return make_pair(lReadAttribute.first,
+ lReturnValue);
+ }
+};
+/** reading an attribute for integers */
+pair<bool,long> CAttributeList::longReadAttribute(const string& inAttribute)const{
+ pair<bool,string> lReadAttribute=stringReadAttribute(inAttribute);
+
+ if(!lReadAttribute.first){
+ return make_pair(bool(0),long(0));
+ }else{
+ char* lLastCorrectCharacter=0;
+
+ long lReturnValue=strtol(lReadAttribute.second.c_str(),
+ &lLastCorrectCharacter,
+ 10);
+ bool lIsValid=!(*lLastCorrectCharacter);
+
+ return make_pair(lIsValid,
+ lReturnValue);
+ }
+};
+/** reading an attribute for doubles */
+pair<bool,double> CAttributeList::doubleReadAttribute(const string& inAttribute)const{
+#ifdef __D_CATTRIBUTELIST__DOUBLEREADATTRIBUTE__
+ cout << "In doubleReadAttribute "
+ << flush
+ << endl;
+#endif
+
+ pair<bool,string> lReadAttribute=stringReadAttribute(inAttribute);
+
+#ifdef __D_CATTRIBUTELIST__DOUBLEREADATTRIBUTE__
+ cout << "AGAIN In doubleReadAttribute "
+ << flush
+ << endl;
+#endif
+
+ if(!lReadAttribute.first){
+ return make_pair(bool(0),
+ double(0));
+ }else{
+ char* lLastCorrectCharacter=0;
+
+ double lReturnValue=strtod(lReadAttribute.second.c_str(),
+ &lLastCorrectCharacter);
+ bool lIsValid=!(*lLastCorrectCharacter);
+
+ return make_pair(lIsValid,
+ lReturnValue);
+ }
+};
+/** reading an attribute for strings */
+pair<bool,string> CAttributeList::stringReadAttribute(const string& inAttribute)const{
+
+ //check, if the magic number is correct at this time
+
+#ifdef _PRINTOUTS_AL
+ checkNPrint();
+ cout << inAttribute
+ << endl
+ << flush;
+#endif
+
+#ifdef _PRINTOUTS_AL
+ find(inAttribute);
+ cout << "came back from find()" << flush;
+#endif
+
+ CAttributeList::const_iterator lFoundPosition(find(inAttribute));
+
+#ifdef _PRINTOUTS_AL
+ cout << "came back 2nd time from mAttributes.find()" << flush;
+#endif
+
+ if(lFoundPosition != end()){
+ assert(!strcmp(lFoundPosition->second.first,
+ lFoundPosition->second.second));
+
+ string lFoundString(lFoundPosition->second.first);
+
+ pair<bool,string> lReturnValue=make_pair(bool(1),
+ lFoundString);
+ return lReturnValue;
+ }
+ return make_pair(bool(0),
+ string(""));
+};
+/** reading an attribute for strings */
+void CAttributeList::toXML(string& outString)const{
+ outString += " ";
+ for(const_iterator i=begin();
+ i!=end();
+ i++){
+ outString += i->first + "=\"" + i->second.first + "\" ";
+ assert(!strcmp(i->second.second,
+ i->second.first));
+ }
+};
+/** reading an attribute for strings */
+void CAttributeList::check()const{
+ for(const_iterator i=begin();
+ i!=end();
+ i++){
+ assert(!strcmp(i->second.second,
+ i->second.first));
+ }
+};
+/** a local function */
+template<typename T>
+static const string& _CAL_getFirst(const pair<string, T>& inElement){
+ return inElement.first;
+}
+
+/** Get the keys of all attributes in this list*/
+list<string> CAttributeList::getKeys()const{
+ list<string> lReturnValue;
+ // the following two implementations are equivalent
+ transform(this->begin(),
+ this->end(),
+ back_inserter(lReturnValue),
+ _CAL_getFirst<CAttributeList::mapped_type>
+ );
+// #ifdef GCC30
+// for(const_iterator i=begin();
+// i!=end();
+// i++){
+// lReturnValue.push_back(i->first);
+// }
+// #endif
+ return lReturnValue;
+}
diff -Nur gift-0.1.14.orig/libGIFTAcInvertedFile/include/CInvertedFileChunk.h gift-0.1.14/libGIFTAcInvertedFile/include/CInvertedFileChunk.h
--- gift-0.1.14.orig/libGIFTAcInvertedFile/include/CInvertedFileChunk.h 2005-03-24 10:18:15.000000000 +0100
+++ gift-0.1.14/libGIFTAcInvertedFile/include/CInvertedFileChunk.h 2007-05-13 11:39:54.000000000 +0200
@@ -73,7 +73,7 @@
* add one document of to the list for one feature
*
*/
- void CInvertedFileChunk::addElement(TID inDocumentID,
+ void addElement(TID inDocumentID,
double inDocumentFrequency);
/**
diff -Nur gift-0.1.14.orig/libGIFTAcInvertedFile/include/CInvertedFileChunk.h~ gift-0.1.14/libGIFTAcInvertedFile/include/CInvertedFileChunk.h~
--- gift-0.1.14.orig/libGIFTAcInvertedFile/include/CInvertedFileChunk.h~ 1970-01-01 01:00:00.000000000 +0100
+++ gift-0.1.14/libGIFTAcInvertedFile/include/CInvertedFileChunk.h~ 2005-03-24 10:18:15.000000000 +0100
@@ -0,0 +1,89 @@
+/* -*- mode: c++ -*-
+*/
+/*
+
+ GIFT, a flexible content based image retrieval system.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, CUI University of Geneva
+
+ Copyright (C) 2003, 2004 Bayreuth University
+ 2005 Bamberg University
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+// -*- mode: c++ -*-
+/**
+*
+* CInvertedFileChunk
+*
+*
+*
+* modification history:
+*
+* HM 090399 created the documentation
+*
+*
+*
+* compiler defines used:
+*
+*
+*/
+#ifndef _CINVERTEDFILECHUNK
+#define _CINVERTEDFILECHUNK
+#include "libGIFTAcInvertedFile/include/uses-declarations.h"
+#include <iostream>
+#include <fstream>
+#include "libMRML/include/TID.h"
+#include <map>
+#include "libGIFTAcInvertedFile/include/CDocumentFrequencyList.h"
+
+
+/** */
+class CMapInvertedFileChunk:public map<TID,double>{};
+
+
+/** A class which does all the necessary administrative
+ work for generating inverted files. It contains the list of
+ documents which contain a given feature */
+class CInvertedFileChunk:public CMapInvertedFileChunk{
+
+public:
+
+/**
+ *
+ * returns the percentage of documents which contain this one feature
+ *
+ */
+
+ double getCollectionFrequency(size_t inSize)const;
+
+/**
+ *
+ * add one document of to the list for one feature
+ *
+ */
+ void CInvertedFileChunk::addElement(TID inDocumentID,
+ double inDocumentFrequency);
+
+/**
+ *
+ * writes the binary part of the list for one feature
+ *
+ */
+ bool writeBinary(ostream&,
+ TID inFeatureID,
+ size_t inSize)const;
+};
+
+#endif
|