Changeset 2806 for trunk/gsdl/src/phind/generate/suffix.cpp
- Timestamp:
- 2001-10-30T09:18:23+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/phind/generate/suffix.cpp
r2801 r2806 137 137 // Initialise the candidates, check array, and various variables. 138 138 sort(candidates.begin(), candidates.end(), isShorter); 139 for (cellcount j = 0; j < inputLength; j++) 140 suffixCheck[j] = 0; 139 memset(suffixCheck, 0, sizeof(check)*inputLength); 140 //for (cellcount j = 0; j < inputLength; j++) 141 // suffixCheck[j] = 0; 141 142 unsigned minimum_length = candidates.begin()->length; 142 143 … … 333 334 334 335 // Initialise the document frequency array 335 for (cellindex i = 0; i < numberOfDocuments; i++) { 336 frequency[i] = 0; 337 } 336 // for (cellindex i = 0; i < numberOfDocuments; i++) { 337 // frequency[i] = 0; 338 //} 339 memset(frequency, 0, sizeof(cellcount)*numberOfDocuments); 338 340 339 341 // variables used to facilitate the search … … 455 457 456 458 // to begin with, everything is empty 457 for (cellcount i = 0; i < inputLength; i++) { 458 phraseMemory[i] = 0; 459 } 460 459 // for (cellcount i = 0; i < inputLength; i++) { 460 // phraseMemory[i] = 0; 461 //} 462 memset(phraseMemory, 0, sizeof(char)*inputLength); 463 461 464 // intialise the hashTable of long phrases 462 465 initialiseLongPhraseMemory(); … … 788 791 exit(2); 789 792 } 790 for (cellcount j = 0; j < contentLength; j++) 791 suffixCheck[j] = 0; 793 //for (cellcount j = 0; j < contentLength; j++) 794 // suffixCheck[j] = 0; 795 memset(suffixCheck, 0, sizeof(check)*contentLength); 792 796 793 797 cout <<"\ngenerating the phrase hierarchy\n\n";
Note:
See TracChangeset
for help on using the changeset viewer.