- Timestamp:
- 06/11/12 18:42:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/hpc33/src/STMath.cpp
r2557 r2559 3964 3964 Vector<Double> interval = out->integrCol_.getColumn() ; 3965 3965 interval /= 86400.0 ; 3966 Block<uInt> gaplist( 100 ) ; 3967 uInt glidx = 0 ; 3968 uInt glsize = gaplist.size() ; 3966 uInt *newscan = new uInt[nrow] ; 3967 Vector<uInt> newscanno( IPosition(1,nrow), newscan, TAKE_OVER ) ; 3968 uInt *p = newscan ; 3969 uInt newid = 0 ; 3969 3970 for ( uInt i = 0 ; i < nrow - 1 ; i++ ) { 3971 *p = newid ; 3970 3972 double gap = 2.0 * timeSep[i+1] / ( interval[i] + interval[i+1] ) ; 3971 3973 //cout << "gap[" << i << "]=" << setw(5) << gap << endl ; 3972 3974 if ( gap > 1.1 ) { 3973 3975 // cout << "detected gap between " << i << " and " << i+1 << endl ; 3974 gaplist[glidx] = i ; 3975 glidx++ ; 3976 } 3977 if ( glidx >= glsize ) { 3978 // cout << "resize gaplist" << endl ; 3979 glsize += 100 ; 3980 gaplist.resize( glsize ) ; 3981 } 3982 } 3983 gaplist[glidx] = nrow - 1 ; 3984 glidx++ ; 3985 // cout << "gaplist = " << Vector<uInt>(IPosition(1,glidx),gaplist.storage()) << endl ; 3986 uInt newid = 0 ; 3987 Vector<uInt> newscanno( nrow, 0 ) ; 3988 uInt *p = newscanno.data() ; 3989 IPosition pos( 1 ) ; 3990 for ( uInt i = 1 ; i < glidx ; i++ ) { 3991 pos[0] = gaplist[i] - gaplist[i-1] ; 3992 Vector<uInt> scnslice( pos, p+gaplist[i-1]+1, SHARE ) ; 3993 scnslice = i ; 3994 } 3976 newid++ ; 3977 } 3978 p++ ; 3979 } 3980 *p = newid ; 3995 3981 out->scanCol_.putColumn( newscanno ) ; 3996 3982 // double t2 = mathutil::gettimeofday_sec() ;
Note:
See TracChangeset
for help on using the changeset viewer.