Github user decibel commented on the issue:

    https://github.com/apache/incubator-madlib/pull/78
  
    You should really add that as a comment to the code. It's much clearer than 
reading the code itself.
    
    And yes, it definitely helped me. I now realize what's been bugging me 
about this... the original algorithm on wikipedia is extremely general purpose; 
so much so that I missed an important fact: **a vertex should never need to be 
updated twice**, so long as you consider **all** edges of the vertex 
simultaneously. Of course, doing that is regular code would be a pain, but in 
SQL it's trivial.
    
    Now that I understand what's going on, I see that the real trick here is to 
keep track of what the last set of updates was. I think it'd probably be a lot 
simpler to just keep a field that is what nesting level we're on, which is how 
this would end up coded in a CTE. I've tried a couple times to code that, but 
still haven't wrapped my head around it because of how far away from set theory 
the pseudo code is.


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