Github user chiwanpark commented on the pull request:

    https://github.com/apache/flink/pull/1220#issuecomment-146202529
  
    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:
    
    ```scala
    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)
        }
      }
    
      next
    }
    ```
    
    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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to