-
Notifications
You must be signed in to change notification settings - Fork 144
Add ImmutableGraphIndex.isHierarchical #563
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
Conversation
|
Before you submit for review:
If you did not complete any of these, then please explain below. |
jvector-base/src/main/java/io/github/jbellis/jvector/graph/OnHeapGraphIndex.java
Outdated
Show resolved
Hide resolved
|
The alpha provided in the new public constructor is not really used by the builder. Something similar happens with neighborhoodOverflow. This may need a bit more refactoring to be sorted out properly. I'll label the constructor as |
jvector-base/src/main/java/io/github/jbellis/jvector/graph/OnHeapGraphIndex.java
Outdated
Show resolved
Hide resolved
MarkWolters
left a comment
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.
LGTM
# Conflicts: # jvector-tests/src/test/java/io/github/jbellis/jvector/graph/OnHeapGraphIndexTest.java
jshook
left a comment
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.
LGTM
Adds a method to the interface ImmutableGraphIndex that returns true if the index is hierarchical and false otherwise.
Note that a graph can be hierarchical even if it has a single layer, i.e., getMaxLevel() == 0. For example, while building a new hierarchical graph, we may temporarily only have nodes at level 0 because of the random assignment of nodes to levels.
This change enables to make public the GraphIndexBuilder constructor that takes an existing graph as an input, as we can infer the addHierarchy member from the provided graph.