Skip to content

Conversation

@shivanjali0108
Copy link

Fixes #455

  • Added powMatrix function to raise a graph adjacency matrix to a given power.
  • Uses binary exponentiation for efficiency.
  • Tested locally with small graphs to ensure correctness.

- Added powMatrix function to raise a graph adjacency matrix to a given power.
- Uses binary exponentiation for efficiency.
- Tested locally with small graphs to ensure correctness.
@shivanjali0108
Copy link
Author

Tested locally; works correctly on small graphs.

@wrcorcoran
Copy link

Open PR with the same, but more general, functionality: https://github.com/ZigRazor/CXXGraph/pull/463/commits

I'm currently extremely busy and haven't had the opportunity to update the CR. Please feel free to combine this CR with yours. Thanks!

@ZigRazor
Copy link
Owner

ZigRazor commented Oct 6, 2025

yes, please combine the code @shivanjali0108 so we can close the issue

@shivanjali0108
Copy link
Author

shivanjali0108 commented Oct 6, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define pow function for graph matrices

3 participants