Skip to content
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

Add NrSpanningTrees attribute #224

Merged
merged 4 commits into from
Jul 24, 2019

Conversation

reiniscirpons
Copy link
Collaborator

This PR adds the following attributes

  • DegreeMatrix - for a digraph, returns the diagonal matrix whose ith diagonal entry is the outdegree of vertex i.
  • LaplacianMatrix - for a digraph, returns the difference of the DegreeMatrix and AdjacencyMatrix of the digraph.
  • NrSpanningTrees - for a symmetric digraph, returns the number of spanning trees of that digraph. Calculated by computing the determinant of LaplacianMatrix with a single row and column removed. Time complexity O(n^3).

See Issue #197.

@james-d-mitchell james-d-mitchell added merge-in-to-master A label for PRs that should be merged into the master branch new-feature A label for new features. labels Jul 21, 2019
Copy link
Member

@james-d-mitchell james-d-mitchell left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thanks a lot @reiniscirpons, this is super useful!

@james-d-mitchell
Copy link
Member

Any comments @wilfwilson before merging?

@james-d-mitchell james-d-mitchell added this to the 1.0.0 milestone Jul 22, 2019
@wilfwilson
Copy link
Collaborator

No comments, except thanks.

@james-d-mitchell james-d-mitchell merged commit 611d9b5 into digraphs:master Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-in-to-master A label for PRs that should be merged into the master branch new-feature A label for new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants