This page describes the most commonly used types of object properties and their textual representation in `polymake` data files.

Non-atomic types with variable component types are described using C++ template-like syntax, e.g. list<Element>.

boolean
0 or 1, for false and truth value correspondingly. Textual values true and false are also allowed, but get converted to the numerical representation.
integer
One integer number in decimal notation.
cardinal
One non-negative integer number.
scalar
One rational or floating-point number.
The scalar representation in the input data is left to the user's choice, since it is automatically recognized, and the data are converted when needed. Rationals and floats can be even freely intermixed. The actual data format used during the computations solely depends on the object type.
Syntax rules for floating-point numbers are identical to those of C++ and perl programming languages; rational numbers must look like numerator or numerator/denominator , optionally prepended by the sign.
label
A textual identifier associated with an object (vertex, facet, etc.) May contain letters, digits, underscores, punctuation characters, but no white spaces. The labels are supposed to be unique, but currently this is not checked automatically.
Labels starting with underscore are "magical" in that they are suppressed by the visualization methods.
array<Element>
Sequence of elements of specified type. Elements of atomic type are written in a single line, separated by white spaces, while complex elements are written each on a separate line. Arrays of multidimensional objects are enclosed in an additional pair of angle brackets. Empty section encodes an array of size 0.
list<Element>
Sequence of elements of specified type, enclosed in curly braces. A list is written in a single line, separated by white spaces, unless its elements occupy several lines by itself. An empty list is just a pair of braces: { } .
tuple<Element,...>
Sequence of values of (possibly) different types, like a struct in the C language. A tuple is always enclosed in parentheses. It may extend over several lines.
vector<Element=scalar>
Has the printable representation of an array. Elements must be of some numeric type.
sparse_vector<Element=scalar>
Looks like list< tuple<cardinal (=index), scalar (=value)> >. The last tuple has no value component, and its index encodes the vector dimension. All omitted scalars are supposed to be zero.
A sparse vector is allowed to be stored in the dense form as well. The client programs choose the dense representation automatically if the fill grade of a vector is over 1/2.
matrix<Element=scalar>
An array of vectors. The vectors represent the matrix rows and, obviously, must have the same dimension. Unless explicitly specified, elements are of scalar type. Empty section encodes a 0x0 matrix.
sparse_matrix<Element=scalar>
Like matrix, but the lines are allowed to be encoded either in the dense or in the sparse form, independent from each other.
set
A list of elements in strictly increasing order. Unless specified explicitly, elements are cardinals.
powerset
Lexicographically sorted list of sets.
map<Key, Value>
Associative container (like std::map or std::hash_map). Looks like list< tuple<Key, Value> >:
{(key1 value1) (key2 value2) ... }
incidence_matrix
An array of sets. Each line encodes a row of the 0/1 matrix, it contains the set of column indices of 1-entries.
graph
An array of sets. Each line belongs to a node and contains the number of adjacent nodes. The nodes are numbered from 0 to n-1. An undirected graph is stored redundantly, that is, each edge occurs in the incidence lists of both incident nodes.
attributed_graph<NodeAttribute, EdgeAttribute>
A graph with additional data associated with nodes and/or edges. An attributed node is represented as a tuple<NodeAttribute, list (=incident edges)>. An attributed edge is represented as a tuple<EdgeAttribute, cardinal (=target node)>.
face_lattice
The first line encodes the number of nodes in each level (i.e., face dimension.) The rest of the section is an attributed_graph<set, void>. Each node corresponds to a face. The node attribute is a set of vertices comprising the face. Incident edges lead to the containing faces of the next (higher) dimension.
RGB
Vector with 3 integers between 0 and 255, encoding a color in a 24-bit RGB system.
chirotope
Sequence of +, -, 0. This data format is specific to the TOPCOM package. It is not interpreted by polymake itself, but used as an opaque data type for storing intermediate results of programs from this package.