-
Notifications
You must be signed in to change notification settings - Fork 521
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
Fix forced to Double and optimization error hint for top range #1432
Conversation
...src/main/java/com/baidu/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1432 +/- ##
=========================================
Coverage 62.21% 62.22%
- Complexity 5856 5858 +2
=========================================
Files 381 381
Lines 32135 32135
Branches 4504 4504
=========================================
+ Hits 19993 19996 +3
+ Misses 10090 10089 -1
+ Partials 2052 2050 -2
Continue to review full report at Codecov.
|
04f3dd9
to
088d2a8
Compare
@@ -244,7 +244,8 @@ private Ranks contributeNewLayer(List<Adjacencies> adjacencies, | |||
public Step(HugeGraph g, Directions direction, List<String> labels, | |||
long degree, long skipDegree, int top, int capacity) { | |||
E.checkArgument(top > 0 && top <= MAX_TOP, | |||
"The top of each layer can't exceed %s", MAX_TOP); | |||
"The top of each layer must be in (0, %s]", |
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.
perfect if prompt the actual top value
} | ||
return edgeWeight; | ||
} | ||
|
||
private double toDouble(Object obj) { |
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.
set static
return ((Number) obj).doubleValue(); | ||
} | ||
|
||
return (double) obj; |
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.
prefer to call NumericUtil.toNumber(obj).doubleValue()
fix error hit and Integer case to Double