Example #1
0
 std::string
 combineString1Mean() const
 {
   std::string a = accumStr();
   std::string z = "sum(" + a + ", " + a + ")";
   return z;
 }
Example #2
0
 std::string
 combineString1StdDev() const
 {
   std::string a1 = accumStr();
   std::string z1 = "sum(" + a1 + ", " + a1 + ")"; // running sum
   return z1;
 }
Example #3
0
 std::string
 combineString1NumSource() const
 {
   std::string a = accumStr();
   std::string z = "sum(" + a + ", " + a + ")"; // a + numSrcFix()
   return z;
 }
Example #4
0
 std::string
 combineString1NumSource() const
 {
   std::string a = accumStr();
   // laks: avoid accumulation of NumSrc for callers view and flat view
   // std::string z = "sum(" + a + ", " + a + ")"; // a + numSrcFix()
   return a; // originally: z;
 }
Example #5
0
 std::string
 finalizeStringMean() const
 {
   std::string n = numSrcStr();
   std::string a = accumStr();
   std::string z = a + " / " + n;
   return z;
 }
Example #6
0
 std::string
 finalizeStringMean() const
 {
   // Laks hack: for callers view and flat view, it would be
   // more accurate if we divide the sum with the aggregate
   // since the num of callers view and flat view will be 
   // accumulated
   std::string n = numSrcStr();
   std::string a = accumStr();
   std::string z = a + " / " + n;
   return z;
 }
Example #7
0
  std::string
  finalizeStringStdDev(std::string* meanRet = NULL) const
  {
    std::string n = numSrcStr();
    std::string a1 = accumStr();  // running sum
    std::string a2 = accum2Str(); // running sum of squares

    std::string mean = a1 + " / " + n;
    std::string z1 = "pow(" + mean + ", 2)"; // (mean)^2
    std::string z2 = "(" + a2 + " / " + n  + ")";      // (sum of squares)/n
    std::string sdev = "sqrt(" + z2 + " - " + z1 + ")";

    if (meanRet) {
      *meanRet = mean;
    }
    return sdev;
  }
Example #8
0
 std::string
 finalizeStringNumSource() const
 { return accumStr(); }
Example #9
0
 std::string
 finalizeStringSum() const
 { return accumStr(); }