Github user danielblazevski commented on the pull request:

    https://github.com/apache/flink/pull/1220#issuecomment-151942911
  
    @tillrohrmann I now have more time to go back and try to finalize this PR 
in the next couple of weeks.  After debugging a bit, I noticed that in your 
modification of `partitionBox`, the variable `center` is different before and 
after the call of `partitionBox` in `makeChildren`.  For example, in 
`makeChildren` I added some lines to print to the console, namely
    ``` scala
         println("center before partitioning =  " + center)
          val cPart = partitionBox(center, width)
          println("cPart =  " + cPart)
          val mappedWidth = 0.5*width.asBreeze
          children = cPart.map(p => new Node(p, mappedWidth.fromBreeze, null))
          println("center after partitioning =  " + center)
    ```
    The output to console is
    ```
    center before partitioning =  DenseVector(0.0, 0.0)
    cPart =  List(DenseVector(-0.5, -0.25), DenseVector(-0.5, 0.25), 
DenseVector(0.5, -0.25), DenseVector(0.5, 0.25))
    center after partitioning =  DenseVector(0.5, 0.25)
    ```
    So the output `cPart` looks good, but the value of `center` after 
partitioning should still be `(0.0,0.0)`.  I'm confused as to how it is even 
changed to `(0.5, 0.25)` the final entry of `cPart`, and hence not clear how to 
fix that.  I imagine it should be an easy fix; of course I can use a hack to 
update `center` to be the average of `cPart`, but that seems wasteful since 
`center`for a given node should not be changed.


---
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