Skip to content

Initial implementation of the Leiden C API#3165

Merged
rapids-bot[bot] merged 6 commits intorapidsai:branch-23.04from
ChuckHastings:define_leiden_c_api
Mar 16, 2023
Merged

Initial implementation of the Leiden C API#3165
rapids-bot[bot] merged 6 commits intorapidsai:branch-23.04from
ChuckHastings:define_leiden_c_api

Conversation

@ChuckHastings
Copy link
Collaborator

@ChuckHastings ChuckHastings commented Jan 20, 2023

This PR defines the C API for Leiden - which should look the same as Louvain.

The implementation (calls to C++ Leiden implementation) are ifdef'ed out. Once #2980 is merged we can provide the actual call here.

Closes #2483
Closes #2486

@ChuckHastings ChuckHastings requested review from a team as code owners January 20, 2023 21:03
@ChuckHastings ChuckHastings self-assigned this Jan 20, 2023
@ChuckHastings ChuckHastings added 3 - Ready for Review improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 20, 2023
@ChuckHastings ChuckHastings added this to the 23.02 milestone Jan 20, 2023
@BradReesWork BradReesWork modified the milestones: 23.02, 23.04 Jan 23, 2023
@ChuckHastings ChuckHastings changed the base branch from branch-23.02 to branch-23.04 February 9, 2023 20:38
* fewer larger communities.
* @param [in] do_expensive_check
* A flag to run expensive checks for input arguments (if set to true)
* @param [out] result Output from the Louvain call
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo. I think you meant Leiden

Copy link
Contributor

@seunghwak seunghwak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (except for few minor cosmetic issues)

vertex_t h_result[] = {0, 1, 0, 1, 1, 1};
weight_t expected_modularity = 0.218166;

// Louvain wants store_transposed = FALSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Louvain => Leiden

@@ -0,0 +1,139 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2022-2023?

0.1f, 2.1f, 1.1f, 5.1f, 3.1f, 4.1f, 7.2f, 3.2f, 0.1f, 2.1f, 1.1f, 5.1f, 3.1f, 4.1f, 7.2f, 3.2f};
vertex_t h_result[] = {1, 0, 1, 0, 0, 0};

// Louvain wants store_transposed = FALSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Louvain => Leiden

@ChuckHastings
Copy link
Collaborator Author

/merge

@rapids-bot rapids-bot bot merged commit 759a24e into rapidsai:branch-23.04 Mar 16, 2023
@ChuckHastings ChuckHastings deleted the define_leiden_c_api branch September 27, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MNMG Leiden - Define C API MNMG Leiden - Define C unit tests

7 participants