Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| user_guide:tutorials:properties [2019/02/11 16:24] – ↷ Page moved from user_guide:properties to user_guide:tutorials:properties oroehrig | user_guide:tutorials:properties [2019/02/11 16:24] (current) – restored. oroehrig | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Objects, Properties and Rules ====== | + | {{page>.: |
| - | ==== Objects ==== | + | |
| - | In polymake, there is two kinds of objects. A //Big Object// models a complex mathematical concept, like a Polytope or a SimplicialComplex, | + | |
| - | To find out the type of an object '' | ||
| - | < | ||
| - | print $c-> | ||
| - | </ | ||
| - | |||
| - | To get a more detailed explanation of the '' | ||
| - | |||
| - | You can save polymake objects to disc, as explained [[.howto: | ||
| - | |||
| - | ==== Properties ==== | ||
| - | |||
| - | Each (big) object has a list of properties of various types. | ||
| - | |||
| - | < | ||
| - | polytope > $c=cube(3); | ||
| - | </ | ||
| - | |||
| - | To find out what the initial set of properties is, use the '' | ||
| - | |||
| - | < | ||
| - | polytope > print join(", | ||
| - | CONE_AMBIENT_DIM, | ||
| - | </ | ||
| - | |||
| - | To see what a property contains, use the '' | ||
| - | < | ||
| - | polytope > print $c-> | ||
| - | |||
| - | 1 1 0 0 | ||
| - | 1 -1 0 0 | ||
| - | 1 0 1 0 | ||
| - | 1 0 -1 0 | ||
| - | 1 0 0 1 | ||
| - | 1 0 0 -1 | ||
| - | </ | ||
| - | |||
| - | You can also get the content of all properties using the '' | ||
| - | < | ||
| - | polytope > $c-> | ||
| - | name: c | ||
| - | type: Polytope< | ||
| - | description: | ||
| - | |||
| - | |||
| - | CONE_AMBIENT_DIM | ||
| - | 4 | ||
| - | |||
| - | CONE_DIM | ||
| - | 4 | ||
| - | |||
| - | FACETS | ||
| - | 1 1 0 0 | ||
| - | 1 -1 0 0 | ||
| - | 1 0 1 0 | ||
| - | 1 0 -1 0 | ||
| - | 1 0 0 1 | ||
| - | 1 0 0 -1 | ||
| - | |||
| - | |||
| - | AFFINE_HULL | ||
| - | |||
| - | |||
| - | VERTICES_IN_FACETS | ||
| - | {0 2 4 6} | ||
| - | {1 3 5 7} | ||
| - | {0 1 4 5} | ||
| - | {2 3 6 7} | ||
| - | {0 1 2 3} | ||
| - | {4 5 6 7} | ||
| - | |||
| - | |||
| - | BOUNDED | ||
| - | 1 | ||
| - | </ | ||
| - | |||
| - | ==== Production Rules ==== | ||
| - | |||
| - | The object is changed if we ask for a property which has not been computed before. | ||
| - | |||
| - | < | ||
| - | polytope > print $c-> | ||
| - | 1 -1 -1 -1 | ||
| - | 1 1 -1 -1 | ||
| - | 1 -1 1 -1 | ||
| - | 1 1 1 -1 | ||
| - | 1 -1 -1 1 | ||
| - | 1 1 -1 1 | ||
| - | 1 -1 1 1 | ||
| - | 1 1 1 1 | ||
| - | |||
| - | polytope > print join(", | ||
| - | CONE_AMBIENT_DIM, | ||
| - | </ | ||
| - | |||
| - | The property '' | ||
| - | |||
| - | What properties //can// be computed for a given object depends on the set of rules defined for it. Here is a short sequence of commands which lets you find out. | ||
| - | < | ||
| - | polytope> | ||
| - | polytope> | ||
| - | </ | ||
| - | |||
| - | Instead of showing the (lengthy) enumeration have a look at the [[release_docs: | ||
| - | |||
| - | |||
| - | === Schedules === | ||
| - | |||
| - | You may wonder what sequence of rules led to the computation of a property you request. There usually are several mathematical ways to compute a property. '' | ||
| - | |||
| - | Suppose we want to see which sequence of rules leads to the computation of the F_VECTOR. | ||
| - | |||
| - | < | ||
| - | polytope > $schedule=$c-> | ||
| - | polytope > print join(" | ||
| - | HASSE_DIAGRAM : RAYS_IN_FACETS | ||
| - | F_VECTOR : HASSE_DIAGRAM | ||
| - | </ | ||
| - | So if you ask for the f-vector, '' | ||
| - | < | ||
| - | polytope > $schedule-> | ||
| - | polytope > print join(", | ||
| - | POLYTOPE_AMBIENT_DIM, | ||
| - | </ | ||
| - | As you can see, the things '' | ||
| - | |||
| - | If you're interested, read more about rule scheduling in the [[.howto: | ||