Computing the coordinates of the Vertices_in_facets ?

Questions and problems about using polymake go here.
Lai
Posts: 7
Joined: 02 Jul 2019, 02:26

Computing the coordinates of the Vertices_in_facets ?

Postby Lai » 26 Nov 2019, 20:58

Hello,

I am quite new to both polymake and programming and my question is this:

I have a 6 dimensional polytope with 48 vertices, and I am interested in computing the vertices that are contained in each facet. I was able to use the VERTICES_IN_FACETS command which is great, however I would love to have the vertices in terms of their coordinates instead of indexed by an integer label.

Is it possible to do this with a polymake command?

Thank you very much!

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: Computing the coordinates of the Vertices_in_facets ?

Postby gawrilow » 26 Nov 2019, 21:51

Numbers in VERTICES_IN_FACETS refer to the rows of VERTICES matrix.
You can do something like this:

Code: Select all

# $p is the Polytope object for my $i (0 .. $p->N_FACETS-1) { print "facet $i contains vertices:\n", $p->VERTICES->minor($p->VERTICES_IN_FACETS->row($i), All), "\n"; }

Lai
Posts: 7
Joined: 02 Jul 2019, 02:26

Re: Computing the coordinates of the Vertices_in_facets ?

Postby Lai » 26 Nov 2019, 22:39

Thank you very much, it worked wonderfully.


Return to “Helpdesk”