-
Notifications
You must be signed in to change notification settings - Fork 132
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
TropicalGeometry: tropical linear spaces from graphs #4445
base: master
Are you sure you want to change the base?
Conversation
@ollieclarke8787 Would you be able to review this pull request? |
274f8c2
to
b86b6a1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4445 +/- ##
=======================================
Coverage 84.39% 84.39%
=======================================
Files 663 663
Lines 87938 87948 +10
=======================================
+ Hits 74214 74225 +11
+ Misses 13724 13723 -1
|
M = zero_matrix(QQ,nv(G),ne(G)) | ||
for (i,edge) in enumerate(edges(G)) | ||
M[src(edge),i] = 1 | ||
M[dst(edge),i] = -1 | ||
end |
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.
We already have signed_incidence_matrix
. Could you maybe use that here?
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.
signed_incidence_matrix
only works for directed graphs. What I have is an undirected graph and I need the signed incidence matrix for a choice of directions (the choice does not matter).
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.
That's still something worth putting in its own function for people to use. I don't know if polymake has an acessor for that as well or if this would need your simple loop. Maybe @benlorenz or @lkastner can help out?
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.
True, this is actually one of the changes of the Durham workshop that I am preparing right now.
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.
Once #4450 is merged, I am happy to update it.
This pull requests adds a new constructor for tropical linear spaces from graphs. Useful (for me) for example for graph rigidity questions (see e.g. here).