Changeset 704 for GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
- Timestamp:
- 03/16/06 15:04:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r695 r704 109 109 110 110 /** Compute continuous PVS difference */ 111 void ComputeContinuousPvsDifference( constPvs<T> &pvs,111 void ComputeContinuousPvsDifference(Pvs<T> &pvs, 112 112 float &pvsReduction, 113 113 float &pvsEnlargement); … … 115 115 116 116 /** Compute continuous PVS difference */ 117 float GetPvsHomogenity( constPvs<T> &pvs) {117 float GetPvsHomogenity(Pvs<T> &pvs) { 118 118 float 119 119 pvsReduction, … … 142 142 template <typename T> 143 143 void 144 Pvs<T>::ComputeContinuousPvsDifference( constPvs<T> &b,144 Pvs<T>::ComputeContinuousPvsDifference(Pvs<T> &b, 145 145 float &pvsReduction, 146 146 float &pvsEnlargement) 147 147 { 148 148 // Uses sum of log differences, which corresponds to entropy 149 std::map<T, PvsData<T>, LtSample<T> >::const_iterator it; 150 151 for (it = b.mEntries.begin(); it != b.mEntries.end(); ++ it) { 149 std::map<T, PvsData<T>, LtSample<T> >::iterator it; 150 151 for (it = b.mEntries.begin(); 152 it != b.mEntries.end(); ++ it) { 152 153 float bSumPdf = (*it).second.mSumPdf; 153 154 float aSumPdf = 0.0f; 154 155 PvsData<T> *data = Find((*it).first); 155 156 if (data) { 156 aSumPdf = data-> second.mSumPdf;157 aSumPdf = data->mSumPdf; 157 158 // mark this entry as processed to avoid double counting 158 data-> second.mSumPdf = -aSumPdf;159 data->mSumPdf = -aSumPdf; 159 160 } 160 161 float diff = bSumPdf - aSumPdf; … … 177 178 PvsData<T> *data = b.Find((*it).first); 178 179 if (data) { 179 bSumPdf = data-> second.mSumPdf;180 bSumPdf = data->mSumPdf; 180 181 } 181 182 float diff = bSumPdf - aSumPdf;
Note: See TracChangeset
for help on using the changeset viewer.