Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
tutorial:face_lattice_tutorial [2012/09/18 20:25] – [Dealing with Large Polytopes] gawrilow | user_guide:tutorials:face_lattice_tutorial [2019/01/25 09:38] – ↷ Page moved from user_guide:face_lattice_tutorial to user_guide:tutorials:face_lattice_tutorial oroehrig | ||
---|---|---|---|
Line 25: | Line 25: | ||
Very often just a part of the face lattice is interesting. | Very often just a part of the face lattice is interesting. | ||
< | < | ||
- | polytope > for (my $k=$HD->DIMS->[1]; $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} |
</ | </ | ||
- | 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. |
< | < | ||
polytope > $c=cube(8); | polytope > $c=cube(8); | ||
- | polytope > $HD_partial = hasse_diagram($c-> | + | polytope > $HD_partial = lower_hasse_diagram($c-> |
- | polytope > print $HD_partial-> | + | polytope > print $HD_partial-> |
- | 1 257 1281 3073 | + | {(0 (0 0)) (1 (1 256)) (2 (257 1280)) (3 (1281 3072)) (4 (3073 3073))} |
</ | </ | ||
- | Instead of listing all those thousands of faces here we give only the vector of starting nodes. | + | Instead of listing all those thousands of faces here we give only the pairs indicating the start-node and end-node for each rank. |
< | < | ||
- | polytope > $partial_f = $HD_partial-> | + | polytope > print map { $HD_partial-> |
- | polytope > for (my $i=1; $i< | + | |
256 1024 1792 | 256 1024 1792 | ||
</ | </ | ||
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. | ||
< | < | ||
- | polytope > $HD_partial = hasse_diagram($p-> | + | polytope > $HD_partial = lower_hasse_diagram($p-> |
- | polytope > print $HD_partial-> | + | polytope > print map { $HD_partial-> |
- | 1 101 2082 12534 | + | 100 2004 10638 |
</ | </ | ||
The executive summary: While polymake is designed to do all kinds of things automatically, | The executive summary: While polymake is designed to do all kinds of things automatically, |