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
directed graph from polyhedron #17474
Comments
Branch: u/chapoton/17474 |
Commit: |
New commits:
|
comment:2
Hello, Why is it a cached method? Vincent |
comment:3
Well, vertex_graph is cached, so I just did the same. But if you prefer not, no problem. |
comment:4
The thing is that caching costs (in memory) and these methods do not (in time). So I really do not see the point. Do you agree to also "uncache" the I think that in most cases, the use of cached method is dirty programming (though it is very cool in development phase). Vincent |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
In your implementation, there is no oriented edge associated to an edge of the polyhedron that belongs to the kernel of the linear form, hence the underlying undirected graph of your graph is only a subgraph of vertices and edges of the polyhedron, see for example:
What is the purpose of this method ? Depending on this, the described behaviour may cause troubles. Other possibilities is to have two oriented edges facing eachother (just replace |
comment:7
One could also want to provide a genuine linear form (see Also, it seems not very natural that the edges of the graph go in the decreasing direction of the linear form (note that |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
I am always using this with generic linear forms where every edge is not parallel to the kernel of the form. I then turn the digraphs into posets. Anyway, I have replaced I have also added a keyword to ask for the reverse orientation. How can I check if the input is a linear form ? |
Changed branch from u/chapoton/17474 to u/tmonteil/17474 |
comment:14
Replying to @fchapoton:
I uploaded a patch that checks if the input is an instance of I removed from the doc the possibility to input a list or a tuple since it was not working in the previous version (it is doable to try/except
It works well. Do you have some important reason to go in the decreasing direction by default ? If not, i would prefer to have it the other way by default, to be consistent with the MILP default, but perhaps i miss some other use case. New commits:
|
Changed branch from u/tmonteil/17474 to u/chapoton/17474 |
comment:15
ok, thanks. I have made it increasing by default, as you seem to prefer it so. I have added a test to check that the orientation is correct. I have also removed an usused import and made two minor pep8 changes. New commits:
|
comment:17
It looks good to me. Thanks. |
Reviewer: Thierry Monteil |
Changed branch from u/chapoton/17474 to |
This ticket proposes to implement a method taking a polyhedron and a linear form
and returning the directed graph made of vertices and edges of the polyhedron, oriented using the linear form.
Component: geometry
Keywords: polyhedron, digraph
Author: Frédéric Chapoton
Branch/Commit:
6c9f537
Reviewer: Thierry Monteil
Issue created by migration from https://trac.sagemath.org/ticket/17474
The text was updated successfully, but these errors were encountered: