-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): support adamic-adar & resource-allocation algorithms #1763
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1763 +/- ##
============================================
+ Coverage 63.26% 66.88% +3.62%
- Complexity 684 976 +292
============================================
Files 443 446 +3
Lines 37738 37791 +53
Branches 5381 5389 +8
============================================
+ Hits 23875 25278 +1403
+ Misses 11247 9785 -1462
- Partials 2616 2728 +112
Continue to review full report at Codecov.
|
hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/AdamicAdarAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/ResourceAllocationAPI.java
Outdated
Show resolved
Hide resolved
|
||
double sum = 0.0; | ||
for (Id vid : neighbors) { | ||
sum += 1.0 / this.edgesCount(vid, step); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may this.edgesCount() return 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why common neighbor vertex's degree could be zero? seems at least is 2?
TODO: