-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Improvement][C++] Use inherit to implement EdgesCollection #238
Conversation
23092d9
to
a46d539
Compare
I think the best way to adapt this change is getting EdgesCollection from factory function directly. For details, you need:
If there are new problems, please reach out to me. |
fa27eb4
to
a448cc8
Compare
ae525f7
to
d07702c
Compare
cpp/examples/bfs_father_example.cc
Outdated
@@ -36,8 +36,8 @@ int main(int argc, char* argv[]) { | |||
auto maybe_vertices = | |||
GAR_NAMESPACE::ConstructVerticesCollection(graph_info, label); | |||
ASSERT(maybe_vertices.status().ok()); | |||
auto& vertices = maybe_vertices.value(); | |||
int num_vertices = vertices.size(); | |||
auto vertices = maybe_vertices.value(); |
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.
Maybe use auto&
consistently is better?
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.
Fixed.
ee6e01e
to
587804b
Compare
@lixueclaire any comments? |
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
@@ -19,10 +20,12 @@ include_directories("src/main/native") | |||
include_directories("src/test/native") | |||
|
|||
find_package(Arrow REQUIRED) | |||
find_package(gar REQUIRED) | |||
include(graphar-cpp) | |||
build_graphar_cpp() |
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.
Developers usually need recompile JNI code through CMake, but not need rebuild GraphAr C++ library.
Maybe check C++ library is installed before build it? Or make it optional?
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.
BTW, we also need to check installed C++ library's version if we choose the first solution.
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.
The C++ library is actually just build for the first time, so i think it's ok for that.
Proposed changes
variant
of EdgesCollection with inheritance to implement polymorphism of different adj list type edges collection.Types of changes
What types of changes does your code introduce to GraphAr?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments