message: Fixed some minor bug in rank calculation
diff: @@ -1352,22 +1352,34 @@ public:
  avg_val += static_cast<double>(j);
  }
  avg_val /= double(j - i);
  - for (; i < c_len && i < j; ++i) {
  +
  switch(policy_) {
  case rank_policy::average:
  + {
  + for (; i < c_len && i < j; ++i)
  result_[rank_vec[i]] = avg_val;
  break;
  + }
  case rank_policy::first:
  + {
  + for (; i < c_len && i < j; ++i)
  result_[rank_vec[i]] = first_val;
  break;
  + }
  case rank_policy::last:
  + {
  + for (; i < c_len && i < j; ++i)
  result_[rank_vec[i]] = last_val;
  break;
  + }
  case rank_policy::actual:
  + {
  + for (; i < c_len && i < j; ++i)
  result_[rank_vec[i]] = static_cast<double>(i);
  break;
  }
  }
  + if (i < c_len)
  prev_value = &*(column_begin + rank_vec[i]);
  i -= 1; // Because the outer loop does ++i
  }
  