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

TropicalGeometry: tropical linear spaces from graphs #4445

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YueRen
Copy link
Member

@YueRen YueRen commented Jan 10, 2025

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).

@YueRen
Copy link
Member Author

YueRen commented Jan 10, 2025

@ollieclarke8787 Would you be able to review this pull request?

@YueRen YueRen changed the title new: tropical_linear_space for graphs TropicalGeometry: tropical linear spaces from graphs Jan 10, 2025
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.39%. Comparing base (43499a7) to head (b86b6a1).
Report is 2 commits behind head on master.

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     
Files with missing lines Coverage Δ
src/TropicalGeometry/linear_space.jl 82.35% <100.00%> (+1.23%) ⬆️

... and 4 files with indirect coverage changes

Comment on lines +385 to +389
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
Copy link
Member

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?

Copy link
Member Author

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).

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

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

Successfully merging this pull request may close these issues.

2 participants