flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chiwanpark <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-1745] Add exact k-nearest-neighbours al...
Date Wed, 07 Oct 2015 13:54:39 GMT
Github user chiwanpark commented on the pull request:

    It sounds weird for me. If the user sets `useQuadTree` to false, the algorithm should
not use quadtree. Otherwise if the user sets `useQuadTree` to true, the algorithm should check
whether quadtree can be used or not.
    I don't think that `ListBuffer` is better than `Vector`. For example, we can implement
`partitionBox` like following:
    def partitionBox(cPart: Seq[Vector], L: Vector): Seq[Vector] = {
      var next = cPart
      (0 until L.size).foreach { i =>
        next = next.flatMap { v =>
          val (up, down) = (v.copy, v)
          up.update(i, up(i) - L(i) / 4)
          down.update(i, down(i) + L(i) / 4)
          Seq(up, down)
    There are still some style issues in this PR. I recommend reformatting all codes in this
PR using IDE such as IntelliJ IDEA.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message