tugraph-analytics icon indicating copy to clipboard operation
tugraph-analytics copied to clipboard

feat: Add single point cycle detection algorithm

Open 11e11 opened this issue 5 months ago • 3 comments

What changes were proposed in this pull request?

This pull request introduces a new graph algorithm: Path Cycle Detection. This algorithm allows users to find all simple cycles within a specified path length in the graph.

The main changes include:

  1. Added PathCycleDetection.java: Implemented the core logic for the cycle detection algorithm.
  2. Registered the new algorithm: Updated BuildInSqlFunctionTable.java to make the new algorithm callable via GQL.
  3. Added Unit Tests:
    • Created gql_algorithm_009.sql for the GQL test case.
    • Added a new test method testAlgorithm_009() in GQLAlgorithmTest.java.
    • Provided the corresponding gql_algorithm_009.txt file with expected results.

How was this PR tested?

  • [x] Tests have Added for the changes
  • [ ] Production environment verified

The correctness of the algorithm was verified by running the newly added unit test. The test command is as follows:

mvn test -pl geaflow-dsl/geaflow-dsl-runtime -Dtest=com.antgroup.geaflow.dsl.runtime.query.GQLAlgorithmTest#testAlgorithm_009

11e11 avatar Jun 22 '25 15:06 11e11

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jun 22 '25 15:06 CLAassistant

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jun 22 '25 15:06 CLAassistant

Thank you for your contribution. We'll wait for other students to submit their pull requests first and then review them all together. Please hold on for a moment.

yaozhongq avatar Jul 03 '25 07:07 yaozhongq