Changeset 2318
- Timestamp:
- 09/30/11 10:26:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MSWriter.cpp
r2309 r2318 422 422 makePolMap() ; 423 423 initFrequencies() ; 424 initCorrProductTemplate() ; 424 425 425 426 // … … 1194 1195 for ( Int i = 0 ; i < n ; i++ ) 1195 1196 c[i] = (Int)polmap[nos[i]] ; 1196 cp.resize( 2, n ) ; 1197 if ( n == 1 ) 1198 cp = 0 ; 1199 else if ( n == 2 ) { 1200 cp.column( 0 ) = 0 ; 1201 cp.column( 1 ) = 1 ; 1202 } 1203 else { 1204 cp.column( 0 ) = 0 ; 1205 cp.column( 1 ) = 1 ; 1206 cp( 0, 1 ) = 0 ; 1207 cp( 1, 1 ) = 1 ; 1208 cp( 0, 2 ) = 1 ; 1209 cp( 1, 2 ) = 0 ; 1197 if ( n == 4 && 1198 ( poltype == "linear" || poltype == "circular" ) ) { 1199 Int tmp = c[1] ; 1200 c[1] = c[2] ; 1201 c[2] = c[3] ; 1202 c[3] = tmp ; 1203 } 1204 cp = corrProductTemplate[n] ; 1205 } 1206 void initCorrProductTemplate() 1207 { 1208 Int n = 1 ; 1209 { 1210 Matrix<Int> c( 2, n, 0 ) ; 1211 corrProductTemplate[n] = c ; 1212 } 1213 n = 2 ; 1214 { 1215 Matrix<Int> c( 2, n, 0 ) ; 1216 c.column( 1 ) = 1 ; 1217 corrProductTemplate[n] = c ; 1218 } 1219 n = 4 ; 1220 { 1221 Matrix<Int> c( 2, n, 0 ) ; 1222 c( 0, 2 ) = 1 ; 1223 c( 0, 3 ) = 1 ; 1224 c( 1, 1 ) = 1 ; 1225 c( 1, 3 ) = 1 ; 1226 corrProductTemplate[n] = c ; 1210 1227 } 1211 1228 } … … 1274 1291 MFrequency::Types freqframe; 1275 1292 Record srcRec; 1293 map< Int, Matrix<Int> > corrProductTemplate; 1276 1294 }; 1277 1295
Note:
See TracChangeset
for help on using the changeset viewer.