Fix forced to Double and optimization error hint for top range by zyxxoo · Pull Request #1432 · apache/hugegraph
zyxxoo
changed the title
Zy dev
Fix forced to Double and optimization error hint for top range
| 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]", |
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) { |
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; |
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()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters