Skip to content

Inconsistency between C++ and Java in ReqSketch. #728

@proost

Description

@proost

In java:

Using rank upper bound:

  public static double getRSE(final int k, final double rank, final boolean hra, final long totalN) {
    return getRankUB(k, 2, rank, 1, hra, totalN); //more conservative to assume > 1 level
  }

In C++:

Using rank lower bound:

template<typename T, typename C, typename A>
double req_sketch<T, C, A>::get_RSE(uint16_t k, double rank, bool hra, uint64_t n) {
  return get_rank_lb(k, 2, rank, 1, n, hra);
}

which one is correct?

Further question:

According the paper and comments above on the method, I think it should return getRankUB(k, 2, rank, 1, hra, totalN) - rank, not the upper bound rank. Did i missread? or historically miss named function?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions