Changeset 2918 for trunk/src/STMath.cpp


Ignore:
Timestamp:
04/04/14 16:14:00 (10 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_tsdaverage etc.

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Replaced STIdxIterExAcc with STIdxIter2.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2917 r2918  
    216216  }
    217217  uInt outrowCount = 0;
    218   // use STIdxIterExAcc instead of TableIterator
    219   STIdxIterExAcc iter( in[0], cols ) ;
     218  // use STIdxIter2 instead of TableIterator
     219  STIdxIter2 iter( in[0], cols ) ;
    220220//   double t2 = 0 ;
    221221//   double t3 = 0 ;
     
    230230      continue ;
    231231    }
    232     Vector<uInt> current = iter.current() ;
    233     String srcname = iter.getSrcName() ;
     232    Record current = iter.currentValue() ;
    234233    //Table subt = iter.table();
    235234    // copy the first row of this selection into the new table
     
    336335      static char const*const colNames1[] = { "IFNO", "BEAMNO", "POLNO" };
    337336      //uInt const values1[] = { rec.asuInt("IFNO"), rec.asuInt("BEAMNO"), rec.asuInt("POLNO") };
    338       uInt const values1[] = { current[1], current[0], current[2] };
     337      uInt const values1[] = { current.asuInt("IFNO"), current.asuInt("BEAMNO"), current.asuInt("POLNO") };
    339338      SingleTypeEqPredicate<uInt, 3> myPred(tin, colNames1, values1);
    340339      CustomTableExprNodeRep myNodeRep(tin, myPred);
     
    346345//                          && tin.col("IFNO") == Int(rec.asuInt("IFNO"))
    347346//                          && tin.col("POLNO") == Int(rec.asuInt("POLNO")) );
    348       Table basesubt = tin( tin.col("BEAMNO") == current[0]
    349                          && tin.col("IFNO") == current[1]
    350                          && tin.col("POLNO") == current[2] );
     347      Table basesubt = tin( tin.col("BEAMNO") == current.asuInt("BEAMNO")
     348                            && tin.col("IFNO") == current.asuInt("IFNO")
     349                            && tin.col("POLNO") == current.asuInt("POLNO") );
    351350#endif
    352351      Table subt;
    353352      if ( avmode == "SOURCE") {
    354353//         subt = basesubt( basesubt.col("SRCNAME") == rec.asString("SRCNAME"));
    355         subt = basesubt( basesubt.col("SRCNAME") == srcname );
     354        subt = basesubt( basesubt.col("SRCNAME") == current.asString("SRCNAME") );
    356355
    357356      } else if (avmode == "SCAN") {
    358357//         subt = basesubt( basesubt.col("SRCNAME") == rec.asString("SRCNAME")
    359358//                    && basesubt.col("SCANNO") == Int(rec.asuInt("SCANNO")) );
    360         subt = basesubt( basesubt.col("SRCNAME") == srcname
    361                       && basesubt.col("SCANNO") == current[4] );
     359        subt = basesubt( basesubt.col("SRCNAME") == current.asString("SRCNAME")
     360                         && basesubt.col("SCANNO") == current.asuInt("SCANNO") );
    362361      } else {
    363362        subt = basesubt;
Note: See TracChangeset for help on using the changeset viewer.