user_guide:tutorials:face_lattice_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
tutorial:face_lattice_tutorial [2014/01/03 15:45] – external edit 127.0.0.1tutorial:face_lattice_tutorial [2017/04/28 13:16] – update dims / inverse rank map ... benmuell
Line 25: Line 25:
 Very often just a part of the face lattice is interesting.  The following command lists just the 1-dimensional faces. Very often just a part of the face lattice is interesting.  The following command lists just the 1-dimensional faces.
 <code> <code>
-polytope > for (my $k=$HD->DIMS->[1]; $k<$HD->DIMS->[2]; ++$k) print $HD->FACES->[$k] +polytope > print map { $p->HASSE_DIAGRAM->FACES->[$_} @{$p->HASSE_DIAGRAM->nodes_of_dim(1)}; 
-{1 2}{2 3}{3 4}{0 4}{0 1}+{2 3}{3 4}{0 4}{0 1}{1 2}
 </code> </code>
-The above works as described since DIMS return an array with the first nodes of each dimension. 
  
-Face lattices of polytopes can be huge.  So it may be an advantage to compute only a part.  The following computes the 2-skeleton of an 8-dimensional cube.+Face lattices of polytopes can be huge.  So it may be an advantage to compute only a part.  The following computes the 2-skeleton of an 8-dimensional cube. We need to specify 3 as a limit since this function uses the rank which is one more than the dimension.
 <code> <code>
 polytope > $c=cube(8); polytope > $c=cube(8);
-polytope > $HD_partial = hasse_diagram($c->VERTICES_IN_FACETS,2); +polytope > $HD_partial = lower_hasse_diagram($c->VERTICES_IN_FACETS,3); 
-polytope > print $HD_partial->DIMS+polytope > print $HD_partial->INVERSE_RANK_MAP
-1 257 1281 3073+{(0 (0 0)) ((1 256)) (2 (257 1280)) (3 (1281 3072)) (4 (3073 3073))}
 </code> </code>
-Instead of listing all those thousands of faces here we give only the vector of starting nodes.  This can be treated just like above.  The (partial) f-vector is obtained by taking successive differences.+Instead of listing all those thousands of faces here we give only the pairs indicating the start-node and end-node for each rank.
 <code> <code>
-polytope > $partial_f = $HD_partial->DIMS; +polytope > print map { $HD_partial->nodes_of_rank($_)->size," " } (1..3);
-polytope > for (my $i=1; $i<$partial_f->size(); ++$i) { print $partial_f->[$i]-$partial_f->[$i-1], " " }+
 256 1024 1792  256 1024 1792 
 </code> </code>
Line 65: Line 63:
 The subsequent second stage looks as above; but the difference is that VERTICES_IN_FACETS is known already. The subsequent second stage looks as above; but the difference is that VERTICES_IN_FACETS is known already.
 <code> <code>
-polytope > $HD_partial = hasse_diagram($p->VERTICES_IN_FACETS,2); +polytope > $HD_partial = lower_hasse_diagram($p->VERTICES_IN_FACETS,3); 
-polytope > print $HD_partial->DIMS+polytope > print map { $HD_partial->nodes_of_rank($_)->size," " } (1..3)
-1 101 2082 12534+100 2004 10638 
 </code> </code>
 The executive summary: While polymake is designed to do all kinds of things automatically, you might have to guide it a little if you are computing with large or special input. The executive summary: While polymake is designed to do all kinds of things automatically, you might have to guide it a little if you are computing with large or special input.
  • user_guide/tutorials/face_lattice_tutorial.txt
  • Last modified: 2019/02/04 22:55
  • by 127.0.0.1