Differences
This shows you the differences between two versions of the page.
— | user_guide:tutorials:latest:properties [2023/11/06 10:57] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Objects, Properties and Rules ====== | ||
+ | |||
+ | ==== Objects ==== | ||
+ | |||
+ | In polymake, there is two kinds of objects. A //Big Object// models a complex mathematical concept, like a Polytope or a SimplicialComplex, | ||
+ | |||
+ | To get a more detailed explanation of the '' | ||
+ | |||
+ | You can save polymake objects to disc, as explained [[data|here]]. | ||
+ | |||
+ | ==== Properties ==== | ||
+ | |||
+ | Each (big) object has a list of properties of various types. When an object is ' | ||
+ | |||
+ | <code perl> | ||
+ | > $c=cube(3); | ||
+ | </ | ||
+ | To find out what the initial set of properties is, use the '' | ||
+ | |||
+ | <code perl> | ||
+ | > print join(", | ||
+ | CONE_AMBIENT_DIM, | ||
+ | </ | ||
+ | To find out the type of the object '' | ||
+ | |||
+ | <code perl> | ||
+ | > print $c-> | ||
+ | Polytope< | ||
+ | </ | ||
+ | To see what a property contains, use the '' | ||
+ | |||
+ | <code perl> | ||
+ | > 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 | ||
+ | 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 '' | ||
+ | |||
+ | <code perl> | ||
+ | > $c-> | ||
+ | name: c | ||
+ | type: Polytope< | ||
+ | description: | ||
+ | |||
+ | |||
+ | AFFINE_HULL | ||
+ | |||
+ | |||
+ | BOUNDED | ||
+ | true | ||
+ | |||
+ | 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 | ||
+ | |||
+ | |||
+ | 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} | ||
+ | |||
+ | </ | ||
+ | ==== Production Rules ==== | ||
+ | |||
+ | The object is changed if we ask for a property which has not been computed before. | ||
+ | |||
+ | <code perl> | ||
+ | > 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 | ||
+ | > 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. | ||
+ | |||
+ | <code perl> | ||
+ | > $t=$c-> | ||
+ | > print join(", | ||
+ | AFFINE_HULL, | ||
+ | </ | ||
+ | Instead of showing the (lengthy) enumeration have a look at the [[documentation: | ||
+ | |||
+ | === 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. | ||
+ | |||
+ | <code perl> | ||
+ | > $schedule=$c-> | ||
+ | > print join(" | ||
+ | LINEALITY_DIM : LINEALITY_SPACE | ||
+ | COMBINATORIAL_DIM : CONE_DIM, LINEALITY_DIM | ||
+ | precondition : COMBINATORIAL_DIM ( F_VECTOR : N_FACETS, N_RAYS, COMBINATORIAL_DIM ) | ||
+ | F_VECTOR : N_FACETS, N_RAYS, COMBINATORIAL_DIM | ||
+ | </ | ||
+ | So if you ask for the f-vector, '' | ||
+ | |||
+ | <code perl> | ||
+ | > $schedule-> | ||
+ | > print join(", | ||
+ | CONE_AMBIENT_DIM, | ||
+ | </ | ||
+ | As you can see, the things '' | ||
+ | |||
+ | If you're interested, read more about rule scheduling in the [[user_guide: | ||
+ | |||