- Timestamp:
- 07/09/14 20:22:49 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r2959 r2974 927 927 ArrayColumn<uChar> lflagCol(tmpl,"FLAGTRA"); 928 928 ROArrayColumn<uChar> rflagCol(tmpr,"FLAGTRA"); 929 ScalarColumn<uInt> lflagrowCol(tmpl,"FLAGROW"); 930 ROScalarColumn<uInt> rflagrowCol(tmpr,"FLAGROW"); 929 931 930 932 for (uInt i=0; i<tout.nrow(); ++i) { 933 uInt lflagrow, rflagrow; 934 lflagrow = lflagrowCol(i); rflagrow = rflagrowCol(i); 935 //------- 936 if ((lflagrow > 0)||(rflagrow > 0)) { 937 lflagrowCol.put(i, uInt(1)); 938 continue; 939 } 931 940 Vector<Float> lspecvec, rspecvec; 932 941 Vector<uChar> lflagvec, rflagvec; 933 942 lspecvec = lspecCol(i); rspecvec = rspecCol(i); 934 943 lflagvec = lflagCol(i); rflagvec = rflagCol(i); 944 Vector<uChar> outflagvec = lflagCol(i); 945 //------- 946 for (uInt j = 0; j < outflagvec.nelements(); ++j) { 947 uChar outflag = 0 << 7; 948 if ((lflagvec(j) == 1 << 7) || (rflagvec(j) == 1 << 7)) { 949 outflag = 1 << 7; 950 } 951 outflagvec(j) = outflag; 952 } 953 lflagvec = 0 << 7; 954 rflagvec = 0 << 7; 955 //------- 935 956 MaskedArray<Float> mleft = maskedArray(lspecvec, lflagvec); 936 957 MaskedArray<Float> mright = maskedArray(rspecvec, rflagvec); … … 947 968 } 948 969 lspecCol.put(i, mleft.getArray()); 970 //----- 971 lflagCol.put(i, outflagvec); 972 //----- 949 973 } 950 974 return out;
Note:
See TracChangeset
for help on using the changeset viewer.