Changeset 2146 for GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h
- Timestamp:
- 02/20/07 18:36:14 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h
r2123 r2146 19 19 enum 20 20 { 21 bucket_size = 4,22 min_buckets = 821 bucket_size = 1, 22 min_buckets = 16 23 23 }; 24 24 … … 236 236 float HashPvs<T, S>::AddSample(T sample, const float pdf) 237 237 { 238 HASH_SET::iterator it;238 static HASH_SET::iterator it; 239 239 240 240 if (Find(sample, it)) … … 243 243 mEntries.insert(sample); 244 244 return 1.0f; 245 246 /*pair<HASH_SET::iterator, bool> p = mEntries.insert(sample); 247 248 if (p.second) 249 return 0.0f; 250 else 251 return 1.0f;*/ 245 252 } 246 253 … … 249 256 void HashPvs<T, S>::AddSampleDirty(T sample, const float pdf) 250 257 { 251 HASH_SET::iterator it;258 static HASH_SET::iterator it; 252 259 253 260 // not yet in map … … 256 263 mEntries.insert(sample); 257 264 } 265 266 //pair<HASH_SET::iterator, bool> p = mEntries.insert(sample); 258 267 } 259 268 … … 263 272 const float pdf) 264 273 { 265 HASH_SET::iterator it; 274 /*pair<HASH_SET::iterator, bool> p = mEntries.insert(sample); 275 276 // already in map 277 return p.second; 278 */ 279 static HASH_SET::iterator it; 266 280 267 281 // already in map
Note: See TracChangeset
for help on using the changeset viewer.