playground:playground

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
playground:playground [2019/03/21 13:13] oroehrigplayground:playground [2019/03/25 20:59] oroehrig
Line 1: Line 1:
-====== application common ====== +====== application topaz ====== 
- This artificial application gathers functionality shared by many "real" + The __TOP__ology __A__pplication __Z__oo deals with abstract simplicial complexes.\\ A complex is given as a list of facets.  You can ask for its global properties ([[playground/playground/SimplicialComplex#MANIFOLD |manifold recognition]],\\ [[playground/playground/SimplicialComplex#HOMOLOGY |homology groups]], etc.),  explore the local vertex environment ([[playground/playground#star |stars]], [[playground/playground#link |links]], etc.),  and make a lot\\ of constructions.\\ The visualization means are constrained, as they are mostly based on the ''[[playground/playground/SimplicialComplex#GRAPH |GRAPH]]'' (1-skeleton) of a complex
- applications.  While most users can probably do without looking into this, +imports from: 
- you may find some useful functions here+    * [[graph|application graph]]  
 +    * [[common|application common]]  
 +uses: 
 +    * [[ideal|application ideal]]  
 +    * [[group|application group]] 
 ===== Objects ===== ===== Objects =====
-  * [[common:PermBase|PermBase]]:\\  Base class for permutations of `big' objects +  * [[topaz:GeometricSimplicialComplex|GeometricSimplicialComplex]]:\\  A geometric simplicial complex, i.e., a simplicial complex with a geometric realization. //Scalar// is the numeric data type used for the coordinates. 
-  * [[common:Visual::Container|Visual::Container]]:\\  The common base class of all visual objects composed of several simpler objectsInstances of such classes can carry default decoration attributes applied to all contained objects. +  * [[topaz:HyperbolicSurface|HyperbolicSurface]]:\\ A hyperbolic surface (noncompact, finite area) is given by a triangulation [[/topaz/objects/HyperbolicSurface/properties/DCEL_DATA]] (the topological data) and [[/topaz/objects/HyperbolicSurface/properties/PENNER_COORDINATES]] (the metric data). 
-  * [[common:Visual::Object|Visual::Object]]:\\  The common base class of all visualization artifacts produced by various user methods like VISUAL, VISUAL_GRAPH, SCHLEGEL, etc.  Visual objects can be passed to functions explicitly calling visualization software like //jreality()// or //povray()//.+  * [[topaz:MorseMatching|MorseMatching]]:\\  A Morse matching is a reorientation of the arcs in the Hasse diagram of a simplicial complex such that at most one arc incident to each face is reoriented (matching condition) and the resulting orientation is acyclic (acyclicity condition)Morse matchings capture the main structure of discrete Morse functions, see Robin Forman: Morse Theory for Cell-Complexes, Advances in Math., 134 (1998), pp. 90-145. This property is computed by one of two heuristics. The default heuristic is a simple greedy algorithm ([[/topaz/objects/SimplicialComplex|greedy]]). The alternative is to use a canceling algorithm due to Forman ([[/topaz/objects/SimplicialComplex|cancel]]) or both ([[/topaz/objects/SimplicialComplex|both]]) togetherNote that the computation of a Morse matching of largest size is NP-hard. See Michael Joswig, Marc E. Pfetsch: Computing Optimal Morse Matchings SIAM J. Discrete Math., 2006, to appear 
 +  * [[topaz:SimplicialComplex|SimplicialComplex]]:\\  An abstract simplicial complex represented by its facets. 
 +  * [[topaz:Visual::SimplicialComplex|Visual::SimplicialComplex]]:\\  Visualization of the simplicial complex. 
 +  * [[topaz:Visual::SimplicialComplexLattice|Visual::SimplicialComplexLattice]]:\\  Visualization of the [[/topaz/objects/SimplicialComplex/properties/Combinatorics/HASSE_DIAGRAM]] of a simplicial complex as a multi-layer graph.
 ===== Functions ===== ===== Functions =====
- 
-{{anchor:db_print_searchable_fields:}} **''db_print_searchable_fields''** 
-  * UNDOCUMENTED 
- 
-{{anchor:db_get_type_information:}} **''db_get_type_information''** 
-  *  20171204: Made type_information_key undef by default to allow users to pass the key "default" explicitly, otherwise default keys have the form "default.<collection>" as there may be more than one collection in the db with a default type information entry 
- 
----- 
-==== Arithmetic ==== 
- These are functions that perform arithmetic computations. 
-{{anchor:fac:}} **''fac([[common:Basic Types#Int | Int]] n)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Int | Int]] ''n'' : >=0 
-  * //Returns:// [[common:Basic Types#Integer | Integer]] 
-  *  Computes the factorial //n//! = n&middot;(n-1)&middot;(n-2)&middot;...&middot;2&middot;1. 
- 
-{{anchor:is_zero:}} **''is_zero(SCALAR s)''** 
-    * //Parameters:// 
-      * SCALAR ''s'' 
-  * //Returns:// [[common:Basic Types#Bool | Bool]] 
-  *  Compare with the zero (0) value of the corresponding data type. 
- 
-{{anchor:div:}} **''div([[common:Basic Types#Int | Int]] a, [[common:Basic Types#Int | Int]] b)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Int | Int]] ''a'' 
-      * [[common:Basic Types#Int | Int]] ''b'' 
-  * //Returns:// [[common:Arithmetic#Div | Div]] 
-  *  Compute the quotient and remainder of //a// and //b// in one operation. 
-  * //Example://\\  \\ <code> > $d = div(10,3); 
- > print $d->quot; 
- 3 
-</code>\\  \\ <code> > print $d->rem; 
- 1 
-</code> 
- 
-{{anchor:isinf:}} **''isinf(SCALAR a)''** 
-    * //Parameters:// 
-      * SCALAR ''a'' 
-  * //Returns:// [[common:Basic Types#Int | Int]] 
-  *  Check whether the given number has an infinite value.  Return -1/+1 for infinity and 0 for all finite values. 
-  * //Example://\\  \\ <code> > print isinf('inf'); 
- 1 
-</code>\\  \\ <code> > print isinf(23); 
- 0 
-</code> 
- 
-{{anchor:div_exact:}} **''div_exact([[common:Basic Types#Integer | Integer]] a, [[common:Basic Types#Integer | Integer]] b)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Integer | Integer]] ''a'' 
-      * [[common:Basic Types#Integer | Integer]] ''b'' : a divisor of //a// 
-  * //Returns:// [[common:Basic Types#Integer | Integer]] 
-  *  Computes the ratio of two given integral numbers under the assumption that the dividend is a multiple of the divisor. 
-  * //Example://\\  \\ <code> > print div_exact(10,5); 
- 2 
-</code> 
- 
-{{anchor:ceil:}} **''ceil([[common:Basic Types#Rational | Rational]] a)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Rational | Rational]] ''a'' 
-  * //Returns:// [[common:Basic Types#Rational | Rational]] 
-  *  The __ceiling function__. Returns the smallest integral number not smaller than //a//. 
- 
-{{anchor:set_var_names:}} **''set_var_names([[common:Basic Types#String | String]] names ...)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#String | String]] ''names ...'' : variable names; may also be bundled in an array\\                         an empty list resets to the default naming scheme 
-  *  Set the list of variable names used for pretty printing and string parsing of the given polynomial class\\ When the number of variables in a polynomial is greater than the size of the name list, the excess variable names\\ are produced from a template "${last_var_name}_{EXCESS}", where EXCESS starts at 0 for the variable corresponding\\ to the last name in the list.  If the last name already has a form "{Name}_{Number}", the following variables are enumerated\\ starting from that Number plus 1.\\ The default naming scheme consists of a single letter "x", "y", "z", "u", "v", or "w" chosen according to the nesting depth\\ of polynomial types in the coefficient type.  That is, variables of simple polynomials (those with pure numerical coefficients)\\ are named x_0, x_1, ..., variables of polynomials with simple polynomial coefficients are named y_0, y_1, etc. 
- 
-{{anchor:monomials:}} **''monomials<Coefficient, Exponent>([[common:Basic Types#Int | Int]] n)''** 
-    * //Template Parameters:// 
-      * ''Coefficient'' : The polynomial coefficient type. Rational by default. 
-   
-      * ''Exponent'' : The exponent type. Int by default. 
-   
-    * //Parameters:// 
-      * [[common:Basic Types#Int | Int]] ''n'' : The number of variables 
-  * //Returns:// [[common:Algebraic Types#UniPolynomial | UniPolynomial]] < [[common:Arithmetic#monomials | monomials]] 
-  *  Create degree one monomials of the desired polynomial type. 
- 
-{{anchor:isfinite:}} **''isfinite(SCALAR a)''** 
-    * //Parameters:// 
-      * SCALAR ''a'' 
-  * //Returns:// [[common:Basic Types#Bool | Bool]] 
-  *  Check whether the given number has a finite value. 
-  * //Example://\\  \\ <code> > print isfinite('inf'); 
- false 
-</code>\\  \\ <code> > print isfinite(23); 
- true 
-</code> 
- 
-{{anchor:local_var_names:}} **''local_var_names([[common:Basic Types#String | String]] names ...)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#String | String]] ''names ...'' : variable names, see [[/common/functions/Arithmetic/set_var_names]]. 
-  *  Set the list of variable names for given polynomial class temporarily.\\ The existing name list or the default scheme is restored at the end of the current user cycle,\\ similarly to [[/core/functions/Basic/prefer_now]]. 
- 
-{{anchor:numerator:}} **''numerator''** 
- 
-{{anchor:get_var_names:}} **''get_var_names''** 
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#String | String]] > 
-  *  Get the current list of variable names used for pretty printing and string parsing of the given polynomial class 
- 
-{{anchor:sum_of_square_roots_naive:}} **''sum_of_square_roots_naive([[common:Basic Types#Array | Array]] < [[common:Basic Types#Rational | Rational]] > input_array)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Array | Array]] < [[common:Basic Types#Rational | Rational]] > ''input_array'' : a list of rational numbers (other coefficents are not implemented). 
-  * //Returns:// [[common:Set Types#Map | Map]] < [[common:Basic Types#Rational | Rational]] , [[common:Basic Types#Rational | Rational]] > 
-  *  Make a naive attempt to sum the square roots of the entries of the input array. 
-  * //Example://\\ To obtain sqrt{3/4} + sqrt{245}, type \\ <code> > print sum_of_square_roots_naive(new Array<Rational>([3/4, 245])); 
- {(3 1/2) (5 7)} 
-</code>\\  This output represents sqrt{3}/2 + 7 sqrt{5}.\\ If you are not satisfied with the result, please use a symbolic algebra package. \\  
- 
-{{anchor:gcd:}} **''gcd''** 
- 
-{{anchor:denominator:}} **''denominator''** 
- 
-{{anchor:ext_gcd:}} **''ext_gcd([[common:Basic Types#Int | Int]] a, [[common:Basic Types#Int | Int]] b)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Int | Int]] ''a'' 
-      * [[common:Basic Types#Int | Int]] ''b'' 
-  * //Returns:// [[common:Arithmetic#ExtGCD | ExtGCD]] 
-  *  Compute the greatest common divisor of two numbers (a,b) and accompanying co-factors. 
-  * //Example://\\  \\ <code> > $GCD = ext_gcd(15,6); 
-</code>\\  The GCD of the numbers can then be accessed like this: \\ <code> > print $GCD->g; 
- 3 
-</code>\\  The ExtGCD type also stores the Bezout coefficients (thus integers p and q such that g=a*p+b*q)... \\ <code> > print $GCD->p; 
- 1 
-</code>\\  print $GCD->q; \\ \\  ...and the quotients k1 of a and k2 of b by g. \\ <code> > print $GCD->k1; 
- 5 
-</code>\\  \\ <code> > print $GCD->k2; 
- 2 
-</code> 
- 
-{{anchor:floor:}} **''floor([[common:Basic Types#Rational | Rational]] a)''** 
-    * //Parameters:// 
-      * [[common:Basic Types#Rational | Rational]] ''a'' 
-  * //Returns:// [[common:Basic Types#Rational | Rational]] 
-  *  The __floor function__. Returns the smallest integral number not larger than //a//. 
-  * //Example://\\  \\ <code> > print floor(1.8); 
- 1 
-</code> 
- 
-{{anchor:is_one:}} **''is_one(SCALAR s)''** 
-    * //Parameters:// 
-      * SCALAR ''s'' 
-  * //Returns:// [[common:Basic Types#Bool | Bool]] 
-  *  Compare with the one (1) value of the corresponding data type. 
- 
-{{anchor:lcm:}} **''lcm''** 
  
 ---- ----
 ==== Combinatorics ==== ==== Combinatorics ====
- This category contains combinatorial functions. + These functions capture combinatorial information of the object.  Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice. 
-{{anchor:permutation_order:}} **''permutation_order([[common:Basic Types#Array Array]] < [[common:Basic Types#Int Int]] > p)''**+\\ 
 +{{anchor:n_poset_homomorphisms:}} **''n_poset_homomorphisms([[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]> P, [[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]> Q)''**
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > ''p'' :  +      * ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' ''P'' :  
-  * //Returns:// [[common:Basic Types#Int | Int]] +      * ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' ''Q'' :  
-  *  Returns the order of a permutation +  * //Returns:// ''[[playground/playground#Int |Int]]'' 
-  * //Example://\\  \\ <code> > print permutation_order(new Array<Int>([1,2,0,4,3])); +  *  Count all order preserving maps from one poset to another.\\ They are in fact enumeratedbut only the count is kept track of using constant memory.
- 6 +
-</code> +
- +
-{{anchor:binomial:}} **''binomial([[common:Basic Types#Int Int]] n, [[common:Basic Types#Int | Int]] k)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Int | Int]] ''n'' :  +
-      * [[common:Basic Types#Int | Int]] ''k'' :  +
-  * //Returns:// [[common:Basic Types#Int | Int]] +
-  *  Computes the binomial coefficient __//n// choose //k//__.\\ Negative values of //n// (and //k//) are supported. +
-  * //Example://\\ Print 6 choose 4 like this: \\ <code> > print binomial(6,4); +
- 15 +
-</code> +
- +
-{{anchor:permutation_sign:}} **''permutation_sign([[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > p)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Array Array]] < [[common:Basic Types#Int | Int]] > ''p'' :  +
-  * //Returns:// [[common:Basic Types#Int | Int]] +
-  *  Returns the __sign__ of the permutation given by //p//. +
-  * //Example://\\  \\ <code> > print permutation_sign([1,0,3,2]); +
- 1 +
-</code> +
- +
-{{anchor:permutation_matrix:}} **''permutation_matrix<Scalar>([[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > p)''** +
-    * //Template Parameters:// +
-      * ''Scalar'' : default: [[/common/property_types/Basic Types/Int]] +
-   +
-    * //Parameters:// +
-      * [[common:Basic Types#Array Array]] < [[common:Basic Types#Int | Int]] > ''p'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] < [[common:Combinatorics#permutation | permutation]] +
-  *  Returns the __permutation matrix__ of the permutation given by //p//. +
-  * //Example://\\ The following prints the permutation matrix in sparse representation. \\ <code> print permutation_matrix([1,0,3,2]); +
- (4) (1 1) +
- (4) (0 1) +
- (4) (3 1) +
- (4) (2 1) +
-</code> +
- +
-{{anchor:find_permutation:}} **''find_permutation([[common:Basic Types#Array | Array]] a, [[common:Basic Types#Array | Array]] b)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Array | Array]] ''a'' :  +
-      * [[common:Basic Types#Array | Array]] ''b'' :  +
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > +
-  *  Returns the permutation that maps //a// to //b//. +
-  * //Example://\\  \\ <code> > $p = find_permutation([1,8,3,4],[3,8,4,1]); +
- > print $p; +
- 2 1 3 0 +
-</code> +
- +
-{{anchor:all_permutations:}} **''all_permutations([[common:Basic Types#Int | Int]] n)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Int | Int]] ''n'' +
-  * //Returns:// ARRAY +
-  *  Returns a list of all permutations of the set {0...n-1} as a perl-array +
-  * //Example://\\ To store the result in the perl array @a, type this: \\ <code> > @a = all_permutations(3); +
-</code>\\  The array contains pointers to arraysTo access the 0-th pointer, do this: \\ <code> > $a0 = $a[0]; +
-</code>\\  To print the 0-th array itself, you have to dereference it as follows: \\ <code> > print @{ $a0 }; +
- 012 +
-</code>\\  You can loop through @a using foreach. The print statement produces the string obtained by dereferencing\\ the current entry concatenated with the string " ". \\ <code> > foreach( @a ){ +
- > print @{ $_ }, " "; +
- > } +
- 012 102 201 021 120 210 +
-</code> +
- +
-{{anchor:n_fixed_points:}} **''n_fixed_points([[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > p)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > ''p'' :  +
-  * //Returns:// [[common:Basic Types#Int | Int]] +
-  *  Returns the number of fixed points of the permutation given by //p//. +
-  * //Example://\\  \\ <code> > print n_fixed_points([1,0,2,4,3]); +
- 1 +
-</code> +
- +
-{{anchor:are_permuted:}} **''are_permuted([[common:Basic Types#Array | Array]] a, [[common:Basic Types#Array | Array]] b)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Array | Array]] ''a'' :  +
-      * [[common:Basic Types#Array | Array]] ''b'' :  +
-  * //Returns:// [[common:Basic Types#Bool | Bool]] +
-  *  Determine whether two arrays //a// and //b// are permuted copies of each other. +
-  * //Example://\\  \\ <code> > print are_permuted([1,8,3,4],[3,8,4,1]); +
- true +
-</code> +
- +
-{{anchor:permutation_cycles:}} **''permutation_cycles([[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > p)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > ''p'' :  +
-  * //Returns:// ARRAY +
-  *  Returns the __cycles__ of a permutation given by //p//. +
-  * //Example://\\  \\ <code> > print permutation_cycles([1,0,3,2]); +
- {0 1}{2 3} +
-</code> +
- +
-{{anchor:permutation_cycle_lengths:}} **''permutation_cycle_lengths([[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > p)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > ''p'' :  +
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > +
-  *  Returns the sorted cycle lengths of a permutation +
-  * //Example://\\  \\ <code> > print permutation_cycle_lengths(new Array<Int>([1,2,0,4,3])); +
- 2 3 +
-</code>+
  
 ---- ----
-==== Data Conversion ==== +==== Comparing ==== 
- This contains functions for data conversions and type casts. + These functions compare two [[/topaz/objects/SimplicialComplex]] 
-{{anchor:rows:}} **''rows''** +\\ 
- +{{anchor:isomorphic:}} **''isomorphic([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2)''**
-{{anchor:repeat_col:}} **''repeat_col([[common:Algebraic Types#Vector Vector]] v, [[common:Basic Types#Int Int]] i)''**+
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Vector Vector]] ''v'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1'' :  
-      * [[common:Basic Types#Int Int]] ''i'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2'' :  
-  *  Create a [[/common/property_types/Algebraic Types/Matrix]] by repeating the given [[/common/property_types/Algebraic Types/Vector]] as cols. +  * //Returns:// ''[[playground/playground#Bool |Bool]]'' 
-  * //Example://\\  \\ <code> > $v = new Vector(23,42,666); +  *  Determine whether two given complexes are combinatorially isomorphic.\\ The problem is reduced to graph isomorphism of the vertex-facet incidence graphs.
- > $M = repeat_col($v,3); +
- > print $M; +
- 23 23 23 +
- 42 42 42 +
- 666 666 666 +
-</code>+
  
-{{anchor:cast:}} **''cast<Target>([[core:#Core::Object Core::Object]] object)''** +\\ 
-    * //Template Parameters:// +{{anchor:find_facet_vertex_permutations:}} **''find_facet_vertex_permutations([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2)''**
-      * ''Target'' : the desired new type +
-  +
     * //Parameters://     * //Parameters://
-      * [[core:#Core::Object Core::Object]] ''object''to be modified +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1''  
-  * //Returns:// [[core:#Core::Object Core::Object]] +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2'' :  
-  *  Change the type of the polymake object to one of its base types\\ (aka ancestor in the inheritance hierarchy).\\ The object loses all properties that are unknown in the target type.+  * //Returns:// ''[[playground/playground#Pair |Pair]]<[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>,[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>>'' 
 +  *  Find the permutations of facets and vertices which maps the first complex to the second one.\\ The facet permutation is the first component of the return value.\\ If the complexes are not isomorphic, an exception is thrown.
  
-{{anchor:concat_rows:}} **''concat_rows([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:pl_homeomorphic:}} **''pl_homeomorphic([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1'' :  
-  * //Returns:// [[common:Algebraic Types#Vector | Vector]] +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2'' :  
-  *  Concatenates the rows of //A//. +  * //Returns:// ''[[playground/playground#Bool |Bool]]'' 
-  * //Example://\\  Make a vector out of the rows of the vertex matrix of a cube: \\ <code> > $v = concat_rows(polytope::cube(2)->VERTICES); +  *  Tries to determine whether two complexes are pl-homeomorphic by using\\  bistellar flips and a simulated annealing strategy.\\ You may specify the maximal number of //rounds//how often the system\\ may //relax// before heating up and how much //heat// should be applied.\\ The function stops computingonce the size of the triangulation has not decreased\\ for //rounds// iterations. If the //abs// flag is set, the function stops\\ after //rounds// iterations regardless of when the last improvement took place.\\ Additionally, you may set the threshold //min_n_facets// for the number of facets when\\ the simplification ought to stop. Default is d+in the ''[[playground/playground/SimplicialComplex#CLOSED_PSEUDO_MANIFOLD |CLOSED_PSEUDO_MANIFOLD]]'' case\\ and 1 otherwise.\\ If you want to influence the distribution of the dimension of the moves when warming up\\ you may do so by specifying a //distribution//. The number of values in //distribution//\\ determines the dimensions used for heating up. The heating and relaxing parameters decrease dynamically\\ unless the //constant// flag is set. The function prohibits to execute the reversed move of a move\\ directly after the move itself unless the //allow_rev_move// flag is set. Setting the\\ //allow_rev_move// flag might help solve particular resilient problem.\\ If you are interested in how the process is coming along, try the //verbose// option.\\ It specifies after how many rounds the current best result is displayed.\\ The //obj// determines the objective function used for the optimization. If //obj// is set to 0,\\ the function searches for the triangulation with the lexicographically smallest f-vector,\\ if //obj// is set to 1, the function searches for the triangulation with the reversed-lexicographically\\ smallest f-vector and if //obj// is set to 2 the sum of the f-vector entries is used.\\ The default is 1.
- > print $v; +
- 1 -1 -1 1 1 -1 1 -1 1 1 1 1 +
-</code> +
-  * //Example://\\ For a sparse matrix, the resulting vector is sparse, too. \\ <code> > $vs = concat_rows(unit_matrix(3)); +
- > print $vs; +
- (9) (0 1) (4 1) (8 1) +
-</code> +
- +
-{{anchor:vector2col:}} **''vector2col([[common:Algebraic Types#Vector Vector]] v)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Vector | Vector]] ''v'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-  *  Convert a [[/common/property_types/Algebraic Types/Vector]] to a [[/common/property_types/Algebraic Types/Matrix]] with a single column. +
-  * //Example://\\ This converts a vector into a column and prints it and its type: \\ <code> > $v = new Vector([1,2,3,4]); +
- > $V = vector2col($v); +
- > print $V; +
- 1 +
- 2 +
- 3 +
- 4 +
-</code>\\  \\ <code> > print $V->type->full_name; +
- Matrix<Rational, NonSymmetric> +
-</code> +
- +
-{{anchor:toTropicalPolynomial:}} **''toTropicalPolynomial([[common:Basic Types#String | String]] s, [[common:Basic Types#String | String]] vars)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#String String]] ''s'' : The string to be parsed +
-      * [[common:Basic Types#String | String]] ''vars''Optional list of variables. If this is given, all variables used in s must match one of the variables in this list. +
-  * //Returns:// [[common:Algebraic Types#Polynomial Polynomial]] < [[common:Arithmetic#TropicalNumber | TropicalNumber]] < [[common:Arithmetic#Addition | Addition]] , [[common:Basic Types#Rational | Rational]] > > +
-  *  This converts a string into a tropical polynomial. The syntax for the string is as follows:\\ It is of the form "min(...)" or "max(...)" or "min{...}" or "max{...}", where ...\\ is a comma-separated list of sums of the form "a + bx + c + dy + ...", where a,c are\\ rational numbers, b,d are Ints and x,y are variables.\\ Such a sum can contain several such terms for the same variable and they need not be in any order.\\ Any text that starts with a letter and does not contain any of +-*,(){} or whitespace can be a variable.\\ A term in a sum can be of the form "3x", "3*x", but "x3"will be interpreted as 1 * "x3".\\ Coefficients should not contain letters and there is no evaluation of arithmetic, i.e. "(2+4)*x" does\\ not work (though "2x+4x" would be fine).\\ In fact, further brackets should only be used (but are not necessary!) for single coefficienst,\\ e.g. "(-3)*x".\\ Warning: The parser will remove all brackets before parsing the individual sums.\\ If no further arguments are given, the function will take the number of occuring variables\\ as total number of variables and create a ring for the result. The variables will be sorted alphabetically. +
- +
-{{anchor:toMatrix:}} **''toMatrix<Scalar>([[common:Set Types#IncidenceMatrix | IncidenceMatrix]] A)''** +
-    * //Template Parameters:// +
-      * ''Scalar'' :  +
-    * //Parameters:// +
-      * [[common:Set Types#IncidenceMatrix | IncidenceMatrix]] ''A'' :  +
-  * //Returns:// [[common:Algebraic Types#SparseMatrix | SparseMatrix]] < [[common:Data Conversion#toMatrix | toMatrix]] +
-  *  Convert an IncidenceMatrix to a SparseMatrix. +
-  * //Example://\\  \\ <code> > $M = toMatrix<Int>(polytope::cube(2)->VERTICES_IN_FACETS); +
- > print $M->type->full_name; +
- SparseMatrix<Int, NonSymmetric> +
-</code> +
- +
-{{anchor:indices:}} **''indices([[common:Algebraic Types#SparseVector | SparseVector]] v)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#SparseVector SparseVector]] ''v'' :  +
-  * //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +
-  *  Get the positions of non-zero entries of a sparse vector. +
-  * //Example://\\  \\ <code> > $v = new SparseVector(0,1,1,0,0,0,2,0,3); +
- > print indices($v); +
- {1 2 6 8} +
-</code> +
- +
-{{anchor:repeat_row:}} **''repeat_row([[common:Algebraic Types#Vector | Vector]] v, [[common:Basic Types#Int | Int]] i)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Vector | Vector]] ''v'' :  +
-      * [[common:Basic Types#Int | Int]] ''i'' :  +
-  *  Create [[/common/property_types/Algebraic Types/Matrix]] by repeating the given [[/common/property_types/Algebraic Types/Vector]] as rows. +
-  * //Example://\\  \\ <code> > $v = new Vector(23,42,666); +
- > $M = repeat_row($v,3); +
- > print $M; +
- 23 42 666 +
- 23 42 666 +
- 23 42 666 +
-</code> +
- +
-{{anchor:convert_to:}} **''convert_to''** +
- +
-{{anchor:support:}} **''support([[common:Algebraic Types#Vector | Vector]] v)''** +
-    * //Parameters:/+
-      * [[common:Algebraic Types#Vector | Vector]] ''v'' :  +
-  * //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +
-  *  Get the positions of non-zero entries of a vector. +
-  * //Example://\\  \\ <code> > print support(new Vector(0,23,0,0,23,0,23,0,0,23)); +
- {1 4 6 9} +
-</code> +
- +
-{{anchor:toVector:}} **''toVector<Scalar>([[common:Set Types#Set | Set]] S, [[common:Basic Types#Int | Int]] d)''** +
-    * //Template Parameters:/+
-      * ''Scalar'' : type of apparent 1's +
-   +
-    * //Parameters:// +
-      * [[common:Set Types#Set | Set]] ''S'' :  +
-      * [[common:Basic Types#Int | Int]] ''d'' : dimension of the result +
-  * //Returns:// [[common:Algebraic Types#SparseVector | SparseVector]] < [[common:Data Conversion#toVector | toVector]] +
-  *  Create sparse vector having 1's at positions contained in the given set +
- +
-{{anchor:vector2row:}} **''vector2row([[common:Algebraic Types#Vector | Vector]] v)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Vector | Vector]] ''v'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-  *  Convert a [[/common/property_types/Algebraic Types/Vector]] to a [[/common/property_types/Algebraic Types/Matrix]] with a single row. +
-  * //Example://\\ This converts a vector into a row and prints it and its type: \\ <code> > $v = new Vector([1,2,3,4]); +
- > $V = vector2row($v); +
- > print $V; +
- 1 2 3 4 +
-</code>\\  \\ <code> > print $V->type->full_name; +
- Matrix<Rational, NonSymmetric> +
-</code> +
- +
-{{anchor:cols:}} **''cols''** +
- +
-{{anchor:index_matrix:}} **''index_matrix([[common:Algebraic Types#SparseMatrix | SparseMatrix]] m)''** +
-    * //Parameters:/+
-      * [[common:Algebraic Types#SparseMatrix | SparseMatrix]] ''m'' :  +
-  * //Returns:// [[common:Set Types#IncidenceMatrix | IncidenceMatrix]] +
-  *  Get the positions of non-zero entries of a sparse matrix. +
-  * //Example://\\  \\ <code> > $S = new SparseMatrix([1,2,0,0,0,0],[0,0,5,0,0,32]); +
- > print index_matrix($S); +
- {0 1} +
- {2 5} +
-</code> +
- +
-{{anchor:dense:}} **''dense''** +
- +
-{{anchor:lex_ordered:}} **''lex_ordered([[common:Set Types#FacetList | FacetList]] f)''** +
-    * //Parameters:// +
-      * [[common:Set Types#FacetList | FacetList]] ''f'' :  +
-  * //Returns:// [[common:Set Types#PowerSet | PowerSet]] < [[common:Basic Types#Int | Int]] > +
-  *  Visit the facets of //f// sorted lexicographically. +
-  * //Example://\\  \\ <code> > $f = new FacetList(polytope::cube(2)->VERTICES_IN_FACETS); +
- > print lex_ordered($f); +
- {{0 1} {0 2} {1 3} {2 3}} +
-</code>+
  
 ---- ----
-==== Database ==== +==== Other ==== 
- Here you can find the functions to access the polymake database+ Special purpose functions. 
-{{anchor:db_write_db_info:}} **''db_write_db_info([[common:Basic Types#String String]] db)''**+\\ 
 +{{anchor:poset_by_inclusion:}} **''poset_by_inclusion([[playground/playground#Array |Array]]<[[playground/playground#poset |poset]] P)''**
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#String String]] ''db''name of the database the description applies to +      * ''[[playground/playground#Array |Array]]<[[playground/playground#poset |poset]]'' ''P'' :  
-  *  Add db documentation.\\ You need write access for this.+  * //Returns:// ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' 
 +  *  Construct the inclusion poset from given container.\\ The elements of the container are interpreted as sets.  They define a poset\\ by inclusion.  The function returns this poset encoded as a directed graph.\\ The direction is towards to larger sets.  All relations are encoded, not\\ only the covering relations.\\ For details see Assarf, Joswig & Pfeifle:\\ Webs of stars or how to triangulate sums of polytopes, to appear
  
-{{anchor:db_ids:}} **''db_ids(HASH query)''**+\\ 
 +{{anchor:is_vertex_decomposition:}} **''is_vertex_decomposition([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]> vertices)''**
     * //Parameters://     * //Parameters://
-      * HASH ''query'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-  //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#String String]] > +      ''[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>'' ''vertices'' : shedding vertices 
-  *  Returns the IDs of all objects in the database //db/in //collection// that match the //query//. This is only recommended for a reasonably small number of matching objects. If you expect many such objects you should instead construct a [[/common/property_types/Database/DBCursor]].+  * //Returns:// ''[[playground/playground#Bool |Bool]]'' 
 +  *  Check whether a given ordered subset of the vertex set is a __vertex decomposition__.\\ Works for 1-, 2- and 3-manifolds only!
  
-{{anchor:db_query:}} **''db_query(HASH query)''**+\\ 
 +{{anchor:stiefel_whitney:}} **''stiefel_whitney([[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>> facets)''**
     * //Parameters://     * //Parameters://
-      * HASH ''query'' :  +      * ''[[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>>'' ''facets''the facets of the simplicial complex 
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[core:#Core::Object Core::Object]] > +  * //Returns:// ''[[playground/playground#Array |Array]]<[[playground/playground#PowerSet |PowerSet]]<[[playground/playground#Int |Int]]>>'' 
-  *  Returns all objects in the database //db// in //collection// that match the //query//. This is only recommended for a reasonably small number of matching objects. If you expect many such objects you should instead use a database cursor.+  *  Computes __Stiefel-Whitney classes__ of mod 2 Euler space (in particular, closed manifold).\\ Use option //verbose// to show regular pairs and cycles.\\ A narrower dimension range of interest can be specified.\\ Negative values are treated as co-dimension - 1
  
-{{anchor:db_metadata:}} **''db_metadata([[core:#Core::Object Core::Object]] p)''**+\\ 
 +{{anchor:star_of_zero:}} **''star_of_zero([[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]] C)''**
     * //Parameters://     * //Parameters://
-      * [[core:#Core::Object Core::Object]] ''p''the polyDB object +      * ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' ''C'' :  
-  * //Returns:// HASH +  * //Returns:// ''[[playground/playground#Set |Set]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>>'' 
-  *  Retrieve the metadata of an object+  *  Find the facets of the star of the origin in the simplicial complex.\\ The origin may be a vertex or not.\\ For details see Assarf, Joswig & Pfeifle:\\ Webs of stars or how to triangulate sums of polytopes, to appear
  
-{{anchor:db_get_list_col_for_db:}} **''db_get_list_col_for_db''** +\\ 
-  * //Returns:// [[common:Basic Types#Array | Array]] +{{anchor:mixed_graph:}} **''mixed_graph([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
-  *  Returns a list of available collections in a database. +
- +
-{{anchor:db_info:}} **''db_info''** +
-  *  Print information about available databases and collections. +
- +
-{{anchor:db_searchable_fields:}} **''db_searchable_fields([[common:Basic Types#String | String]] db, [[common:Basic Types#String String]] collection)''**+
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#String | String]] ''db'' : name of the database, see [[http://www.polymake.org/doku.php/data|here]] or [[/common/functions/Database/db_info]] for available databases +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Basic Types#String String]] ''collection''name of the collection, see [[http://www.polymake.org/doku.php/data|here]] or [[/common/functions/Database/db_info]] for available collections +  *  Produces the mixed graph of a //complex//.
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#String | String]] > +
-  *  Return the list of property names that can be searched in the database for given database //db//,\\ collection //col// and optional template key.+
  
-{{anchor:db_get_list_db_col:}} **''db_get_list_db_col''** +\\ 
-  * //Returns:// [[common:Basic Types#Array | Array]] +{{anchor:star_shaped_balls:}} **''star_shaped_balls([[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]] P)''**
-  *  Returns a list of available databases and collections (in the form db.collection). +
- +
-{{anchor:db_get_list_db:}} **''db_get_list_db''** +
-  * //Returns:// [[common:Basic Types#Array Array]] +
-  *  Returns a list of available databases. +
- +
-{{anchor:db_count:}} **''db_count(HASH query)''**+
     * //Parameters://     * //Parameters://
-      * HASH ''query'' :  +      * ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' ''P'' :  
-  * //Returns:// [[common:Basic Types#Int Int]] +  * //Returns:// ''[[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Set |Set]]>>'' 
-  *  Returns the number of objects in the database //db// in //collection// that match the //query//.+  *  Enumerate all balls formed by the simplices of a geometric simplicial complex\\ that are strictly star-shaped with respect to the origin.\\ The origin may be a vertex or not.\\ For details see Assarf, Joswig & Pfeifle:\\ Webs of stars or how to triangulate sums of polytopes, to appear
  
-{{anchor:db_cursor:}} **''db_cursor(HASH query)''**+\\ 
 +{{anchor:stabbing_order:}} **''stabbing_order([[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]] P)''**
     * //Parameters://     * //Parameters://
-      * HASH ''query''database query +      * ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' ''P'' :  
-  * //Returns:// [[common:Database#DBCursor DBCursor]] +  * //Returns:// ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' 
-  *  Returns cursor on the entries for the database //db// in //collection// that match the //query//.+  *  Determine the stabbing partial order of simplicial ball with respect to the origin.\\ The origin may be a vertex or not.\\ For details see Assarf, Joswig & Pfeifle:\\ Webs of stars or how to triangulate sums of polytopes, to appear
  
-{{anchor:db_print_metadata:}} **''db_print_metadata([[core:#Core::Object Core::Object]] p)''**+\\ 
 +{{anchor:stanley_reisner:}} **''stanley_reisner([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
     * //Parameters://     * //Parameters://
-      * [[core:#Core::Object Core::Object]] ''p''the polyDB object +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' 
-  *  print the metadata of an object+  * //Returns:// ''[[playground/playground/Ideal# |Ideal]]'' 
 +  *  Creates the __Stanley-Reisner ideal__ of a simplicial complex.
  
-{{anchor:db_write_collection_info:}} **''db_write_collection_info''** +\\ 
-  *  Add documentation for a collection\\ You need write access for this. +{{anchor:is_generalized_shelling:}} **''is_generalized_shelling([[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]> FaceList)''**
- +
----- +
-==== Database Admin ==== +
- These are administrative functions. You need admin access to the database for these. This category also contains functions that I want to hide from the public because they are not yet completely presentable. +
-{{anchor:db_set_type_information:}} **''db_set_type_information''** +
-  *  Set or update type (and template) information for collection //col// in the database //db//.\\ Note that you need write access to the type database for this. +
- +
----- +
-==== Database Write Access ==== +
- These are the functions to insert and update objects. You need write access to the database for these. +
-{{anchor:db_insert:}} **''db_insert([[core:#Core::Object Core::Object]] obj)''**+
     * //Parameters://     * //Parameters://
-      * [[core:#Core::Object Core::Object]] ''obj'' :  +      * ''[[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]>'' ''FaceList'' :  
-  * //Returns:// [[common:Basic Types#String String]] +  * //Returns:// ''[[playground/playground#Bool |Bool]]'' 
-  *  Adds an object //obj// to the collection //col// in the database //db//.\\ Note that you need write access to the database for this.+  *  Check if a given sequence of faces of a simplicial complex is a generalized shelling.
  
-{{anchor:db_remove:}} **''db_remove([[common:Basic Types#String | String]] id)''** +\\ 
-    * //Parameters:// +{{anchor:persistent_homology:}} **''persistent_homology''**
-      * [[common:Basic Types#String | String]] ''id'' :  +
-  * //Returns:// [[common:Basic Types#String | String]] +
-  *  Removes the object with a given //id// from the collection //col// in the database //db//.\\ Note that you need write access to the database for this.+
  
----- +\\ 
-==== Formatting ==== +{{anchor:random_discrete_morse:}} **''random_discrete_morse([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
- Functions for pretty printing, labels or [[/common/functions/Formatting/latex|latex output]] of polymake types. +
-{{anchor:latex:}} **''latex([[common:Algebraic Types#Matrix | Matrix]] data, [[common:Basic Types#Array | Array]] < [[common:Basic Types#String String]] > elem_labels)''**+
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''data''to be printed +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Basic Types#Array Array]] < [[common:Basic Types#String String]] > ''elem_labels'' : optional labels for elements;\\  if //data// is an [[/common/property_types/Set Types/IncidenceMatrix]], [[]], or similar, each element will be replaced by its label. +  //Returns:// ''[[playground/playground#Map |Map]]<[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>,[[playground/playground#Int  |Int ]]>'' 
-  * //Returns:// [[common:Basic Types#String String]] +  *  Implementation of random discrete Morse algorithms by Lutz and Benedetti\\ Returns map of the number of occurrences of different reduction results indexed by the corresponding discrete Morse vectors (containing the number of critical cells per dimension)
-  *  LaTeX output of a matrix.+
  
-{{anchor:numbered:}} **''numbered([[common:Algebraic Types#Vector | Vector]] data)''** +\\ 
-    * //Parameters:// +{{anchor:vietoris_rips_filtration:}} **''vietoris_rips_filtration<Coeff>([[playground/playground#Matrix |Matrix]] D, [[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]> deg, [[playground/playground#Float |Float]] step_size, [[playground/playground#Int |Int]] k)''**
-      * [[common:Algebraic Types#Vector | Vector]] ''data'' : to be printed +
-  * //Returns:// [[common:Basic Types#String | String]] +
-  *  Equivalent to [[/common/functions/Formatting/labeled]] with omitted //elem_labels// argument. +
-  * //Example://\\  \\ <code> > $data = new Vector(23,42,666); +
- > print numbered($data); +
- 0:23 1:42 2:666 +
-</code> +
- +
-{{anchor:rows_numbered:}} **''rows_numbered([[common:Algebraic Types#Matrix | Matrix]] data)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''data'' : to be printed +
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#String | String]] > +
-  *  Equivalent to [[/common/functions/Formatting/rows_labeled]] with omitted //row_labels// argument.\\ Formerly called "numbered"+
-  * //Example://\\  \\ <code> > print rows_numbered(polytope::cube(2)->VERTICES); +
- 0:1 -1 -1 +
- 1:1 1 -1 +
- 2:1 -1 1 +
- 3:1 1 1 +
-</code> +
- +
-{{anchor:labeled:}} **''labeled([[common:Algebraic Types#Vector | Vector]] data, [[common:Basic Types#Array | Array]] < [[common:Basic Types#String | String]] > elem_labels)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Vector | Vector]] ''data'' : to be printed +
-      * [[common:Basic Types#Array | Array]] < [[common:Basic Types#String | String]] > ''elem_labels'' : optional labels for elements;\\  if //data// is a [[/common/property_types/Set Types/Set]], or similar, each element will be replaced by its label. +
-  * //Returns:// [[common:Basic Types#String String]] +
-  *  Prepares a vector for printing, prepends each element with a label and a colon. +
-  * //Example://\\  \\ <code> $v = new Vector(0,1,2); +
- > print labeled($v,["zeroth","first","second"]); +
- zeroth:0 first:1 second:2 +
-</code> +
- +
-{{anchor:rows_labeled:}} **''rows_labeled''** +
- +
-{{anchor:print_constraints:}} **''print_constraints([[common:Algebraic Types#Matrix | Matrix]] < [[common:Formatting#print | print]] M)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix Matrix]] [[common:Formatting#print | print]] ''M'' : the matrix whose rows are to be written +
-  *  Write the rows of a matrix //M// as inequalities (//equations=0//)\\ or equations (//equations=1//) in a readable way.\\ It is possible to specify labels for the coordinates via\\ an optional array //coord_labels//+
-  * //Example://\\  \\ <code> > $M = new Matrix([1,2,3],[4,5,23]); +
- > print_constraints($M,equations=>1); +
- 0: 2 x1 + 3 x2 = -1 +
- 1: 5 x1 + 23 x2 = -4 +
-</code> +
- +
----- +
-==== Graph Operations ==== +
- Operations on graphs. +
-{{anchor:node_edge_incidences:}} **''node_edge_incidences<Coord>([[common:Graph Types#Graph Graph]] graph)''**+
     * //Template Parameters://     * //Template Parameters://
-      * ''Coord''coordinate type for the resulting matrix, default: [[/common/property_types/Basic Types/Int]] +      * ''Coeff''desired coefficient type of the filtration
-  +
     * //Parameters://     * //Parameters://
-      * [[common:Graph Types#Graph Graph]] ''graph'' +      * ''[[playground/playground#Matrix |Matrix]]'' ''D'' : the "distance matrixof the point set (can be upper triangular
-  * //Returns:// [[common:Algebraic Types#SparseMatrix | SparseMatrix]] < [[common:Graph Operations#node | node]] +      * ''[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>'' ''deg'' : the degrees of input points 
-  *  Returns the node-edge incidence matrix of a graph. +      * ''[[playground/playground#Float |Float]]'' ''step_size'' :  
-  * //Example://\\  \\ <code> > print node_edge_incidences(graph::cycle_graph(5)->ADJACENCY); +      * ''[[playground/playground#Int |Int]]'' ''k''dimension of the resulting filtration 
- (5) (0 1) (3 1) +  * //Returns:// ''[[playground/playground#Filtration |Filtration]]<[[playground/playground#SparseMatrix |SparseMatrix]]<[[playground/playground#vietoris |vietoris]]'' 
- (5) (0 1) (1 1) +  *  Constructs the k-skeleton of the Vietrois Rips filtration of a point set. The set is passed as its so-called "distance matrix", whose (i,j)-entry is the distance between point i and jThis matrix can e.g. be computed using the distance_matrix function. The other inputs are an integer array containing the degree of each point, the desired distance step size between frames, and the dimension up to which to compute the skeleton. Redundant points will appear as seperate vertices of the complexSetting k to |Swill compute the entire VR-Complex for each frame.
- (5) (1 1) (2 1) +
- (5) (2 1) (4 1) +
- (5) (3 1) (4 1) +
-</code> +
- +
-{{anchor:adjacency_matrix:}} **''adjacency_matrix([[common:Graph Types#Graph Graph]] graph)''** +
-    * //Parameters:// +
-      * [[common:Graph Types#Graph Graph]] ''graph'' +
-  * //Returns:// [[common:Set Types#IncidenceMatrix | IncidenceMatrix]] +
-  *  Returns the adjacency matrix of graph nodes.\\ For a normal graph, it will be a kind of [[/common/property_types/Set Types/IncidenceMatrix]],\\ for multigraph, it will be a [[]], with entries encoding the number of parallel edges between two nodes. +
- +
-{{anchor:induced_subgraph:}} **''induced_subgraph([[common:Graph Types#Graph Graph]] graph, [[common:Set Types#Set | Set]] set)''** +
-    * //Parameters:// +
-      * [[common:Graph Types#Graph | Graph]] ''graph'' :  +
-      * [[common:Set Types#Set Set]] ''set''indices of selected nodes +
-  * //Returns:// [[common:Graph Types#Graph Graph]] +
-  *  Creates an induced subgraph for the given subset of nodes. +
-  * //Example://\\  \\ <code> > $g = new props::Graph(graph::cycle_graph(5)->ADJACENCY); +
- > $s1 = new Set(1,2,3); +
- > print induced_subgraph($g,$s1); +
- (5) +
- (1 {2}) +
- (2 {1 3}) +
- (3 {2}) +
-</code> +
- +
-{{anchor:edges:}} **''edges([[common:Graph Types#Graph Graph]] graph)''** +
-    * //Parameters:// +
-      * [[common:Graph Types#Graph Graph]] ''graph'' +
-  * //Returns:// [[common:Artificial#EdgeList | EdgeList]] +
-  *  Returns the sequence of all edges of a graph.\\ The edges will appear in ascending order of their tail and head nodes.\\ In the Undirected case, the edges will appear once, ordered by the larger index of their incident nodes. +
- +
-{{anchor:nodes:}} **''nodes([[common:Graph Types#Graph Graph]] graph)''** +
-    * //Parameters:// +
-      * [[common:Graph Types#Graph Graph]] ''graph'' :  +
-  * //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +
-  *  Returns the sequence of all valid nodes of a graph. +
-  * //Example://\\  \\ <code> > print nodes(graph::cycle_graph(5)->ADJACENCY); +
- {0 1 2 3 4} +
-</code>+
  
 ---- ----
-==== Lattice Tools ==== +==== Producing a new simplicial complex from others ==== 
- Functions for lattice related computations+ These functions construct a new [[/topaz/objects/SimplicialComplex]] from other objects of the same type. 
-{{anchor:eliminate_denominators_entire:}} **''eliminate_denominators_entire([[common:Algebraic Types#Matrix Matrix]] v)''**+\\ 
 +{{anchor:star_deletion:}} **''star_deletion([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]> face)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''v'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-  //Returns:// [[common:Algebraic Types#Matrix Matrix]] < [[common:Basic Types#Integer Integer]] > +      ''[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>'' ''face'' : specified by vertex indices.\\  Please use ''[[playground/playground/SimplicialComplex#labeled_vertices |labeled_vertices]]'' if you want to specify the face by vertex labels
-  *  Scales entire matrix with the least common multiple of the denominators of its coordinates+  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\  \\ <code> > $M = new Matrix([1/2,1/3],[1/5,7],[1/4,4/3]); +  *  Remove the star of a given //face//.
- > $Me = eliminate_denominators_entire($M); +
- > print $Me; +
- 30 20 +
- 12 420 +
- 15 80 +
-</code>+
  
-{{anchor:eliminate_denominators:}} **''eliminate_denominators([[common:Algebraic Types#Vector Vector]] v)''**+\\ 
 +{{anchor:bistellar_simplification:}} **''bistellar_simplification([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Vector Vector]] ''v'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-  * //Returns:// [[common:Algebraic Types#Vector Vector]] < [[common:Basic Types#Integer | Integer]] > +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Scale vector with the least common multiple of the denominators of its coordinates. +  *   Heuristic for simplifying the triangulation of the given manifold\\  without changing its PL-type. The function uses\\  bistellar flips and simulated annealing strategy.\\ You may specify the maximal number of //rounds//, how often the system\\ may //relax// before heating up and how much //heat// should be applied.\\ The function stops computing, once the size of the triangulation has not decreased\\ for //rounds// iterationsIf the //abs// flag is set, the function stops\\ after //rounds// iterations regardless of when the last improvement took place.\\ Additionally, you may set the threshold //min_n_facets// for the number of facets when\\ the simplification ought to stop. Default is d+in the ''[[playground/playground/SimplicialComplex#CLOSED_PSEUDO_MANIFOLD |CLOSED_PSEUDO_MANIFOLD]]'' case\\ and otherwise.\\ If you want to influence the distribution of the dimension of the moves when warming up\\ you may do so by specifying a //distribution//. The number of values in //distribution//\\ determines the dimensions used for heating up. The heating and relaxing parameters decrease dynamically\\ unless the //constant// flag is set. The function prohibits to execute the reversed move of a move\\ directly after the move itself unless the //allow_rev_move// flag is set. Setting the\\ //allow_rev_move// flag might help solve a particular resilient problem.\\ If you are interested in how the process is coming alongtry the //verbose// option.\\ It specifies after how many rounds the current best result is displayed.\\ The //obj// determines the objective function used for the optimization. If //obj/is set to 0,\\ the function searches for the triangulation with the lexicographically smallest f-vector,\\ if //obj// is set to any other value the sum of the f-vector entries is used.\\ The default is 1.
-  * //Example://\\  \\ <code> > $v = new Vector(1/2,1/3,1/4,1/5); +
- > $ve = eliminate_denominators($v); +
- > print $ve; +
- 30 20 15 12 +
-</code>+
  
-{{anchor:eliminate_denominators_entire_affine:}} **''eliminate_denominators_entire_affine([[common:Algebraic Types#Matrix | Matrix]] v)''** +\\ 
-    * //Parameters:// +{{anchor:simplicial_product:}} **''simplicial_product''**
-      * [[common:Algebraic Types#Matrix | Matrix]] ''v'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] < [[common:Basic Types#Integer | Integer]] > +
-  *  Scales entire matrix with the least common multiple of the denominators of its coordinates (ignore first column). +
-  * //Example://\\  \\ <code> > $M = new Matrix([1,1/2,1/3],[1,1/5,7],[1,1/4,4/3]); +
- > $Me = eliminate_denominators_entire_affine($M); +
- > print $Me; +
- 1 30 20 +
- 1 12 420 +
- 1 15 80 +
-</code>+
  
-{{anchor:eliminate_denominators_in_rows:}} **''eliminate_denominators_in_rows([[common:Algebraic Types#Matrix Matrix]] M)''**+\\ 
 +{{anchor:connected_sum:}} **''connected_sum([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2, [[playground/playground#Int |Int]] f1, [[playground/playground#Int |Int]] f2)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''M'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1'' :  
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] [[common:Basic Types#Integer Integer]] > +      ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2''  
-  *  Scale a matrix row-wise with the least common multiple of the denominators of its coordinates+      * ''[[playground/playground#Int |Int]]'' ''f1'' : default: 0 
-  * //Example://\\  \\ <code> > $new Matrix([1/2,1/3],[1/5,7],[1/4,4/3]); +      * ''[[playground/playground#Int |Int]]'' ''f2'' default: 0 
- > $Me = eliminate_denominators_in_rows($M); +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
- print $Me; +  *  Compute the __connected sum__ of two complexes.\\ Parameters //f_1 and //f_2// specify which facet of the first and second complex correspondingly are glued together.\\ Default is the 0-th facet of both.\\ The vertices in the selected facets are identified with each other according to their order in the facet\\ (that is, in icreasing index order). The glueing facet iteself is not included in the connected sum.\\  The option //permutation// allows to get an alternative identification. It should specify a\\ permutation of the vertices of the second facet.\\ The vertices of the new complex get the original labels with ''_1'' or ''_2'' appended, according to the input complex\\  they came from.  If you set the //no_labels// flag, the label generation will be omitted
- 3 2 +  * //Example://\\ Glueing together two tori to make a genus 2 double torus, rotating the second one clockwise: \\ <code> > $cs connected_sum(torus(),torus(),permutation=>[1,2,0]); 
- 35 + > print $cs->SURFACE.','.$cs->GENUS
- 3 16+ 1,2
 </code> </code>
  
-{{anchor:primitive:}} **''primitive''** +\\ 
- +{{anchor:triang_neighborhood:}} **''triang_neighborhood([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Rational |Rational]] width)''**
-{{anchor:primitive_affine:}} **''primitive_affine''** +
- +
-{{anchor:is_integral:}} **''is_integral''** +
- +
----- +
-==== Linear Algebra ==== +
- These functions are for algebraic computations and constructions of special matrices. +
-{{anchor:null_space:}} **''null_space''** +
- +
-{{anchor:unit_vector:}} **''unit_vector<Element>([[common:Basic Types#Int Int]] d, [[common:Basic Types#Int Int]] pos)''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]] +
-  +
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int Int]] ''d''the dimension of the vector +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Basic Types#Int Int]] ''pos''the position of the 1 +      * ''[[playground/playground#Rational |Rational]]'' ''width''default: 0 
-  * //Returns:// [[common:Algebraic Types#SparseVector SparseVector]] < [[common:Linear Algebra#unit | unit]] +  *  Create a triangulated tubular neighborhood of a  [[playground/playground/SimplicialComplex#PURE |pure]] 2-complex.\\  If the complex is a link\\  with the property that each vertex and its two neighbours are in general\\  position after projection to the x,y-plane, then one might specify\\  rational number //width// to tell the client to compute ''[[playground/playground/GeometricSimplicialComplex#COORDINATES |COORDINATES]]''\\  of the triangulated tubular neighborhood. If the //width/// is\\  chosen too large, the computed realization will be self intersecting.\\  If each connected component of the link has an even number of facets,\\  then the following holds:\\  An edge of the resulting complex is contained in an odd number of\\  facets iff it corresponds to one of the edges of the link. 
-   Creates a [[/common/property_types/Algebraic Types/SparseVector]] of given length //d// with a one entry at position //pos// and zeroes elsewhere. +
-  * //Example://\\ The following stores a vector of dimension 5 with a single 1 (as a Int) at position 2: \\ <code> > $v = unit_vector<Int>(5,2); +
- > print $v->type->full_name; +
- SparseVector<Int> +
-</code> +
-  * //Example://\\ The following concatenates a unit vector of dimension 3 with a 1 at position 2 and a\\ unit vector of dimension 2 with a 1 at position 1: \\ <code> > $v = unit_vector(3,2) | unit_vector(2,1); +
- > print $v; +
- (5) (2 1) (4 1) +
-</code>+
  
-{{anchor:null_space_integer:}} **''null_space_integer([[common:Algebraic Types#Matrix | Matrix]] A)''** +\\ 
-    * //Parameters:// +{{anchor:hom_poset:}} **''hom_poset''**
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +
-  * //Returns:// [[common:Algebraic Types#SparseMatrix | SparseMatrix]] +
-  *  Computes the __lattice null space__ of the integer matrix //A//.+
  
-{{anchor:inv:}} **''inv([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:covering_relations:}} **''covering_relations([[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]> P)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' ''P'' :  
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] +  * //Returns:// ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' 
-  *  Computes the __inverse__ //A//<sup>-1</sup> of an invertible matrix //A// using Gauss elimination. +   Construct the covering relations of a poset
-  * //Example://\\ We save the inverse of a small matrix M in the variable $iM: \\ <code> > $M = new Matrix([1,2],[3,4]); +
- $iM = inv($M); +
-</code>\\  To print the result, type this: \\ <code> > print $iM; +
- -2 1 +
- 3/2 -1/2 +
-</code>\\  As we can see, that is in fact the inverse of M. \\ <code> > print $M * $iM; +
- 1 0 +
- 0 1 +
-</code>+
  
-{{anchor:rank:}} **''rank([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:h_induced_quotient:}} **''h_induced_quotient([[playground/playground/SimplicialComplex# |SimplicialComplex]] C, [[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]> vertices)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''C''  
-  * //Returns:// [[common:Basic Types#Int Int]] +      * ''[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>'' ''vertices'' :  
-  *  Computes the __rank__ of matrix.+  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
 +  *  Let //C// be the given simplicial and A the subcomplex induced by\\ the given //vertices//. Then this function produces simplicial complex\\ homotopy equivalent to //C// mod A by adding the cone over A with\\ apex a to //C//.\\ The label of the apex my be specified via the option //apex//.
  
-{{anchor:det:}} **''det([[common:Algebraic Types#Matrix Matrix]] < A)''**+\\ 
 +{{anchor:sum_triangulation:}} **''sum_triangulation([[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]] P, [[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]] Q, [[playground/playground#IncidenceMatrix |IncidenceMatrix]] WebOfStars)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' ''P'' first complex 
-  * //Returns:// SCALAR +      * ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' ''Q''second complex 
-  *  Computes the __determinant__ of matrix using Gaussian elimination.\\ If Scalar is not of field type, but element of Euclidean ring R,\\ type upgrade to element of the quotient field is performed.\\ The result is recast as Scalar, which is possible without roundoff \\ since the so-computed determinant is an element of the (embedded) ring R. +      * ''[[playground/playground#IncidenceMatrix |IncidenceMatrix]]'' ''WebOfStars'' : Every row corresponds to a full dimensional simplex in P and every column to a full dimensional simplex in Q. 
-  * //Example://\\  \\ <code> > print det(unit_matrix(3)); +  * //Returns:// ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' 
- 1 +  *  Produce specific sum-triangulation of two given triangulations.\\ and WebOfStars.  There are P-sum-triangulations and Q-sum-triangulations.\\ If the image of the star of the origin of P is empty then we have a\\ Q-sum-triangulation; otherwise it is a P-sum-triangulation.\\ For details see Assarf, Joswig & Pfeifle:\\ Webs of stars or how to triangulate sums of polytopesto appear
-</code> +
-  * //Example://\\  \\ <code> > $p = new UniPolynomial<Rational,Int>("x2+3x"); +
- > $M = new Matrix<UniPolynomial<Rational,Int>>([[$p, $p+1],[$p+1,$p]]); +
- > print det($M); +
- -2*x^2 -6*x - 1 +
-</code>+
  
-{{anchor:qr_decomp:}} **''qr_decomp([[common:Algebraic Types#Matrix Matrix]] < [[common:Basic Types#Float Float]] > M)''**+\\ 
 +{{anchor:induced_subcomplex:}} **''induced_subcomplex([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]> vertices)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] < [[common:Basic Types#Float Float]] > ''M'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex''  
-  * //Returns:// [[common:Basic Types#Pair Pair]] < [[common:Algebraic Types#Matrix | Matrix]] , [[common:Algebraic Types#Matrix | Matrix]] > +      * ''[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>'' ''vertices'' :  
-  *  QR decomposition of a Matrix //M// with rows > cols +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\  \\ <code> > $M = new Matrix<Float>([23,4],[6,42]); +  *  Produce the subcomplex consisting of all faces which are contained in the given set of //vertices//.
- > $qr = qr_decomp($M); +
- > print $qr->first; +
- 0.9676172724 0.2524218971 +
- 0.2524218971 -0.9676172724 +
-</code>\\  \\ <code> > print $qr->second; +
- 23.76972865 14.47218877 +
- 0 -39.63023785 +
-</code>\\  \\ <code> > print $qr->first * $qr->second ; +
- 23 4 +
- 6 42 +
-</code>+
  
-{{anchor:lin_solve:}} **''lin_solve([[common:Algebraic Types#Matrix | Matrix]] A, [[common:Algebraic Types#Vector Vector]] b)''**+\\ 
 +{{anchor:foldable_prism:}} **''foldable_prism([[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]] complex)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' : must be invertible +      * ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' ''complex'' :  
-      * [[common:Algebraic Types#Vector | Vector]] ''b'' :  +  * //Returns:// ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' 
-  * //Returns:// [[common:Algebraic Types#Vector Vector]] +  *  Produce a __prism__ over a given ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]''.
-  *  Computes the vector x that solves the system //A//x = //b// +
-  * //Example://\\ from the Wikipedia: \\ <code> > $A = new Matrix([3,2,-1],[2,-2,4],[-1,1/2,-1]); +
- > $b = new Vector(1,-2,0); +
- > print lin_solve($A,$b); +
- 1 -2 -2 +
-</code>+
  
-{{anchor:zero_matrix:}} **''zero_matrix<Element>([[common:Basic Types#Int Int]] i, [[common:Basic Types#Int | Int]] j)''** +\\ 
-    * //Template Parameters:// +{{anchor:edge_contraction:}} **''edge_contraction([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]] +
-  +
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int Int]] ''i'' : number of rows +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Basic Types#Int | Int]] ''j''number of columns +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Returns:// [[common:Algebraic Types#SparseMatrix SparseMatrix]] < [[common:Linear Algebra#zero | zero]] +  *  Heuristic for simplifying the triangulation of the given manifold\\ without changing its PL-type. Choosing random order of the vertices,\\ the function tries to contract all incident edges.
-  *  Creates a zero matrix of given dimensions +
-  * //Example://\\ The following stores a 2x3 matrix with 0 as entries (from type Rational) in variable and prints it: \\ <code> > $M = zero_matrix(2,3); +
- > print $M; +
- 0 0 0 +
- 0 0 0 +
-</code> +
-  * //Example://\\ The following stores a 2x3 matrix with 0 as entries from type Int in a variable and prints its type: \\ <code> > $M = zero_matrix<Int>(2,3); +
- > print $M->type->full_name; +
- Matrix<Int, NonSymmetric> +
-</code>+
  
-{{anchor:basis_affine:}} **''basis_affine([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:disjoint_union:}} **''disjoint_union([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1''  
-  * //Returns:// [[common:Basic Types#Pair Pair]] < [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > , [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > > +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2'' :  
-  *  Does the same as [[/common/functions/Linear Algebra/basis]] ignoring the first column of the matrix.+  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
 +  *  Produce the __disjoint union__ of the two given complexes.
  
-{{anchor:smith_normal_form:}} **''smith_normal_form([[common:Algebraic Types#Matrix | Matrix]] M, [[common:Basic Types#Bool | Bool]] inv)''** +\\ 
-    * //Parameters:// +{{anchor:stellar_subdivision:}} **''stellar_subdivision''**
-      * [[common:Algebraic Types#Matrix | Matrix]] ''M'' : must be of integer type +
-      * [[common:Basic Types#Bool | Bool]] ''inv'' : optional, if true, compute the inverse of the companion matrices +
-  * //Returns:// [[common:Linear Algebra#SmithNormalForm | SmithNormalForm]] < [[common:Basic Types#Integer | Integer]] > +
-  *  Compute the __Smith normal form__ of a given matrix //M//.\\ M = LSR in normal case, or S = LMR in inverted case. +
-  * //Example://\\  \\ <code> > $M = new Matrix<Integer>([1,2],[23,24]); +
- > $SNF = smith_normal_form($M); +
-</code>\\  The following line prints the three matrices seperated by newline characters. \\ <code> > print $SNF->left_companion ,"\n", $SNF->form ,"\n", $SNF->right_companion; +
- 1 0 +
- 23 1+
  
- 1 0 +\\ 
- 0 -22 +{{anchor:web_of_stars:}} **''web_of_stars([[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]> poset_hom, [[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>>> star_shaped_balls, [[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>> triang)''**
- +
- 1 2 +
- 0 1 +
-</code> +
- +
-{{anchor:ones_matrix:}} **''ones_matrix<Element>([[common:Basic Types#Int | Int]] m, [[common:Basic Types#Int Int]] n)''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]]+
-  +
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int | Int]] ''m''number of rows +      * ''[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>'' ''poset_hom''the poset homomorphism from stabbing order to star-shaped balls 
-      * [[common:Basic Types#Int | Int]] ''n''number of columns +      * ''[[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>>>'' ''star_shaped_balls''the collection of star-shaped balls of T 
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] < [[common:Linear Algebra#ones ones]] +      ''[[playground/playground#Array |Array]]<[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>>'' ''triang'' : the facets of the underlying triangulation of Q 
-  *  Creates a matrix with all elements equal to 1. +  * //Returns:// ''[[playground/playground#IncidenceMatrix |IncidenceMatrix]]'' 
-  * //Example://\\ The following creates an all-ones matrix with Rational coefficients\\ <code> > $M = ones_matrix<Rational>(2,3); +  *  Produce a web of stars from two given triangulations\\ and a map between them.
- > print $M; +
- 1 1 1 +
- 1 1 1 +
-</code>+
  
-{{anchor:eigenvalues:}} **''eigenvalues([[common:Algebraic Types#Matrix | Matrix]] < [[common:Basic Types#Float Float]] > A)''**+\\ 
 +{{anchor:barycentric_subdivision:}} **''barycentric_subdivision([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] < [[common:Basic Types#Float | Float]] > ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-  * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Basic Types#Float | Float]] > +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Eigenvalues of a matrix +  *  Computes the __barycentric subdivision__ of //complex//. 
- +  * //Example://\\ To subdivide a triangle into six new triangles, do this: \\ <code> > $barycentric_subdivision(simplex(2));
-{{anchor:barycenter:}} **''barycenter([[common:Algebraic Types#Matrix | Matrix]] A)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' +
-  * //Returns:// [[common:Algebraic Types#Vector | Vector]] +
-  *  Calculate the average over the rows of a matrix+
-  * //Example://\\  \\ <code> > $new Matrix([3,0,0],[0,3,0],[0,0,3]); +
- > print barycenter($A); +
- 1 1 1+
 </code> </code>
  
-{{anchor:basis:}} **''basis([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:union:}} **''union([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1'' :  
-  * //Returns:// [[common:Basic Types#Pair Pair]] < [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > , [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > > +      ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2'' :  
-  *  Computes subsets of the rows and columns of //A// that form a basis for the linear space spanned by //A//. +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\ Here we have a nice matrix: \\ <code> > $M = new Matrix([[1,0,0,0],[2,0,0,0],[0,1,0,0],[0,0,1,0]]); +  *  Produce the union of the two given complexesidentifying\\ vertices with equal labels.
-</code>\\  Let's print bases for the row and column space: \\ <code> > ($row,$col) = basis($M); +
- > print $M->minor($row,All); +
- 1 0 0 0 +
- 0 1 0 0 +
- 0 0 1 0 +
-</code>\\  \\ <code> > print $M->minor(All,$col); +
- 1 0 0 +
- 2 0 0 +
- 0 1 0 +
- 0 0 1 +
-</code>+
  
-{{anchor:lineality_space:}} **''lineality_space([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:cone:}} **''cone([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Int |Int]] k)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex''  
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] +      * ''[[playground/playground#Int |Int]]'' ''k''default is 1 
-  *  Compute the __lineality space__ of a matrix //A//. +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\  \\ <code> > $new Matrix([1,1,0,0],[1,0,1,0]); +  *  Produce the //k//-cone over a given simplicial complex
- > print lineality_space($M)+  * //Example://\\ The following creates the cone with two apices over the triangle,\\ with custom apex labels. The resulting complex is the 4-simplex. \\ <code> > $cone(simplex(2),2,apex_labels=>['foo','bar']); 
- 0 1+ > print $c->FACETS
 + {1 2 3 4} 
 +</code>\\  \\ <code> > print $c->VERTEX_LABELS; 
 + 0 1 2 foo bar
 </code> </code>
  
-{{anchor:singular_value_decomposition:}} **''singular_value_decomposition([[common:Algebraic Types#Matrix Matrix]] [[common:Basic Types#Float Float]] > M)''**+\\ 
 +{{anchor:join_complexes:}} **''join_complexes([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex1, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex2)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] [[common:Basic Types#Float Float]] ''M'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex1'' :  
-  * //Returns:// [[common:Linear Algebra#SingularValueDecomposition SingularValueDecomposition]] +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex2'' :  
-  *  SVD decomposition of a Matrix. Computes the SVD of a matrix into a  diagonal Marix (S), orthogonal square Matrix (U), orthogonal square Matrix (V), such that U*S*V^T=M\\ The first element of the output array is S, the second U and the thrid V. +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\  \\ <code> > $M = new Matrix<Float>([1,2],[23,24]); +  *  Creates the join of //complex1// and //complex2//.
- > $SVD = singular_value_decomposition($M); +
-</code>\\  The following prints the three matrices, seperated by newline characters. \\ <code> > print $SVD->left_companion ,"\n", $SVD->sigma ,"\n", $SVD->right_companion; +
- 0.06414638608 0.9979404998 +
- 0.9979404998 -0.06414638608+
  
- 33.31011547 0 +\\ 
- 0 0.6604600341 +{{anchor:alexander_dual:}} **''alexander_dual([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
- +
- 0.6909846321 -0.7228694476 +
- 0.7228694476 0.6909846321 +
-</code> +
- +
-{{anchor:diag:}} **''diag''** +
- +
-{{anchor:reduce:}} **''reduce([[common:Algebraic Types#Matrix | Matrix]] A, [[common:Algebraic Types#Vector Vector]] b)''**+
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Algebraic Types#Vector Vector]] ''b'' :  +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Returns:// [[common:Algebraic Types#Vector Vector]] +  *  Computes the Alexander dual complex, that is, the complements of all non-faces.\\ The vertex labels are preserved unless the //no_labels// flag is specified.
-  *  Reduce a vector with a given matrix using Gauss elimination.+
  
-{{anchor:hadamard_product:}} **''hadamard_product([[common:Algebraic Types#Matrix Matrix]] M1, [[common:Algebraic Types#Matrix Matrix]] M2)''**+\\ 
 +{{anchor:deletion:}} **''deletion([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]> face)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''M1'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Algebraic Types#Matrix Matrix]] ''M2'' :  +      * ''[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>'' ''face''specified by vertex indices.\\  Please use ''[[playground/playground/SimplicialComplex#labeled_vertices |labeled_vertices]]'' if you want to specify the face by vertex labels. 
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Compute the Hadamard product of two matrices with same dimensions.+  *  Remove the given //face// and all the faces containing it.
  
-{{anchor:basis_cols:}} **''basis_cols([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:link_complex:}} **''link_complex([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]> face)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-  //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +      ''[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>'' ''face'' 
-  *  Computes a subset of the columns of //A// that form a basis for the linear space spanned by //A//. +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\ Here we have a nice matrix: \\ <code> > $M = new Matrix([[1,0,0,0],[2,0,0,0],[0,1,0,0],[0,0,1,0]]); +  *   Produce the __link__ of a //face// of the //complex//
-</code>\\  Let's print a basis of its column space: \\ <code> > print $M->minor(All,basis_cols($M)); +
- 1 0 0 +
- 2 0 0 +
- 0 1 0 +
- 0 0 1 +
-</code>+
  
-{{anchor:equal_bases:}} **''equal_bases([[common:Algebraic Types#Matrix Matrix]] M1, [[common:Algebraic Types#Matrix Matrix]] M2)''**+\\ 
 +{{anchor:star:}} **''star([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]> face)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''M1'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-      * [[common:Algebraic Types#Matrix Matrix]] ''M2'' :  +      * ''[[playground/playground#Set |Set]]<[[playground/playground#Int |Int]]>'' ''face'' :  
-  * //Returns:// [[common:Basic Types#Bool Bool]] +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Check whether both matrices are bases of the same linear subspace.\\ Note: It is assumed that they are *bases* of the row space. +  *  Produce the __star__ of the //face// of the //complex//.
-  * //Example://\\  \\ <code> > $M1 = new Matrix([1,1,0],[1,0,1],[0,0,1]); +
- > $M2 = new Matrix([1,0,0],[0,1,0],[0,0,1]); +
- > print equal_bases($M1,$M2); +
- true +
-</code>+
  
-{{anchor:normalized:}} **''normalized([[common:Algebraic Types#Matrix | Matrix]] < [[common:Basic Types#Float Float]] > A)''**+\\ 
 +{{anchor:colored_ball_from_colored_sphere:}} **''colored_ball_from_colored_sphere([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] < [[common:Basic Types#Float | Float]] > ''A'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex'' :  
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] < [[common:Basic Types#Float | Float]] > +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Normalize matrix by dividing each row by its length (l2-norm). +  *  Extends the triangulation and coloring of k-colored\\ (d-1)-sphere to a max{k,d+1}-colored triangulation of a d-ball.\\  The colors are integer numbers.\\  The old vertex labels are preserved unless the //no_labels// flag is specified.\\  The new vertices get labeled ''new_i'' (i=0, 1, 2, ...). If a new label is not unique,\\  ''_j'' is added for the smallest integer j which makes the label unique.
-  //Example://\\  \\ <code> > $A = new Matrix<Float>([1.5,2],[2.5,2.5]); +
- > print normalized($A)+
- 0.6 0.+
- 0.7071067812 0.7071067812 +
-</code>+
  
-{{anchor:cramer:}} **''cramer([[common:Algebraic Types#Matrix Matrix]] A, [[common:Algebraic Types#Vector Vector]] b)''**+\\ 
 +{{anchor:poset_homomorphisms:}} **''poset_homomorphisms([[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]> P, [[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]> Q)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A''must be invertible +      * ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' ''P'' :  
-      * [[common:Algebraic Types#Vector Vector]] ''b'' :  +      * ''[[playground/playground/Graph# |Graph]]<[[playground/playground#Directed |Directed]]>'' ''Q'' :  
-  * //Returns:// [[common:Algebraic Types#Vector Vector]] +  * //Returns:// ''[[playground/playground#Array |Array]]<[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>>'' 
-  *  Computes the solution of the system //A//x = //b// by applying Cramer's rule +   Enumerate all order preserving maps from one poset to another
-  * //Example://\\ from the Wikipedia: \\ <code> > $A = new Matrix([3,2,-1],[2,-2,4],[-1,1/2,-1]); +
- $b = new Vector(1,-2,0); +
- print cramer($A,$b); +
- 1 -2 -2 +
-</code>+
  
-{{anchor:unit_matrix:}} **''unit_matrix<Element>([[common:Basic Types#Int | Int]] d)''** +\\ 
-    * //Template Parameters:// +{{anchor:iterated_barycentric_subdivision:}} **''iterated_barycentric_subdivision([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Int |Int]] k)''**
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]] +
-  +
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int | Int]] ''d''dimension of the matrix +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex''  
-  * //Returns:// [[common:Algebraic Types#SparseMatrix SparseMatrix]] < [[common:Linear Algebra#unit | unit]] +      * ''[[playground/playground#Int |Int]]'' ''k'' :  
-  *  Creates a unit matrix of given dimension +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\ The following stores the 3-dimensional unit matrix (ones on the diagonal and zeros otherwise) in a variable\\ and prints it: \\ <code> > $M = unit_matrix(3); +  *  Computes the //k//-th __barycentric subdivision__ of //complex// by iteratively calling ''[[playground/playground#barycentric |barycentric]]''.
- > print $M; +
- (3) (0 1) +
- (3) (1 1) +
- (3) (2 1) +
-</code> +
-  * //Example://\\ The following stores the 3-dimensional unit matrix (ones on the diagonal and zeros otherwise) from type Int\\ in a variable and prints it: \\ <code> > $M = unit_matrix<Int>(3); +
- > print $M->type->full_name; +
- SparseMatrix<Int, Symmetric> +
-</code>+
  
-{{anchor:trace:}} **''trace([[common:Algebraic Types#Matrix | Matrix]] A)''** +\\ 
-    * //Parameters:// +{{anchor:k_skeleton:}} **''k_skeleton''**
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +
-  * //Returns:// [[common:Basic Types#Int | Int]] +
-  *  Computes the __trace__ of a matrix. +
-  * //Example://\\  \\ <code> > $M = new Matrix([1,2,3],[23,24,25],[0,0,1]); +
- > print trace($M); +
- 26 +
-</code>+
  
-{{anchor:sqr:}} **''sqr([[common:Algebraic Types#Vector Vector]] < v)''**+\\ 
 +{{anchor:suspension:}} **''suspension([[playground/playground/SimplicialComplex# |SimplicialComplex]] complex, [[playground/playground#Int |Int]] k)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Vector Vector]] ''v'' :  +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex''  
-  * //Returns:// SCALAR +      * ''[[playground/playground#Int |Int]]'' ''k''default value is 1 
-  *  Return the sum of the squared entries of a vector //v//.+  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
 +  *  Produce the __//k//-suspension__ over a given simplicial complex.
  
-{{anchor:remove_zero_rows:}} **''remove_zero_rows([[common:Algebraic Types#Matrix Matrix]] m)''**+\\ 
 +{{anchor:bs2quotient:}} **''bs2quotient([[playground/playground/Polytope# |Polytope]] P, [[playground/playground/SimplicialComplex# |SimplicialComplex]] complex)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''m'' :  +      * ''[[playground/playground/Polytope# |Polytope]]'' ''P'' the underlying polytope 
-  * //Returns:// [[common:Algebraic Types#Matrix Matrix]] +      * ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' ''complex''a sufficiently fine subdivision of P, for example the second barycentric subdivision 
-  *  Remove all zero rows from a matrix.+  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
 +  *  Create a simplicial complex from a simplicial subdivision of a given complex\\ by identifying vertices on the boundary of the original complex according to a group that acts on vertices.
  
-{{anchor:pluecker:}} **''pluecker([[common:Algebraic Types#Matrix | Matrix]] V)''**+---- 
 +==== Producing a simplicial complex from other objects ==== 
 + These functions construct a new [[/topaz/objects/SimplicialComplex]] from other objects. 
 +\\ 
 +{{anchor:vietoris_rips_complex:}} **''vietoris_rips_complex([[playground/playground#Matrix |Matrix]] D, [[playground/playground#Rational |Rational]] delta)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix | Matrix]] ''V'' :  +      * ''[[playground/playground#Matrix |Matrix]]'' ''D'' : the "distance matrix" of the point set (can be upper triangular) 
-  * //Returns:// [[common:Algebraic Types#Vector Vector]] +      * ''[[playground/playground#Rational |Rational]]'' ''delta'' :  
-  *  Compute the vector of maximal minors of a matrix.\\ WARNING: interpretation different in [[/tropical/functions/Other/lifted_pluecker]]+  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
 +  *  Computes the __Vietoris Rips complex__ of a point set. The set is passed as its so-called "distance matrix", whose (i,j)-entry is the distance between point i and jThis matrix can e.g. be computed using the distance_matrix function. The points corresponding to vertices of a common simplex will all have a distance less than //delta// from each other.
  
-{{anchor:totally_unimodular:}} **''totally_unimodular([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:independence_complex:}} **''independence_complex([[playground/playground/Matroid# |Matroid]] matroid)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' :  +      * ''[[playground/playground/Matroid# |Matroid]]'' ''matroid'' :  
-  * //Returns:// [[common:Basic Types#Bool Bool]] +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  The matrix //A// is totally unimodular if the determinant of each square submatrix equals 0, 1, or -1.\\ This is the naive test (exponential in the size of the matrix).\\ For a better implementation try Matthias Walter's polymake extension at\\  [[https://github.com/xammy/unimodularity-test/wiki/Polymake-Extension]]. +  *  Produce the __independence complex__ of a given matroid.\\ If //no_labels// is set to 1, the labels are not copied.
-  * //Example://\\  \\ <code> > $M = new Matrix<Int>([-1,-1,0,0,0,1],[1,0,-1,-1,0,0],[0,1,1,0,-1,0],[0,0,0,1,1,-1]); +
- > print totally_unimodular($M); +
- true +
-</code>+
  
-{{anchor:basis_rows_integer:}} **''basis_rows_integer([[common:Algebraic Types#Matrix Matrix]] A)''**+\\ 
 +{{anchor:clique_complex:}} **''clique_complex([[playground/playground/Graph# |Graph]] graph)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +      * ''[[playground/playground/Graph# |Graph]]'' ''graph'' :  
-  * //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Computes a lattice basis of the span of the rows of //A//. +  *  Produce the __clique complex__ of a given graphthat is, the simplicial\\ complex that has an n-dimensional facet for each n+1-clique.\\ If //no_labels// is set to 1, the labels are not copied
- +  * //Example://\\ Create the clique complex of simple graph with one 3-clique and\\  one 2-cliquenot creating labels. \\ <code> > $graph_from_edges([[0,1],[0,2],[1,2],[2,3]]); 
-{{anchor:moore_penrose_inverse:}} **''moore_penrose_inverse([[common:Algebraic Types#Matrix Matrix]] M)''** + > $clique_complex($g,no_labels=>1); 
-    * //Parameters:// + > print $c->FACETS
-      * [[common:Algebraic Types#Matrix | Matrix]] ''M'' :  + {0 1 2} 
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] < [[common:Basic Types#Float | Float]] > + {2 3}
-  *  Moore-Penrose Inverse of a Matrix +
- +
-{{anchor:basis_rows:}} **''basis_rows([[common:Algebraic Types#Matrix | Matrix]] A)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix Matrix]] ''A'' +
-  * //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +
-  *  Computes a subset of the rows of //A// that form basis for the linear space spanned by //A//. +
-  * //Example://\\ Here we have a nice matrix: \\ <code> > $M = new Matrix([[1,0,0,0],[2,0,0,0],[0,1,0,0],[0,0,1,0]]); +
-</code>\\  Let's print a basis of its row space: \\ <code> > print $M->minor(basis_rows($M),All); +
- 1 0 0 0 +
- 0 1 0 0 +
- 0 0 1 0 +
-</code> +
- +
-{{anchor:householder_trafo:}} **''householder_trafo([[common:Algebraic Types#Vector | Vector]] < [[common:Basic Types#Float | Float]] > b)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Vector | Vector]] < [[common:Basic Types#Float | Float]] > ''b'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] < [[common:Basic Types#Float | Float]] > +
-  *  Householder transformation of Vector b. Only the orthogonal matrix reflection H is returned. +
- +
-{{anchor:transpose:}} **''transpose''** +
- +
-{{anchor:ones_vector:}} **''ones_vector<Element>([[common:Basic Types#Int | Int]] d)''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]]. +
-   +
-    * //Parameters:// +
-      * [[common:Basic Types#Int | Int]] ''d'' : vector dimension.  If omitteda vector of dimension 0 is created, which can adjust itself when involved in a block matrix operation. +
-  * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Linear Algebra#ones | ones]] +
-  *  Creates a vector with all elements equal to 1. +
-  * //Example://\\ To create the all-ones Int vector of dimension 3, do this: \\ <code> > $v = ones_vector<Int>(3); +
-</code>\\  You can print the result using the print statement: \\ <code> > print $v; +
- 1 1 1 +
-</code> +
- +
-{{anchor:solve_left:}} **''solve_left([[common:Algebraic Types#Matrix | Matrix]] A, [[common:Algebraic Types#Matrix | Matrix]] B)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''B'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-  *  Computes a matrix X that solves the system //XA// = //B//. This is useful, for instance, for computing the coordinates of some vectors\\ with respect to a basis. The rows of the matrix solve_left(B,V) are the coordinates of the rows of //V// with respect to the rows of //B//. +
-  * //Example://\\ Define the matrices \\ <code> > $V = new Matrix([[-4,2,2],[3,-2,-1]]); +
- > $B = new Matrix([[-1,1,0],[0,-1,1]]); +
-</code>\\  so that the rows of //B// are a basis of the subspace of vectors with zero coordinate sumThen the rows of \\ <code> > print solve_left($B, $V); +
- 4 2 +
- -3 -1 +
-</code>\\  contain the coordinates of the rows of //V// with respect to the rows of //B//. \\  +
- +
-{{anchor:zero_vector:}} **''zero_vector<Element>([[common:Basic Types#Int | Int]] d)''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-    * //Parameters:// +
-      * [[common:Basic Types#Int | Int]] ''d'' : vector dimension.  If omitted, a vector of dimension 0 is created,\\               which can adjust itself when involved in a block matrix operation. +
-  * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Linear Algebra#zero | zero]] +
-  *  Creates a vector with all elements equal to zero. +
-  * //Example://\\ The following stores a vector of dimension 5 with 0 as entries (from type Rational) in a variable and prints it: \\ <code> > $v = zero_vector(5); +
- > print $v; +
- 0 0 0 0 0 +
-</code> +
-  * //Example://\\ The following stores a vector of dimension 5 with 0 as entries from type Int in a variable and prints its type: \\ <code> > $v = zero_vector<Int>(5); +
- > print $v->type->full_name; +
- Vector<Int> +
-</code> +
-  * //Example://\\ The following concatenates a vector of dimension 2 of ones and a vector of length 2 of zeros: \\ <code> > $v = ones_vector(2) | zero_vector(2); +
- > print $v; +
- 1 0 0 +
-</code> +
- +
-{{anchor:hermite_normal_form:}} **''hermite_normal_form([[common:Algebraic Types#Matrix | Matrix]] M)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''M'' : Matrix to be transformed. +
-  * //Returns:// [[common:Linear Algebra#HermiteNormalForm | HermiteNormalForm]] +
-  *  Computes the (column) Hermite normal form of an integer matrix.\\ Pivot entries are positiveentries to the left of a pivot are non-negative and strictly smaller than the pivot+
-  * //Example://\\ The following stores the result for small matrix M in H and then prints both hnf and companion: \\ <code> > $M = new Matrix<Integer>([1,2],[2,3]); +
- > $H = hermite_normal_form($M); +
- > print $H->hnf; +
- 1 0 +
- 0 1 +
-</code>\\  \\ <code> > print $H->companion; +
- -3 2 +
- 2 -+
-</code> +
- +
-{{anchor:anti_diag:}} **''anti_diag''** +
- +
-{{anchor:project_to_orthogonal_complement:}} **''project_to_orthogonal_complement([[common:Algebraic Types#Matrix | Matrix]] points[[common:Algebraic Types#Matrix | Matrix]] orthogonal)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''points'' : will be changed to orthogonal ones +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''orthogonal'' : basis of the subspace +
-  *  Projects points into the [[/common/functions/Linear Algebra/null_space|orthogonal complement]] of a subspace given via an orthogonal basis.\\ The given points will be overwitten. +
- +
-{{anchor:solve_right:}} **''solve_right([[common:Algebraic Types#Matrix | Matrix]] A, [[common:Algebraic Types#Matrix | Matrix]] B)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''A'' :  +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''B'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-  *  Computes a matrix X that solves the system //AX// = //B// +
-  * //Example://\\ A non-degenerate example: \\ <code> > $new Matrix([[1,0,0],[1,1,0],[1,0,1],[1,1,1]]); +
- > $new Matrix([[1,0,0],[1,0,1],[1,1,0],[1,1,1]]); +
- > print solve_right($A,$B); +
- 1 0 0 +
- 0 0 1 +
- 0 1 0 +
-</code> +
-  * //Example://\\ A degenerate example: \\ <code> > $A new Matrix([[1,0,0,0,0],[0,1,0,0,0],[1,0,1,0,0],[0,1,1,0,0]]); +
- $B = new Matrix([[0,1,0,0,0],[1,0,0,0,0],[0,1,1,0,0],[1,0,1,0,0]]); +
- > print solve_right($A,$B)+
- 0 1 0 0 0 +
- 1 0 0 0 0 +
- 0 0 1 0 0 +
- 0 0 0 0 0 +
- 0 0 0 0 0+
 </code> </code>
  
 ---- ----
-==== Set Operations ==== +==== Producing from scratch ==== 
- This category contains functions performing operations on [[/common/property_types/Set Types/Set|Sets]]+ With these clients you can create special examples of simplicial complexes and complexes belonging to parameterized families. 
-{{anchor:scalar2set:}} **''scalar2set(SCALAR s)''** +\\ 
-    * //Parameters:// +{{anchor:torus:}} **''torus''** 
-      * SCALAR ''s'' :  +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Returns:// [[common:Set Types#Set Set]] < +  *  The Császár TorusGeometric realization by Frank Lutz,\\ Electronic Geometry Model No. 2001.02.069
-  *  Returns the singleton set {//s//}. +
-  * //Example://\\  \\ <code> > print scalar2set(23); +
- {23} +
-</code>+
  
-{{anchor:range:}} **''range([[common:Basic Types#Int | Int]] a, [[common:Basic Types#Int | Int]] b)''**+\\ 
 +{{anchor:simplex:}} **''simplex([[playground/playground#Int |Int]] d)''**
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int | Int]] ''a'' : minimal element of the set +      * ''[[playground/playground#Int |Int]]'' ''d''dimension 
-      * [[common:Basic Types#Int | Int]] ''b''maximal element of the set +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Returns:// [[common:Set Types#Set Set]] < [[common:Basic Types#Int | Int]] > +  *  A __simplex__ of dimension //d//.
-  *  Create the [[/common/property_types/Set Types/Set]] {//a//, //a//+1, ..., //b//-1, //b//} for //a// &le; //b//. See also: sequence +
-  * //Example://\\  \\ <code> > print range(23,27); +
- {23 24 25 26 27} +
-</code>+
  
-{{anchor:range_from:}} **''range_from([[common:Basic Types#Int | Int]] a)''** +\\ 
-    * //Parameters:// +{{anchor:complex_projective_plane:}} **''complex_projective_plane''** 
-      * [[common:Basic Types#Int Int]] ''a'' : start index +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Returns:// [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > +  *  The complex projective plane with the vertex-minimal triangulation by Kühnel and Brehm
-  *  Create an index range starting at //a//, the last index is implied by the context.\\ To be used with minor, slice, and similar methods selecting a subset of elements+  * //Example://\\ Construct the complex projective plane, store it in the variable $p2c, and print its homology group. \\ <code> > $p2c complex_projective_plane(); 
-  * //Example://\\  \\ <code> > $v=new Vector<Int>(10,20,30,40); + > print $p2c->HOMOLOGY; 
- > print $v->slice(range_from(2)); + ({} 0) 
- 30 40+ ({} 0) 
 + ({} 1
 + ({} 0) 
 + ({} 1)
 </code> </code>
  
-{{anchor:sequence:}} **''sequence([[common:Basic Types#Int | Int]] a, [[common:Basic Types#Int | Int]] c)''**+\\ 
 +{{anchor:ball:}} **''ball([[playground/playground#Int |Int]] d)''**
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int | Int]] ''a'' : the smallest element +      * ''[[playground/playground#Int |Int]]'' ''d''dimension 
-      * [[common:Basic Types#Int | Int]] ''c''the cardinality +  * //Returns:// ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' 
-  * //Returns:// [[common:Set Types#Set Set]] < [[common:Basic Types#Int | Int]] > +  *  //d//-dimensional __ball__realized as the //d//-simplex
-  *  Create the [[/common/property_types/Set Types/Set]] {//a//, //a//+1, ..., //a//+//c//-1}See also: range +  * //Example://\\ The following produces the 3-ball and stores it in the variable $b: \\ <code>$b = ball(3)
-  * //Example://\\  \\ <code>print sequence(23,6); +</code>\\  You can print the facets of the resulting simplicial complex like so: \\ <code> > print $b->FACETS
- {23 24 25 26 27 28}+ {0 1 2 3}
 </code> </code>
  
-{{anchor:select_subset:}} **''select_subset([[common:Set Types#Set Set]] s, [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > indices)''**+\\ 
 +{{anchor:cube_complex:}} **''cube_complex([[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]> x)''**
     * //Parameters://     * //Parameters://
-      * [[common:Set Types#Set | Set]] ''s'' :  +      * ''[[playground/playground#Array |Array]]<[[playground/playground#Int |Int]]>'' ''x''specifies the shape of the pile:\\ d=x.size is the dimension of the cubes to be stacked, and the stack will be\\ x_1 by x_2 by ... by x_d cubes. 
-      * [[common:Set Types#Set Set]] < [[common:Basic Types#Int | Int]] > ''indices'' :  +  * //Returns:// ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]<[[playground/playground#Rational |Rational]]>'' 
-  * //Returns:// [[common:Set Types#Set Set]] +  *  Produces a triangulated pile of hypercubes, arranged in a d-dimensional array.\\ Each cube is split into d! tetrahedra, and the tetrahedra are all grouped around\\ one of the diagonal axes of the cube
-  *  Returns the subset of //s// given by the //indices//+  * //Example://\\ Arrange four triangulated 3-cubes to form a big 2 by 2 cube: \\ <code> > $cc cube_complex([2,2,2]); 
-  * //Example://\\  \\ <code> > $new Set<Int>(23,42,666,789); + > print $cc->description
- > $ind = new Set<Int>(0,2); + 2x2x2 Pile of 3-dimensional triangulated cubes.
- > $su = select_subset($s,$ind); +
- print $su+
- {23 666}+
 </code> </code>
  
-{{anchor:incl:}} **''incl([[common:Set Types#Set | Set]] s1, [[common:Set Types#Set Set]] s2)''**+\\ 
 +{{anchor:surface:}} **''surface([[playground/playground#Int |Int]] g)''**
     * //Parameters://     * //Parameters://
-      * [[common:Set Types#Set Set]] ''s1'' :  +      * ''[[playground/playground#Int |Int]]'' ''g''genus 
-      * [[common:Set Types#Set | Set]] ''s2'' :  +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Returns:// [[common:Basic Types#Int Int]] +  *  Produce a __surface of genus //g//__For //g// >= 0\\ the client produces an orientable surfaceotherwise\\ it produces a non-orientable one.
-  *  Analyze the inclusion relation of two sets. +
-  * //Example://\\  \\ <code> $s1 new Set(1,2,3); +
- > $s2 = $s1 - 1; +
- > print incl($s1, $s2); +
- 1 +
-</code>\\  \\ <code> > print incl($s2$s1); +
- -1 +
-</code>\\  \\ <code> > print incl($s1, $s1); +
- 0 +
-</code>\\  \\ <code> > print incl($s2, $s1-$s2); +
- 2 +
-</code>+
  
----- +\\ 
-==== Utilities ==== +{{anchor:rand_knot:}} **''rand_knot([[playground/playground#Int |Int]] n_edges)''**
- Miscellaneous functions. +
-{{anchor:fibonacci:}} **''fibonacci([[common:Basic Types#Int | Int]] m)''**+
     * //Parameters://     * //Parameters://
-      * [[common:Basic Types#Int | Int]] ''m'' :  +      * ''[[playground/playground#Int |Int]]'' ''n_edges'' :  
-  * //Returns:// ARRAY +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Returns the first //m// Fibonacci numbers.+  *  Produce a random knot (or link) as a polygonal closed curve in 3-space.\\ The knot (or each connected component of the link) has //n_edges// edges.\\ The vertices are uniformly distributed in [-1,1]<sup>3</sup>, unless the //on_sphere// option is set.\\ In the latter case the vertices are uniformly distributed on the 3-sphere. Alternatively\\ the //brownian// option produces a knot by connecting the ends of a simulated brownian motion.
  
-{{anchor:average:}} **''average(ARRAY array)''** +\\ 
-    * //Parameters:// +{{anchor:klein_bottle:}} **''klein_bottle''** 
-      * ARRAY ''array''  +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Returns the average value of the array elements. +  *  The Klein bottle.
-  * //Example://\\  \\ <code> > print average([1,2,3]); +
- 2 +
-</code>+
  
-{{anchor:histogram:}} **''histogram(ARRAY data)''**+\\ 
 +{{anchor:multi_associahedron_sphere:}} **''multi_associahedron_sphere([[playground/playground#Int |Int]] n, [[playground/playground#Int |Int]] k)''**
     * //Parameters://     * //Parameters://
-      * ARRAY ''data'' :  +      * ''[[playground/playground#Int |Int]]'' ''n''the number of vertices of the polygon 
-  * //Returns:// [[common:Set Types#Map Map]] < +      * ''[[playground/playground#Int |Int]]'' ''k'' : the number of diagonals that are allowed to mutually cross 
-  *  Produce a histogram of an array: each different element value is mapped on the number of its occurences. +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  * //Example://\\  \\ <code> > $H = histogram([1,1,2,2,2,3,3,2,3,3,1,1,1,3,2,3]); +  *  Produce the simplicial sphere //&Delta;(n,k)// of (//k//+1)-crossing free multitriangulations\\ of an //n//-gon //P//, along with the group action on the diagonals induced from //D//_{2//n//}.\\ //&Delta;(n,k)// is the simplicial complex on the set of relevant diagonals of //P// whose faces are those sets\\ of diagonals such that no //k//+1 of them mutually crossA diagonal is //relevant// if it leaves\\ //k// or more vertices of //P// on both sides. (Any diagonal having less than //k// vertices on one\\ side trivially cannot participate in a (//k//+1)-crossingso is //irrelevant//. The corresponding\\ complex on //all// diagonals is therefore the simplicial join of this one with the simplex of irrelevant\\ diagonals.)\\ Jakob Jonsson"Generalized triangulations and diagonal-free subsets of stack polyominoes",\\ J. Combin. Theory Ser. A112(1):117–1422005\\ //Delta(n,k)// is known to be a //k//-neighborly vertex-decomposable sphere of dimension //k//&nu;-1,\\ where the parameter &nu;=//n//-2//k//-measures the complexity of this construction.\\ For &nu;=0the complex is a point; for &nu;=a //k//-simplex; for &nu;=2 the boundary of a cyclic polytope.\\ Setting //k//=yields the boundary of the simplicial associahedron.\\ The list of (//k//+1)-crossings in the //n//-gon is included as the attachment K_PLUS_1_CROSSINGS. It can\\ also be obtained as the property MINIMAL_NON_FACESbut this requires the HASSE_DIAGRAM to be computed. 
- > print $H; +  * //Example://\\ The f-vector of &Delta;(9,3) is that of a neighborly polytope, since &nu;=2: \\ <code> > print multi_associahedron_sphere(9,3)->F_VECTOR; 
- {(1 5) (2 5) (3 6)}+ 9 36 84 117 90 30
 </code> </code>
- +  * //Example://\\ The option no_facets=>1 still leaves useful information: \\ <code> > $multi_associahedron_sphere(8,2, no_facets=>1); 
-{{anchor:index_of:}} **''index_of([[common:Basic Types#Array | Array]] < [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > > array)''** + > print $s->VERTEX_LABELS
-    * //Parameters:// + (0 3) (1 4) (2 5) (3 6) (4 7) (0 5) (1 6) (2 7) (0 4) (1 5) (2 6) (3 7
-      * [[common:Basic Types#Array | Array]] < [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > > ''array'' :  +</code>\\  \\ <code> > print $s->GROUP->PERMUTATION_ACTION->GENERATORS
-  * //Returns:// [[common:Set Types#HashMap | HashMap]] < [[common:Basic Types#Array | Array]] < [[common:Set Types#Set | Set]] < [[common:Basic Types#Int | Int]] > > , [[common:Basic Types#Int | Int]] > + 7 0 1 2 3 4 5 6 11 8 9 10 
-  *  Return a map indexing an array of sets + 4 3 1 0 7 6 5 11 10 9 8 
-  * //Example://\\  \\ <code> > $s1 new Set(1,2,3); +</code>\\  \\ <code> > print $s->get_attachment("K_PLUS_1_CROSSINGS")->size()
- > $s2 = $s1 1+ 28
- > $a = new Array<Set>($s1,$s2,$s1); +
- > print index_of($a)+
- {({1 2 32) ({2 3} 1)}+
 </code> </code>
  
-{{anchor:minimum:}} **''minimum(ARRAY array)''** +\\ 
-    * //Parameters:// +{{anchor:real_projective_plane:}} **''real_projective_plane''** 
-      * ARRAY ''array''  +  * //Returns:// ''[[playground/playground/SimplicialComplex# |SimplicialComplex]]'' 
-  *  Returns the minimal element of an array. +  *  The real projective plane with its unique minimal triangulation on six vertices.
-  * //Example://\\  \\ <code> > print minimum([23,42,666]); +
- 23 +
-</code>+
  
-{{anchor:is_unimodal:}} **''is_unimodal(ARRAY data)''**+\\ 
 +{{anchor:unknot:}} **''unknot([[playground/playground#Int |Int]] m, [[playground/playground#Int |Int]] n)''**
     * //Parameters://     * //Parameters://
-      * ARRAY ''data'' :  +      * ''[[playground/playground#Int |Int]]'' ''m'' :  
-  * //Returns:// [[common:Basic Types#Bool Bool]] +      * ''[[playground/playground#Int |Int]]'' ''n'' :  
-  *  Checks if given sequence is unimodal +  * //Returns:// ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' 
-  * //Example://\\  \\ <code> print is_unimodal([1,1,2,3,3,2,2,1]); +  *  Produces triangulated 3-sphere with the particularly NASTY embedding\\ of the unknot in its 1-skeleton. The parameters //m// >and //n// >= 1\\ determine how entangled the unknot is. //eps// determines the ''[[playground/playground/GeometricSimplicialComplex#COORDINATES |COORDINATES]]''.
-                      +
-</code>\\  \\ <code> > print is_unimodal([3,3,2,-1]); +
- 1 +
-</code>\\  \\ <code> > print is_unimodal([1,3,2,3]); +
- 0 +
-</code>+
  
-{{anchor:median:}} **''median(ARRAY array)''**+\\ 
 +{{anchor:sphere:}} **''sphere([[playground/playground#Int |Int]] d)''**
     * //Parameters://     * //Parameters://
-      * ARRAY ''array'' :  +      * ''[[playground/playground#Int |Int]]'' ''d''dimension 
-  *  Returns the median value of the array elements. +  * //Returns:// ''[[playground/playground/GeometricSimplicialComplex# |GeometricSimplicialComplex]]'' 
-  * //Example://\\  \\ <code> > print median([1,2,3,9])+  *  The //d//-dimensional __sphere__, realized as the boundary of the (//d//+1)-simplex.
- 2.+
-</code>+
  
-{{anchor:bounding_box:}} **''bounding_box([[common:Algebraic Types#Matrix Matrix]] m)''**+---- 
 +==== Producing other objects ==== 
 + Functions producing big objects which are not contained in application topaz. 
 +\\ 
 +{{anchor:secondary_polyhedron:}} **''secondary_polyhedron([[playground/playground/HyperbolicSurface# |HyperbolicSurface]] s, [[playground/playground#Int |Int]] depth)''**
     * //Parameters://     * //Parameters://
-      * [[common:Algebraic Types#Matrix | Matrix]] ''m'' :  +      * ''[[playground/playground/HyperbolicSurface# |HyperbolicSurface]]'' ''s'' :  
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +      * ''[[playground/playground#Int |Int]]'' ''depth'' :  
-  *  Compute a column-wise bounding box for the given Matrix //m//. +  * //Returns:// ''[[playground/playground/Polytope# |Polytope]]<[[playground/playground#Float |Float]]>'' 
- +   Computes the secondary polyhedron of a hyperbolic surface up to a given depth\\ of the spanning tree of the covering triangluation of the hypoerbolic plane.
-{{anchor:rand_perm:}} **''rand_perm([[common:Basic Types#Int Int]] n)''** +
-    * //Parameters:// +
-      * [[common:Basic Types#Int | Int]] ''n'' +
-  * //Returns:// [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > +
-  *  gives a random permutation +
- +
-{{anchor:maximum:}} **''maximum(ARRAY array)''** +
-    * //Parameters:// +
-      * ARRAY ''array'' :  +
-  *  Returns the maximal element of an array. +
-  * //Example://\\  \\ <code> > print maximum([1,2,3,4,5,6,7,23]); +
- 23 +
-</code> +
- +
-{{anchor:distance_matrix:}} **''distance_matrix([[common:Algebraic Types#Matrix | Matrix]] S, CODE d)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix Matrix]] ''S'' :  +
-      * CODE ''d'' :  +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-  *  Given a metric, return a triangle matrix whose (i,j)-entry contains the distance between point i and j of the point set //S// for i<j. All entrys below the diagonal are zero. The metric is passed as a perl subroutine mapping two input vectors to a real value. +
-  * //Example://\\  The following defines the perl subroutine dist as the euclidean metric and then saves the distance matrix of the 3-cubes vertices in the variable $M: \\ <code> > sub dist($$) { +
- >    my $v = $_[0] - $_[1]; +
- >    return sqrt(new Float($v*$v));+
- > $M = distance_matrix(polytope::cube(3)->VERTICES, \&dist); +
-</code> +
- +
-{{anchor:is_nonnegative:}} **''is_nonnegative(ARRAY data)''** +
-    * //Parameters:// +
-      * ARRAY ''data'' :  +
-  * //Returns:// [[common:Basic Types#Bool | Bool]] +
-  *  Checks if a given sequence is nonnegative +
-  * //Example://\\  \\ <code> > print is_nonnegative([1,0,3]); +
- 1 +
-</code> +
- +
-{{anchor:perturb_matrix:}} **''perturb_matrix([[common:Algebraic Types#Matrix Matrix]] M, [[common:Basic Types#Float | Float]] eps, [[common:Basic Types#Bool | Bool]] not_hom)''** +
-    * //Parameters:// +
-      * [[common:Algebraic Types#Matrix | Matrix]] ''M'' :  +
-      * [[common:Basic Types#Float | Float]] ''eps'' : the factor by which the random matrix is multiplied\\   default value: 1 +
-      [[common:Basic Types#Bool | Bool]] ''not_hom'' : if set to 1, the first column will also be perturbed;\\   otherwise the first columns of the input matrix //M// and the perturbed one\\   coincide (useful for working with homogenized coordinates);\\   default value: 0 (homogen. coords) +
-  * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-  *  Perturb a given matrix //M// by adding a random matrix.\\ The random matrix consists of vectors that are uniformly distributed\\ on the unit sphere. Optionally, the random matrix can be scaled by\\ a factor //eps//.+
  
 ---- ----
-==== Visualization ==== +==== Topology ==== 
- These functions are for visualization+ The following functions compute topological invariants. 
-{{anchor:threejs:}} **''threejs([[common:Visualization#Visual::Object | Visual::Object]] vis_obj)''** +\\ 
-    * //Parameters:// +{{anchor:test:}} **''test''** 
-      * [[common:Visualization#Visual::Object Visual::Object]] ''vis_obj'' : object to display +  * //Returns:// ''[[playground/playground#Int |Int]]'' 
-  *  Produce an html file with given visual objects.+  *  Calculate the betti numbers of a general chain complex over a field.
  
-{{anchor:postscript:}} **''postscript([[common:Visualization#Visual::Object | Visual::Object]] vis_obj ...)''** +\\ 
-    * //Parameters:// +{{anchor:homology_and_cycles:}} **''homology_and_cycles''**
-      * [[common:Visualization#Visual::Object | Visual::Object]] ''vis_obj ...'' : objects to draw +
-  *  Create a Postscript (tm) drawing with the given visual objects.+
  
-{{anchor:povray:}} **''povray([[common:Visualization#Visual::Object | Visual::Object]] vis_obj ...)''** +\\ 
-    * //Parameters:// +{{anchor:betti_numbers:}} **''betti_numbers''**
-      * [[common:Visualization#Visual::Object | Visual::Object]] ''vis_obj ...'' : objects to display +
-  *  Run [[wiki:external_software#povray|POVRAY]] to display given visual objects.+
  
-{{anchor:static:}} **''static([[common:Visualization#Visual::Object | Visual::Object]] vis_obj)''** +\\ 
-    * //Parameters:// +{{anchor:homology:}} **''homology''**
-      * [[common:Visualization#Visual::Object | Visual::Object]] ''vis_obj'' : drawing, e.g. created by ''VISUAL_GRAPH'' or ''SCHLEGEL''+
-  * //Returns:// [[common:Visualization#Visual::Object | Visual::Object]] +
-  *  Suppress creation of dynamic (interactive) scenes.+
  
-{{anchor:jreality:}} **''jreality([[common:Visualization#Visual::Object Visual::Object]] vis_obj ...)''**+\\ 
 +{{anchor:cap_product:}} **''cap_product([[playground/playground#CycleGroup |CycleGroup]]<[[playground/playground#cap |cap]] cocycles, [[playground/playground#CycleGroup |CycleGroup]]<[[playground/playground#cap |cap]] cycles)''**
     * //Parameters://     * //Parameters://
-      * [[common:Visualization#Visual::Object Visual::Object]] ''vis_obj ...'' : objects to display +      * ''[[playground/playground#CycleGroup |CycleGroup]]<[[playground/playground#cap |cap]]'' ''cocycles'' 
-  *  Run [[wiki:external_software#jreality|jReality]] to display given visual objects. +      * ''[[playground/playground#CycleGroup |CycleGroup]]<[[playground/playground#cap |cap]]'' ''cycles'' :  
- +  * //Returns:// ''[[playground/playground#Pair |Pair]]<[[playground/playground#CycleGroup |CycleGroup]]<[[playground/playground#cap |cap]]'' 
-{{anchor:compose:}} **''compose''** +  *  Compute all cap products of cohomology and homology cycles in two given groups
- +  * //Example://\\ The following stores all cap products of the cocycles and cycles\\  of the homology group of the oriented surface of genus 1 in the variable $cp. \\ <code> > $s = surface(1); 
-{{anchor:sketch:}} **''sketch([[common:Visualization#Visual::Object Visual::Object]] vis_obj ...)''** + > $cp = cap_product($s->COCYCLES->[1],$s->CYCLES->[1]); 
-    * //Parameters:// +</code>
-      * [[common:Visualization#Visual::Object Visual::Object]] ''vis_obj ...''objects to display +
-  *  Produce a Sketch input file with given visual objects. +
- +
-{{anchor:x3d:}} **''x3d([[common:Visualization#Visual::Object Visual::Object]] vis_obj ...)''** +
-    * //Parameters:// +
-      * [[common:Visualization#Visual::Object Visual::Object]] ''vis_obj ...'' : objects to draw +
-  *  Create an X3D drawing with the given visual objects+
- +
-{{anchor:tikz:}} **''tikz([[common:Visualization#Visual::Object | Visual::Object]] vis_obj)''** +
-    * //Parameters:// +
-      [[common:Visualization#Visual::Object | Visual::Object]] ''vis_obj'' : object to display +
-   Produce a TikZ file with given visual objects.+
 ===== Small Object Types ===== ===== Small Object Types =====
  
 ---- ----
-==== Algebraic Types ==== +==== Topology ==== 
- This category contains all "algebraic" types, such as matrices, vectors, polynomials, rings, ..+ The following property_types are topological invariants. 
-{{anchor:RationalFunction:}} **''RationalFunction<Coefficient, Exponent>''**+\\ 
 +{{anchor:filtration:}} **''Filtration<MatrixType>''**
     * //Template Parameters://     * //Template Parameters://
-      * ''Coefficient''default: [[/common/property_types/Basic Types/Rational]] +      * ''MatrixType'' 
-   +  *  A filtration of chain complexes. 
-      * ''Exponent'' : default: [[/common/property_types/Basic Types/Int]] +  * //Methods of Filtration:// 
-   +      * **''dim''** 
-  *  the same with type deduction +        * //Returns:// ''[[playground/playground#Int |Int]]'' 
- +        *  Returns the dimension of the maximal cells in the last frame of the filtration. 
-{{anchor:Matrix:}} **''Matrix<Element, Sym>''** +      **''n_cells''** 
-    * //Template Parameters:// +        * //Returns:// ''[[playground/playground#Int |Int]]'' 
-      * ''Element'' : default: [[/common/property_types/Basic Types/Rational]] +         Returns the number of cells in the last frame of the filtration. 
-   +      * **''cells''** 
-      * ''Sym''default: [[/common/property_types/Artificial/NonSymmetric]] +        * //Returns:// ''[[playground/playground#Array |Array]]<[[playground/playground#Cell |Cell]]>'' 
-   +        *  Returns the cells of the filtration, given as array of 3-tuples containing degree, dimension and\\ boundary matrix row number of the cell. 
-   +      * **''boundary_matrix([[playground/playground#Int |Int]] d, [[playground/playground#Int |Int]] t)''**
-  * //Methods of Matrix:// +
-      * **''diagonal([[common:Basic Types#Int | Int]] i)''**+
         * //Parameters://         * //Parameters://
-          * [[common:Basic Types#Int | Int]] ''i'' : //i//=0: the main diagonal (optional)\\ //i//>0: the //i//-th diagonal __below__ the main diagonal\\ //i//<0: the //i//-th diagonal __above__ the main diagonal +          * ''[[playground/playground#Int |Int]]'' ''d'' :  
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Matrix | Matrix]] +          * ''[[playground/playground#Int |Int]]'' ''t'' :  
-        *  Returns the __diagonal__ of the matrix. +        *  Returns the d-boundary matrix of the t-th frame of the filtration
-      * **''row([[common:Basic Types#Int | Int]] i)''** +      * **''n_frames''** 
-        * //Parameters:// +        * //Returns:// ''[[playground/playground#Int |Int]]'' 
-          * [[common:Basic Types#Int | Int]] ''i'' :  +        *  Returns the number of frames in of the filtration.
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Matrix | Matrix]] +
-        *  Returns the //i//-th row. +
-      * **''resize([[common:Basic Types#Int | Int]] r, [[common:Basic Types#Int | Int]] c)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''r'' : new number of rows +
-          * [[common:Basic Types#Int | Int]] ''c'' : new number of columns +
-        *  Change the dimensions; when growing, set added elements to 0. +
-      * **''rows''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of rows. +
-      * **''clear([[common:Basic Types#Int | Int]] r, [[common:Basic Types#Int | Int]] c)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''r'' : new number of rows +
-          * [[common:Basic Types#Int | Int]] ''c'' : new number of columns +
-        *  Change the dimensions setting all elements to 0. +
-      * **''anti_diagonal([[common:Basic Types#Int | Int]] i)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''i'' : //i//=0: the main anti_diagonal (optional)\\ //i//>0: the //i//-th anti_diagonal __below__ the main anti_diagonal\\ //i//<0: the //i//-th anti_diagonal __above__ the main anti_diagonal +
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Matrix | Matrix]] +
-        *  Returns the __anti-diagonal__ of the matrix+
-      * **''minor([[common:Set Types#Set | Set]] r, [[common:Set Types#Set | Set]] c)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''r'' : the rows +
-          * [[common:Set Types#Set | Set]] ''c'' : the columns +
-        * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-        *  Returns a __minor__ of the matrix containing the rows in //r// and the columns in //c//. You can pass [[/common/property_types/Algebraic Types/all_rows_or_cols|All]] if you want all rows or columns and ~ for the complement of a set. E.g.\\ $A->minor(All, ~[0]);\\ will give you the minor of a matrix containing all rows and all but the 0-th column. +
-      * **''col([[common:Basic Types#Int | Int]] i)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''i'' :  +
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Matrix | Matrix]] +
-        *  Returns the //i//-th column. +
-      * **''cols''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of columns. +
-      * **''elem([[common:Basic Types#Int | Int]] r, [[common:Basic Types#Int | Int]] c)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''r'' : the row index +
-          * [[common:Basic Types#Int | Int]] ''c'' : the column index +
-        * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-        *  Returns an element of the matrix.\\ The return value is an `lvalue', that is, it can be modified if the matrix object is mutable. +
-      * **''div_exact([[common:Basic Types#Int | Int]] a)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''a'' :  +
-        * //Returns:// [[common:Algebraic Types#Matrix | Matrix]] +
-        *  Divides every entry by //a// (assuming that every entry is divisible by //a//).+
  
-{{anchor:SparseMatrix:}} **''SparseMatrix<Element, Sym>''**+\\ 
 +{{anchor:chaincomplex:}} **''ChainComplex<MatrixType>''**
     * //Template Parameters://     * //Template Parameters://
-      * ''Element'' +      * ''MatrixType''The type of the differential matrices. default: SparseMatrix<Integer> 
-      * ''Sym'' : one of [[/common/property_types/Artificial/Symmetric]] or [[/common/property_types/Artificial/NonSymmetric]], default: [[/common/property_types/Artificial/NonSymmetric]] +  *  A finite chain complex, represented as its boundary matrices.\\ Check out the tutorial on the polymake homepage for examples on constructing ChainComplexes and computing their homology. 
-   +  * //Example://\\ You can create a new ChainComplex by passing the Array of differential matrices (as maps via _left_ multiplication): \\ <code>$cc = new ChainComplex(new Array<SparseMatrix<Integer>>([[[2,0]]])); 
-  *  A SparseMatrix is a two-dimensional associative array with row and column indices as keys; elements equal to the default value (ElementType(), which is 0 for most numerical types) are not stored, but implicitly encoded by the gaps in the key set. Each row and column is organized as an AVL-tree.\\ Use [[/common/functions/Data Conversion/dense]] to convert this into its dense form.\\ You can create a new SparseMatrix by entering its entries row by row, as a list of [[/common/property_types/Algebraic Types/SparseVector|SparseVectors]] e.g.:\\ $= new SparseMatrix<Int>(<< '.');\\ (5) (1 1)\\ (5) (4 2)\\ (5)\\ (5) (0 3) (1 -1)\\ . +</code>\\  Note that this creates a ChainComplex consisting three differential matrices -- the trivial zeroth and last ones\\ are omitted in the constructor.\\ You can look at the boundary matrices: \\ <code> > print $cc->boundary_matrix(1); 
-  //Methods of SparseMatrix:// + 2 0 
-      * **''squeeze_rows''** +</code>\\  The functions ''homology'', ''homology_and_cycles'' and ''betti_numbers'' can be used to analyse your complex. \\ <code> print homology($cc,0); 
-        *  Removes empty rows.\\ The remaining rows are renumbered without gaps. + ({(2 1)} 1) 
-      * **''squeeze_cols''** + ({} 0
-        *  Removes empty columns.\\ The remaining columns are renumbered without gaps. +</code> 
-      * **''squeeze''** +  * //Methods of ChainComplex:// 
-        *  Removes empty rows and columns.\\ The remaining rows and columns are renumbered without gaps. +      * **''boundary_matrix([[playground/playground#Int |Int]] d)''**
-      * **''resize([[common:Basic Types#Int | Int]] r[[common:Basic Types#Int | Int]] c)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''r'' : new number of rows +
-          * [[common:Basic Types#Int | Int]] ''c'' : new number of columns +
-        *  Resize the matrix\\ All elements in added rows and/or columns are implicit zeros. +
- +
-{{anchor:Vector:}} **''Vector<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' :  +
-  *  A type for vectors with entries of type //Element//.\\ You can perform algebraic operations such as addition or scalar multiplication.\\ You can create a new Vector by entering its elements, e.g.:\\ $v = new Vector<Int>(1,2,3);\\ or\\ $v = new Vector<Int>([1,2,3]); +
-  * //Methods of Vector:// +
-      * **''slice([[common:Set Types#Set | Set]] s)''** +
-        * //Parameters:/+
-          * [[common:Set Types#Set | Set]] ''s'' : indices to select from the vector +
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] +
-        *  Returns a [[/common/property_types/Algebraic Types/Vector]] containing all entries whose index is in a [[/common/property_types/Set Types/Set]] //s//. +
-      * **''div_exact([[common:Basic Types#Int | Int]] a)''**+
         * //Parameters://         * //Parameters://
-          * [[common:Basic Types#Int | Int]] ''a'' :  +          * ''[[playground/playground#Int |Int]]'' ''d'' :  
-        * //Returns:// [[common:Algebraic Types#Vector Vector]] +        * //Returns:// ''[[playground/playground#ChainComplex |ChainComplex]]'' 
-        *  Divides every entry by //a// (assuming that every entry is divisible by //a//).+        *  Returns the d-boundary matrix of the chain complex.
       * **''dim''**       * **''dim''**
-        * //Returns:// [[common:Basic Types#Int | Int]] +        * //Returns:// ''[[playground/playground#Int |Int]]'' 
-        *  The length of the vector+        *  Returns the number of non-empty modules in the complex.
  
-{{anchor:SparseVector:}} **''SparseVector<Element>''** +\\ 
-    * //Template Parameters:// +{{anchor:cell:}} **''Cell''**
-      * ''Element'' :  +
-  *  A SparseVector is an associative container with element indices (coordinates) as keys; elements equal to the default value (ElementType(), which is 0 for most numerical types) are not stored, but implicitly encoded by the gaps in the key set. It is based on an AVL tree.\\ The printable representation of a SparseVector looks like a sequence (l) (p<sub>1</sub> v<sub>1</sub>) ... (p<sub>k</sub> v<sub>k</sub>),\\ where l is the dimension of the vector and each pair (p<sub>i</sub> v<sub>i</sub>) denotes an entry with value\\ v<sub>i</sub> at position p<sub>i</sub>. All other entries are zero.\\ Use [[/common/functions/Data Conversion/dense]] to convert this into its dense form.\\ You can create a new SparseVector by entering its printable encoding as described above, e.g.:\\ $v = new SparseVector<Int>(<< '.');\\ (6) (1 1) (2 2)\\ +
-  * //Methods of SparseVector:// +
-      * **''size''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The number of non-zero entries. +
- +
-{{anchor:Polynomial:}} **''Polynomial<Coefficient, Exponent>''** +
-    * //Template Parameters:// +
-      * ''Coefficient'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-      * ''Exponent'' : default: [[/common/property_types/Basic Types/Int]] +
-  +
   *    * 
-  * //Methods of Polynomial:// 
-      * **''mapvars([[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > indices, [[common:Basic Types#Int | Int]] nvars)''** 
-        * //Parameters:// 
-          * [[common:Basic Types#Array | Array]] < [[common:Basic Types#Int | Int]] > ''indices'' : indices of the target variables 
-          * [[common:Basic Types#Int | Int]] ''nvars'' : new number of variables, default: maximal index 
-        * //Returns:// [[common:Algebraic Types#Polynomial | Polynomial]] 
-        *  Map the variables of the [[/common/property_types/Algebraic Types/Polynomial]] to the given indices.\\ The same index may bei given multiple times and also some may be omitted\\ for embedding with a higher number of variables.\\ The length of the given [[/common/property_types/Basic Types/Array]] must be the same as the number of variables\\ of the original polynomial. 
-    * //Example://\\  \\ <code> > $pm = new Polynomial("1+x_0^2*x_3+x_1+3*x_3"); 
-   > print $pm->mapvars([0,1,1,4],6); 
-   x_0^2*x_4 + x_1 + 3*x_4 + 1 
-  </code> 
-      * **''project''** 
-        * //Returns:// [[common:Algebraic Types#Polynomial | Polynomial]] 
-        *  Project the [[/common/property_types/Algebraic Types/Polynomial]] to the given list of variables.\\ The number of variables will be reduced to the number of indices,\\ i.e. the variables will be renamed.\\ Keeping the names of the variables is possible by using [[/common/property_types/Algebraic Types/Polynomial/methods/substitute]]\\ with a [[/common/property_types/Set Types/Map]]. 
-    * //Example://\\  \\ <code> > $pm = new Polynomial("1+x_0^2*x_3+x_1+3*x_3"); 
-   > print $pm->project([1,3]); 
-   x_0 + 4*x_1 + 1 
-  </code> 
-      * **''print_ordered([[common:Algebraic Types#Matrix | Matrix]] m)''** 
-        * //Parameters:// 
-          * [[common:Algebraic Types#Matrix | Matrix]] ''m'' 
-        *  Print a polynomial with terms sorted according to a given [[/common/property_types/Algebraic Types/Matrix]] //m//. 
-      * **''coefficients_as_vector''** 
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Polynomial | Polynomial]] 
-        *  The vector of all coefficients.\\ The sorting agrees with [[/common/property_types/Algebraic Types/Polynomial/methods/monomials_as_matrix]]. 
-      * **''lm''** 
-        * //Returns:// [[common:Basic Types#Int | Int]] 
-        *  The exponent of the leading monomial. 
-      * **''lc''** 
-        * //Returns:// [[common:Basic Types#Int | Int]] 
-        *  The __leading coefficient__. 
-      * **''get_var_names''** 
-        *  set the variable names 
-      * **''deg''** 
-        * //Returns:// [[common:Basic Types#Int | Int]] 
-        *  The degree of the polynomial 
-      * **''n_vars''** 
-        * //Returns:// [[common:Basic Types#Int | Int]] 
-        *  Number of variables 
-      * **''trivial''** 
-        * //Returns:// [[common:Basic Types#Bool | Bool]] 
-        *  The polynomial is zero. 
-      * **''monomial([[common:Basic Types#Int | Int]] var_index, [[common:Basic Types#Int | Int]] n_vars)''** 
-        * //Parameters:// 
-          * [[common:Basic Types#Int | Int]] ''var_index'' : index of the variable 
-          * [[common:Basic Types#Int | Int]] ''n_vars'' : number of variables 
-        *  construct a monomial of degree 1 with a given variable 
-      * **''embed([[common:Basic Types#Int | Int]] nvars)''** 
-        * //Parameters:// 
-          * [[common:Basic Types#Int | Int]] ''nvars'' : new number of variables 
-        * //Returns:// [[common:Algebraic Types#Polynomial | Polynomial]] 
-        *  Embed the [[/common/property_types/Algebraic Types/Polynomial]] in a polynomial ring with the given\\ number of variables.\\ The old variables will be put at the beginning, for more control use [[/common/property_types/Algebraic Types/Polynomial/methods/mapvars]]. 
-    * //Example://\\  \\ <code> > $pm = new Polynomial("1+x_0^2*x_3+x_1+3*x_3"); 
-   > print $pm->project([1,3]); 
-   x_0 + 4*x_1 + 1 
-  </code> 
-      * **''set_var_names''** 
-        *  set the variable names 
-      * **''initial_form([[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Polynomial | Polynomial]] v)''** 
-        * //Parameters:// 
-          * [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#Polynomial | Polynomial]] ''v'' : weights 
-        * //Returns:// [[common:Algebraic Types#Polynomial | Polynomial]] 
-        *  The initial form with respect to a weight-vector //v// 
-      * **''monomials_as_matrix''** 
-        * //Returns:// [[common:Algebraic Types#SparseMatrix | SparseMatrix]] < [[common:Algebraic Types#Polynomial | Polynomial]] 
-        *  The matrix of all exponent vectors (row-wise).\\ The sorting agrees with [[/common/property_types/Algebraic Types/Polynomial/methods/coefficients_as_vector]]. 
-      * **''constant_coefficient''** 
-        * //Returns:// [[common:Basic Types#Int | Int]] 
-        *  The __constant coefficient__. 
-      * **''substitute''** 
-        *  Substitute a list of values in a [[/common/property_types/Algebraic Types/Polynomial]] with [[/common/property_types/Basic Types/Int]] exponents.\\ Either with an array of values, or with a [[/common/property_types/Set Types/Map]] mapping variable indices\\ to values. 
-    * //Example://\\  \\ <code> > $pm = new Polynomial("1+x_0^2*x_3+x_1+3*x_3"); 
-   > print $pm->substitute([0,11,2,3]); 
-   21 
-  </code>\\  \\ <code> > $map = new Map<Int,Rational>([0,5/2],[1,1/5],[2,new Rational(7/3)]); 
-   > print $pm->substitute($map); 
-   37/4*x_3 + 6/5 
-  </code> 
-      * **''reset_var_names''** 
-        *  reset the variable names according to the default naming scheme 
  
-{{anchor:UniPolynomial:}} **''UniPolynomial<Coefficient, Exponent>''**+\\ 
 +{{anchor:cyclegroup:}} **''CycleGroup<Scalar>''**
     * //Template Parameters://     * //Template Parameters://
-      * ''Coefficient'' : default: [[/common/property_types/Basic Types/Rational]] +      * ''Scalar''integer type of matrix elements 
-   +  *  A group is encoded as a pair of an integer matrix and a vector of faces.\\ The elements of the group can be obtained by symbolic multiplication of both.\\ Access methods: //coeff// delivers the integer matrix, //faces// the vector of faces.
-      * ''Exponent'' : default: [[/common/property_types/Basic Types/Int]] +
-   +
-  *  A class for __univariate__ polynomials. +
-  * //Methods of UniPolynomial:// +
-      * **''lower_deg''** +
-        * //Returns:// [[common:Algebraic Types#UniPolynomial | UniPolynomial]] +
-        *  The lowest degree occuring in the polynomial. +
-      * **''set_var_names''** +
-        *  set the variable name +
-      * **''monomials_as_vector''** +
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#UniPolynomial | UniPolynomial]] +
-        *  The vector of all exponents.\\ The order agrees with [[/common/property_types/Algebraic Types/UniPolynomial/methods/coefficients_as_vector]]. +
-      * **''constant_coefficient''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __constant coefficient__. +
-      * **''reset_var_names''** +
-        *  reset the variable name according to the default naming scheme +
-      * **''substitute''** +
-        *  Substitute some //value// in a [[/common/property_types/Algebraic Types/UniPolynomial]] with [[/common/property_types/Basic Types/Int]] exponents.\\ When all exponents are positive the argument can be any scalar, matrix or polynomial type.\\ With negative exponents, polynomials are not supported (use [[/common/property_types/Algebraic Types/RationalFunction]] instead)\\ and any given matrix must be invertible +
-      * **''evaluate([[common:Algebraic Types#UniPolynomial | UniPolynomial]] x, [[common:Algebraic Types#UniPolynomial | UniPolynomial]] exp)''** +
-        * //Parameters:// +
-          * [[common:Algebraic Types#UniPolynomial | UniPolynomial]] ''x'' :  +
-          * [[common:Algebraic Types#UniPolynomial | UniPolynomial]] ''exp'' : (default: 1) +
-        * //Returns:// [[common:Algebraic Types#UniPolynomial | UniPolynomial]] +
-        *  Evaluate a [[/common/property_types/Algebraic Types/UniPolynomial]] at a number (//x^exp//).\\ Note that for non-integral exponents this may require intermediate floating point\\ computations depending on the input:\\ Let //explcm// be the lcm of the denominators of all exponents.\\ If there are no denominators or //explcm// divides //exp//, then the evaluation\\ is computed exactly.\\ Otherwise, some rational number close to the root //(x^exp)^-explcm// will be chosen\\ via an intermediate floating point number. +
-      * **''lc''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __leading coefficient__. +
-      * **''deg''** +
-        * //Returns:// [[common:Algebraic Types#UniPolynomial | UniPolynomial]] +
-        *  The highest degree occuring in the polynomial. +
-      * **''get_var_names''** +
-        *  get the variable name +
-      * **''print_ordered([[common:Algebraic Types#UniPolynomial | UniPolynomial]] x)''** +
-        * //Parameters:// +
-          * [[common:Algebraic Types#UniPolynomial | UniPolynomial]] ''x'' :  +
-        *  Print a polynomial with terms sorted according to //exponent*x//+
-      * **''coefficients_as_vector''** +
-        * //Returns:// [[common:Algebraic Types#Vector | Vector]] < [[common:Algebraic Types#UniPolynomial | UniPolynomial]] +
-        *  The vector of all coefficients.\\ The sorting agrees with [[/common/property_types/Algebraic Types/UniPolynomial/methods/monomials_as_vector]]. +
-      * **''monomial''** +
-        *  create a monomial of degree 1 +
-      * **''n_vars''** +
-        *  Number of variables +
-      * **''evaluate_float([[common:Basic Types#Float | Float]] x)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Float | Float]] ''x'' :  +
-        * //Returns:// [[common:Basic Types#Float | Float]] +
-        *  Approximate evaluation of the polynomial at a [[/common/property_types/Basic Types/Float]] //x//. +
- +
-{{anchor:Plucker:}} **''Plucker<Scalar>''** +
-    * //Template Parameters:// +
-      * ''Scalar'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-  *  +
-  * //Methods of Plucker:// +
-      * **''permuted''** +
-        * UNDOCUMENTED +
-      * **''coordinates''** +
-        * UNDOCUMENTED +
- +
-{{anchor:all_rows_or_cols:}} **''all_rows_or_cols''** +
-  *  Use the keyword "All" for all rows or columns, e.g. when constructing a [[/common/property_types/Algebraic Types/Matrix/methods/minor]]. +
- +
-{{anchor:PuiseuxFraction:}} **''PuiseuxFraction<MinMax, Coefficient, Exponent>''** +
-    * //Template Parameters:// +
-      * ''MinMax'' : type of tropical addition: either [[/common/property_types/Arithmetic/Min]] or [[/common/property_types/Arithmetic/Max]] +
-   +
-      * ''Coefficient'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-      * ''Exponent'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-  *  +
-  * //Methods of PuiseuxFraction:// +
-      * **''evaluate_float''** +
-      * **''val''** +
-        * //Returns:// [[common:Arithmetic#TropicalNumber | TropicalNumber]] < [[common:Algebraic Types#PuiseuxFraction | PuiseuxFraction]] +
-        *  The __valuation__. +
-      * **''evaluate''** +
- +
----- +
-==== Arithmetic ==== +
- These types are needed as return types of arithmetic computations. +
-{{anchor:Div:}} **''Div<Scalar>''** +
-    * //Template Parameters:// +
-      * ''Scalar'' :  +
-  *  The complete result of an integral division, [[/common/property_types/Arithmetic/Div/methods/quot|quotient]] and [[/common/property_types/Arithmetic/Div/methods/rem|remainder]]. +
-  * //Methods of Div:// +
-      * **''rem''** +
-        * //Returns:// [[common:Arithmetic#Div | Div]] +
-        *  The __remainder__. +
-      * **''quot''** +
-        * //Returns:// [[common:Arithmetic#Div | Div]] +
-        *  The __quotient__. +
- +
-{{anchor:Max:}} **''Max''** +
-  *  tropical addition: max +
-  * //Methods of Max:// +
-      * **''apply''** +
-        * UNDOCUMENTED +
-      * **''orientation''** +
-        * UNDOCUMENTED +
- +
-{{anchor:Min:}} **''Min''** +
-  *  tropical addition: min +
-  * //Methods of Min:// +
-      * **''orientation''** +
-        * UNDOCUMENTED +
-      * **''apply''** +
-        * UNDOCUMENTED +
- +
-{{anchor:TropicalNumber:}} **''TropicalNumber<Addition, Scalar>''** +
-    * //Template Parameters:// +
-      * ''Addition'' :  +
-      * ''Scalar'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-  *  +
-  * //Methods of TropicalNumber:// +
-      * **''zero''** +
-        * //Returns:// [[common:Arithmetic#TropicalNumber | TropicalNumber]] +
-        *  The zero element of the tropical semiring of this element. +
-      * **''orientation''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The orientation of the associated addition, i.e.\\ +1 if the corresponding 0 is +inf\\ -1 if the corresponding 0 is -inf +
- +
-{{anchor:ExtGCD:}} **''ExtGCD''** +
-  *  The complete result of the calculation of the __greatest common divisor__ of two numbers //a// and //b//:\\ [[/common/property_types/Arithmetic/ExtGCD/methods/g]]=gcd(a,b)\\ [[/common/property_types/Arithmetic/ExtGCD/methods/g]]=a*[[/common/property_types/Arithmetic/ExtGCD/methods/p]]+b*[[/common/property_types/Arithmetic/ExtGCD/methods/q]]\\ a=[[/common/property_types/Arithmetic/ExtGCD/methods/g]]*[[/common/property_types/Arithmetic/ExtGCD/methods/k1]]\\ b=[[/common/property_types/Arithmetic/ExtGCD/methods/g]]*[[/common/property_types/Arithmetic/ExtGCD/methods/k2]] +
-  * //Methods of ExtGCD:// +
-      * **''k1''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __factor__ of //a//. +
-      * **''p''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __co-factor__ of //a//. +
-      * **''g''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __greatest common divisor__ of //a// and //b//. +
-      * **''q''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __co-factor__ of //b//. +
-      * **''k2''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The __factor__ of //b//. +
- +
-{{anchor:Addition:}} **''Addition''** +
-  *  Type parameter of many functions and data types from the domain of tropical geometry.\\ Specifies the mode of tropical addition, must be [[/common/property_types/Arithmetic/Min]] or [[/common/property_types/Arithmetic/Max]].\\ There is on purpose no default value for it. +
- +
----- +
-==== Artificial ==== +
- These types are auxiliary artifacts helping to build other classes, primarily representing template parameters or enumeration constants. They should not be used alone as property types or function arguments. In the most cases they won't even have user-accessible constructors. +
-{{anchor:Symmetric:}} **''Symmetric''** +
-  *  Labels a [[/common/property_types/Algebraic Types/Matrix]] or an [[/common/property_types/Set Types/IncidenceMatrix]] as __symmetric__. +
- +
-{{anchor:DirectedMulti:}} **''DirectedMulti''** +
-  *  Type tag for a __directed multigraph__. +
- +
-{{anchor:LocalFloatEpsilon:}} **''LocalFloatEpsilon''** +
-  *  +
- +
-{{anchor:Serialized:}} **''Serialized<X>''** +
-    * //Template Parameters:// +
-      * ''X'' :  +
-  *  +
- +
-{{anchor:UndirectedMulti:}} **''UndirectedMulti''** +
-  *  Type tag for an __undirected multigraph__. +
- +
-{{anchor:CachedObjectPointer:}} **''CachedObjectPointer''** +
-  *  +
- +
-{{anchor:EdgeIterator:}} **''EdgeIterator''** +
-  *  +
- +
-{{anchor:NonSymmetric:}} **''NonSymmetric''** +
-  *  Labels a [[/common/property_types/Algebraic Types/Matrix]] or an [[/common/property_types/Set Types/IncidenceMatrix]] as __non-symmetric__. +
- +
-{{anchor:EdgeList:}} **''EdgeList''** +
-  *  +
- +
-{{anchor:Directed:}} **''Directed''** +
-  *  Type tag for a __directed__ [[/common/property_types/Graph Types/Graph]]. +
- +
-{{anchor:Container:}} **''Container''** +
-  *  One-dimensional collection of objects, aka container in STL\\ It can be accessed like a perl array.  Sequential iteration via foreach() is always supported;\\ random access might be supported depending on the underlying C++ object. +
- +
-{{anchor:Iterator:}} **''Iterator<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' :  +
-  *  An iterator over a sequence of objects.\\ The objects may be stored in a container or be generated on the fly. +
- +
-{{anchor:Undirected:}} **''Undirected''** +
-  *  Type tag for an __undirected__ [[/common/property_types/Graph Types/Graph]]. +
- +
----- +
-==== Basic Types ==== +
- This category contains all basic types, in particular those that wrap C++, GMP or perl types such as [[/common/property_types/Basic Types/Int]], [[/common/property_types/Basic Types/Integer]], [[/common/property_types/Basic Types/Rational]], [[/common/property_types/Basic Types/Long]], [[/common/property_types/Basic Types/Float]], [[/common/property_types/Basic Types/Array]], [[/common/property_types/Basic Types/String]], ... +
-{{anchor:Bool:}} **''Bool''** +
-  *  Corresponds to the C++ type __bool__. +
- +
-{{anchor:AccurateFloat:}} **''AccurateFloat''** +
-  *  A wrapper for AccurateFloat. +
- +
-{{anchor:Long:}} **''Long''** +
-  *  Corresponds to the C++ type __long__.\\ This type is primarily needed for automatic generated function wrappers,\\ because perl integral constants are always kept as a long. +
- +
-{{anchor:String:}} **''String''** +
-  *  Corresponds to the C++ type __std::string__. +
- +
-{{anchor:Float:}} **''Float''** +
-  *  Corresponds to the C++ type __double__. +
-  * //Methods of Float:// +
-      * **''minus_inf''** +
-        *  produce an infinitely large negative value +
-      * **''inf''** +
-        *  produce an infinitely large positive value +
- +
-{{anchor:Pair:}} **''Pair<First, Second>''** +
-    * //Template Parameters:// +
-      * ''First'' :  +
-      * ''Second'' :  +
-  *  Corresponds to the C++ type __std::pair__. +
- +
-{{anchor:Int:}} **''Int''** +
-  *  Corresponds to the C++ type __int__. +
- +
-{{anchor:QuadraticExtension:}} **''QuadraticExtension<Field>''** +
-    * //Template Parameters:// +
-      * ''Field'' : default: [[/common/property_types/Basic Types/Rational]] +
-   +
-  *  Realizes quadratic extensions of fields.\\ You can construct the value a+b\(\sqrt r\) via QuadraticExtension(a, b, r) (where a, b, r are of type //Field//). +
- +
-{{anchor:Integer:}} **''Integer''** +
-  *  An integer of arbitrary size. +
-  * //Methods of Integer:// +
-      * **''inf''** +
-        *  produce an infinitely large positive value +
-      * **''minus_inf''** +
-        *  produce an infinitely large negative value +
- +
-{{anchor:Rational:}} **''Rational''** +
-  *  A class for rational numbers.\\ You can easily create a Rational like that: $x = 1/2; +
-  * //Methods of Rational:// +
-      * **''inf''** +
-        *  Produce an infinitely large positive value. +
-      * **''minus_inf''** +
-        *  Produce an infinitely large negative value. +
- +
-{{anchor:Text:}} **''Text''** +
-  *  Plain text without any imposed structure. +
- +
-{{anchor:List:}} **''List<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' :  +
-  *  Corresponds to the C++ type __std::list__. +
- +
-{{anchor:Array:}} **''Array<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' :  +
-  *  An array with elements of type //Element//.\\ Corresponds to the C++ type [[/common/property_types/Basic Types/Array]]. +
-  * //Methods of Array:// +
-      * **''size''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the size. +
- +
----- +
-==== Database ==== +
- Here you can find the functions to access the polymake database. +
-{{anchor:DBCursor:}} **''DBCursor''** +
-  *  A database cursor. Initialize it with a database name, a collection name and a query.\\ You can then iterate over the objects matching the query with next.\\ It lazily fetches more objects from the database server.\\ (Note that you have to create a new cursor if you want to start from the beginning.) +
- +
-{{anchor:MongoClient:}} **''MongoClient''** +
-  *  A handler for the polyDB database internally controlling the connection to the MongoDB database +
- +
----- +
-==== Graph Types ==== +
- This contains all property types that are related to graphs. +
-{{anchor:EdgeHashMap:}} **''EdgeHashMap<Dir, Element>''** +
-    * //Template Parameters:// +
-      * ''Dir'' : one of [[/common/property_types/Artificial/Undirected]], [[/common/property_types/Artificial/Directed]], [[/common/property_types/Artificial/UndirectedMulti]] or [[/common/property_types/Artificial/DirectedMulti]] +
-   +
-      * ''Element'' : data associated with edges +
-   +
-  *  Sparse mapping of edges to data items. +
-  * //Methods of EdgeHashMap:// +
-      * **''erase([[common:Basic Types#Int | Int]] from, [[common:Basic Types#Int | Int]] to)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''from'' : source node +
-          * [[common:Basic Types#Int | Int]] ''to'' : target node +
-        *  Delete the data associated with an edge between two given nodes. +
-      * **''edge([[common:Basic Types#Int | Int]] from, [[common:Basic Types#Int | Int]] to)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''from'' : source node +
-          * [[common:Basic Types#Int | Int]] ''to'' : target node +
-        *  Access the data associated with an edge between two given nodes.\\ The new data element is created on demand. +
-      * **''find([[common:Basic Types#Int | Int]] from, [[common:Basic Types#Int | Int]] to)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''from'' : source node +
-          * [[common:Basic Types#Int | Int]] ''to'' : target node +
-        * //Returns:// [[common:Artificial#Iterator | Iterator]] +
-        *  Access the data associated with an edge between two given nodes. +
- +
-{{anchor:NodeHashMap:}} **''NodeHashMap<Dir, Element>''** +
-    * //Template Parameters:// +
-      * ''Dir'' : one of [[/common/property_types/Artificial/Undirected]], [[/common/property_types/Artificial/Directed]], [[/common/property_types/Artificial/UndirectedMulti]] or [[/common/property_types/Artificial/DirectedMulti]] +
-   +
-      * ''Element'' : data associated with nodes +
-   +
-  *  Sparse mapping of nodes to data items. +
- +
-{{anchor:NodeMap:}} **''NodeMap<Dir, Element>''** +
-    * //Template Parameters:// +
-      * ''Dir'' : kind of the host graph, [[/common/property_types/Artificial/Undirected]], [[/common/property_types/Artificial/Directed]], [[/common/property_types/Artificial/UndirectedMulti]], or [[/common/property_types/Artificial/DirectedMulti]] +
-   +
-      * ''Element'' : data associated with nodes +
-   +
-  *  Dense mapping of nodes to data items. +
- +
-{{anchor:EdgeMap:}} **''EdgeMap<Dir, Element>''** +
-    * //Template Parameters:// +
-      * ''Dir'' : kind of the host graph, [[/common/property_types/Artificial/Undirected]], [[/common/property_types/Artificial/Directed]], [[/common/property_types/Artificial/UndirectedMulti]], or [[/common/property_types/Artificial/DirectedMulti]] +
-   +
-      * ''Element'' : data associated with edges +
-   +
-  *  Dense mapping of edges to data items. +
-  * //Methods of EdgeMap:// +
-      * **''edge([[common:Basic Types#Int | Int]] from, [[common:Basic Types#Int | Int]] to)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''from'' : source node +
-          * [[common:Basic Types#Int | Int]] ''to'' : target node +
-        *  Access the data associated with an edge between two given nodes. +
- +
-{{anchor:Graph:}} **''Graph<Dir>''** +
-    * //Template Parameters:// +
-      * ''Dir'' : one of [[/common/property_types/Artificial/Undirected]], [[/common/property_types/Artificial/Directed]], [[/common/property_types/Artificial/UndirectedMulti]] or [[/common/property_types/Artificial/DirectedMulti]], default: [[/common/property_types/Artificial/Undirected]] +
-   +
-  *  +
-  * //Methods of Graph:// +
-      * **''out_adjacent_nodes([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Set Types#Set | Set]] +
-        *  Returns the set of indices of the nodes with an edge arriving from //node//. +
-      * **''contract_edge([[common:Basic Types#Int | Int]] node1, [[common:Basic Types#Int | Int]] node2)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node1'' :  +
-          * [[common:Basic Types#Int | Int]] ''node2'' :  +
-        *  Contract the edge(s) between //node1// and //node2//. Reconnects all edges from //node2// to //node1//,\\ deleting the edge(s) between them and, finally, deleting //node2//+
-      * **''node_out_of_range([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Returns true if the given node index is out of valid range. +
-      * **''invalid_node([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Returns true if the given node index is either out of valid range or points to a formerly deleted node. +
-      * **''add_edge([[common:Basic Types#Int | Int]] tail_node, [[common:Basic Types#Int | Int]] head_node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''tail_node'' :  +
-          * [[common:Basic Types#Int | Int]] ''head_node'' :  +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  In a multigraph, creates a new edge connecting two given nodes.\\ In a normal graph, creates a new edge only if the nodes were not connected yet.\\ Returns the index of the (new) edge. +
-      * **''squeeze''** +
-        *  Renumbers the valid nodes as to eliminate all gaps left after deleting. +
-      * **''degree([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of edges incident to //node//. +
-      * **''adjacent_nodes([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Set Types#Set | Set]] +
-        *  Returns the set of indices of nodes adjacent to //node//. +
-      * **''out_degree([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of edges leaving //node//. +
-      * **''edge([[common:Basic Types#Int | Int]] tail_node, [[common:Basic Types#Int | Int]] head_node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''tail_node'' :  +
-          * [[common:Basic Types#Int | Int]] ''head_node'' :  +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the index of the edge connecting two given nodes.\\ The edge is created if was not there.\\ In a multigraph, an arbitrary edge from the parallel bundle will be picked. +
-      * **''all_edges([[common:Basic Types#Int | Int]] tail_node, [[common:Basic Types#Int | Int]] head_node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''tail_node'' :  +
-          * [[common:Basic Types#Int | Int]] ''head_node'' :  +
-        * //Returns:// [[common:Artificial#Iterator | Iterator]] +
-        *  Returns an iterator visiting all (parallel) edges connecting two given nodes. +
-      * **''in_degree([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of edges heading to //node//. +
-      * **''dim''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the maximal node index + 1.\\ If the graph does not have gaps caused by node deletion, the result is equivalent to [[/common/property_types/Graph Types/Graph/methods/nodes]](). +
-      * **''add_node''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Add a new node without incident edes. +
-      * **''out_edges([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Artificial#EdgeList | EdgeList]] +
-        *  Returns a sequence of edges leaving (in Directed case) or incident to (in Undirected case) //node//. +
-      * **''edge_exists([[common:Basic Types#Int | Int]] tail_node, [[common:Basic Types#Int | Int]] head_node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''tail_node'' :  +
-          * [[common:Basic Types#Int | Int]] ''head_node'' :  +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Checks whether two given nodes are connected by (at least) one edge. +
-      * **''edges''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Get the total number of edges. +
-      * **''squeeze_isolated''** +
-        *  Deletes all nodes of degree 0,\\ then renumbers the remaining nodes without gaps. +
-      * **''delete_all_edges([[common:Basic Types#Int | Int]] tail_node, [[common:Basic Types#Int | Int]] head_node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''tail_node'' :  +
-          * [[common:Basic Types#Int | Int]] ''head_node'' :  +
-        *  Deletes all edges in a multigraph connecting two given nodes. +
-      * **''in_edges([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Artificial#EdgeList | EdgeList]] +
-        *  Returns a sequence of edges heading to (in Directed case) or incident to (in Undirected case) //node//. +
-      * **''nodes''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Get the total number of nodes. +
-      * **''permute_nodes''** +
-        *  permute the nodes\\ param perm permutation of node indexes +
-      * **''node_exists([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Check whether the node with given index exists. +
-      * **''permute_inv_nodes''** +
-        *  permute the nodes\\ param perm inverse permutation of node indexes +
-      * **''delete_edge''** +
-      * **''in_adjacent_nodes([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        * //Returns:// [[common:Set Types#Set | Set]] +
-        *  Returns the set of indices of the nodes that have an edge heading to //node//. +
-      * **''has_gaps''** +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Returns true if some nodes have been deleted since the last [[/common/property_types/Graph Types/Graph/methods/squeeze]] operation. +
-      * **''delete_node([[common:Basic Types#Int | Int]] node)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''node'' :  +
-        *  Deletes all edges incident to the given node and marks it as invalid.\\ The numeration of other nodes stays unchanged. +
- +
-{{anchor:GraphMap:}} **''GraphMap<Dir, Element>''** +
-    * //Template Parameters:// +
-      * ''Dir'' : kind of the host graph: [[/common/property_types/Artificial/Undirected]], [[/common/property_types/Artificial/Directed]], [[/common/property_types/Artificial/UndirectedMulti]], or [[/common/property_types/Artificial/DirectedMulti]] +
-   +
-      * ''Element'' : data associated with nodes or edges +
-   +
-  *  The common abstract base class for all kinds of associative containers that can be attached to a [[/common/property_types/Graph Types/Graph]]. +
- +
----- +
-==== Linear Algebra ==== +
- These types are needed as return types of algebraic computations. +
-{{anchor:HermiteNormalForm:}} **''HermiteNormalForm''** +
-  *  Complete result of the __Hermite normal form__ computation.\\ Contains the following fields:\\  Matrix<Scalar> hnf: the Hermite normal form N of //M//\\  SparseMatrix<Scalar> companion: unimodular Matrix R such that M*R = N.\\  Int rank: rank of //M// +
- +
-{{anchor:SingularValueDecomposition:}} **''SingularValueDecomposition''** +
-  *  Complete result of the __singular value decomposition__ of a matrix //M//,\\ such that left_companion * sigma * transpose(right_companion) = //M//\\ Contains the following fields:\\ Matrix<Float> sigma: the diagonalized matrix\\ Matrix<Float> left_companion: matrix of left singular vectors\\ Matrix<Float> right_companion: matrix of right singular vectors +
- +
-{{anchor:SmithNormalForm:}} **''SmithNormalForm''** +
-  *  Complete result of the __Smith normal form__ computation.\\ Contains the following fields:\\ SparseMatrix<Scalar> form: the Smith normal form S of the given matrix //M//\\ List<Pair<Scalar, Int>> torsion:  absolute values of the entries greater than 1 of the diagonal together with their multiplicity\\ Int rank: rank of //M//\\ SparseMatrix<Scalar> left_companion, right_companion: unimodular matrices L and R such that\\                        M = LSR in normal case, or S = LMR in inverted case (as specified in the call to [[/common/functions/Linear Algebra/smith_normal_form]] function). +
- +
----- +
-==== Set Types ==== +
- In this category you find all property types related to sets, such as Set, Map, HashMap, IncidenceMatrix, ... +
-{{anchor:IncidenceMatrix:}} **''IncidenceMatrix<Sym>''** +
-    * //Template Parameters:// +
-      * ''Sym'' : one of [[/common/property_types/Artificial/Symmetric]] or [[/common/property_types/Artificial/NonSymmetric]], default: [[/common/property_types/Artificial/NonSymmetric]] +
-   +
-  *  A 0/1 incidence matrix. +
-  * //Methods of IncidenceMatrix:// +
-      * **''rows''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of rows. +
-      * **''squeeze_rows''** +
-        *  Removes empty rows.\\ The remaining rows are renumbered without gaps. +
-      * **''row([[common:Basic Types#Int | Int]] i)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''i'' :  +
-        * //Returns:// [[common:Algebraic Types#SparseVector | SparseVector]] < [[common:Basic Types#Int | Int]] > +
-        *  Returns the //i//-th row. +
-      * **''squeeze''** +
-        *  Removes empty rows and columns.\\ The remaining rows and columns are renumbered without gaps. +
-      * **''elem([[common:Basic Types#Int | Int]] r, [[common:Basic Types#Int | Int]] c)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''r'' : the row index +
-          * [[common:Basic Types#Int | Int]] ''c'' : the column index +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Returns an element of the matrix as boolean value.\\ The return value is an `lvalue', that is, it can be assigned to, flipped, etc. if the matrix object is mutable. +
-      * **''cols''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Returns the number of columns. +
-      * **''minor([[common:Set Types#Set | Set]] r, [[common:Set Types#Set | Set]] c)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''r'' : the rows +
-          * [[common:Set Types#Set | Set]] ''c'' : the columns +
-        * //Returns:// [[common:Set Types#IncidenceMatrix | IncidenceMatrix]] +
-        *  Returns a __minor__ of the matrix containing the rows in //r// and the columns in //c//.\\ You can pass [[/common/property_types/Algebraic Types/all_rows_or_cols|All]] if you want all rows or columns and ~ for the complement of a set.\\ For example,\\ $A->minor(All, ~[0]);\\ will give you the minor of a matrix containing all rows and all but the 0-th column. +
-      * **''col([[common:Basic Types#Int | Int]] i)''** +
-        * //Parameters:// +
-          * [[common:Basic Types#Int | Int]] ''i'' :  +
-        * //Returns:// [[common:Algebraic Types#SparseVector | SparseVector]] < [[common:Basic Types#Int | Int]] > +
-        *  Returns the //i//-th column. +
-      * **''squeeze_cols''** +
-        *  Removes empty columns.\\ The remaining columns are renumbered without gaps. +
- +
-{{anchor:Bitset:}} **''Bitset''** +
-  *  Container class for dense sets of integers.\\ A special class optimized for representation of a constrained range of\\ non-negative integer numbers. +
- +
-{{anchor:HashMap:}} **''HashMap<Key, Value>''** +
-    * //Template Parameters:// +
-      * ''Key'' : type of the key values +
-   +
-      * ''Value'' : type of the mapped value +
-   +
-  *  An unordered map based on a hash table.  Its interface is similar to that of [[/common/property_types/Set Types/Map]],\\ but the order of elements is not stable across polymake sessions and does not correlate with key values.\\ Accessing and inserting a value by its key works in constant time O(1).\\ You can create a new HashMap mapping Ints to Strings by\\ $myhashmap = new HashMap<Int, String>([1, "Monday"], [2, "Tuesday"]);\\ On the perl side HashMaps are treated like hashrefs.\\ You can work with a HashMap like you work with a [[/common/property_types/Set Types/Map]] (keeping in mind differences in performance\\ and memory demand). +
-  * //Methods of HashMap:// +
-      * **''size''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Size of the map +
- +
-{{anchor:PowerSet:}} **''PowerSet<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Int]] +
-   +
-  *  A [[/common/property_types/Set Types/Set]] whose elements are of type Set<//Element//>+
- +
-{{anchor:Map:}} **''Map<Key, Value>''** +
-    * //Template Parameters:// +
-      * ''Key'' : type of the key values +
-   +
-      * ''Value'' : type of the mapped value +
-   +
-  *  Maps are sorted associative containers that contain unique key/value pairs.\\ Maps are sorted by their keys.\\ Accessing or inserting a value needs logarithmic time O(log n), where n is the size of the map.\\ You can create a new Map mapping Ints to Strings by\\ $mymap = new Map<Int, String>([1, "Monday"], [2, "Tuesday"]);\\ On the perl side Maps are treated like hashrefs.\\ You can add a new key/value pair by\\$mymap->{3} = "Wednesday";\\ (If the key is already contained in the Map, the corresponding value is replaced by the new one.)\\ or ask for the value of a key by\\ print $mymap->{1}; +
- +
-{{anchor:Set:}} **''Set<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Int]] +
-   +
-  *  A type for ordered sets containing elements of type //Element//.\\ You can for example create a new Set by:\\ $s = new Set(2, 3, 5, 7);\\ You can perform set theoretic operations:\\ $s1 + $s2  union\\ $s1 * $s2  intersection\\ $s1 - $s2  difference\\ $s1 ^ $s2  symmetric difference +
-  * //Methods of Set:// +
-      * **''size''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The cardinality of the set. +
-      * **''back''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The last element of the set, that is, the largest element +
-      * **''contains([[common:Set Types#Set | Set]] e)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''e'' : element check for +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Check if e is contained in the set. +
-      * **''collect([[common:Set Types#Set | Set]] e)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''e'' : element to insert into the set +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Add to the set, report true if existed formerly. +
-      * **''front''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The first element of the set, that is, the smallest element +
- +
-{{anchor:ApproximateSet:}} **''ApproximateSet<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' : default: [[/common/property_types/Basic Types/Float]] +
-   +
-  *  A specialization of Sets containing elements of type //Element//,\\ but where equality is enforced only up to a global epsilon.\\ You can for example create a new ApproximateSet with two elements by:\\ $s = new ApproximateSet(1.1, 1.2, 1.200000001); +
- +
-{{anchor:FacetList:}} **''FacetList''** +
-  *  A FacetList is a collection of sets of integral numbers from a closed contiguous range [0..n-1].\\ The contained sets usually encode facets of a simplicial complex,\\ with set elements corresponding to vertices of a complex, therefore the name.\\ From the structural perspective, FacetList is interchangeable with [[/common/property_types/Set Types/IncidenceMatrix]],\\ but they significantly differ in supported operations and their performance.\\ IncidenceMatrix offers fast random access to elements, while FacetList is optimized\\ for finding, inserting, and deleting facets fulfilling certain conditions like\\ all subsets or supersets of a given vertex set.\\ On perl side, FacetList behaves like a sequence of [[]] without random access to facets.\\ Facets are visited in chronological order.\\ Each facet has a unique integral ID generated at the moment of insertion.\\ The IDs can be obtained via call to index() of iterators created by find() methods. +
-  * //Methods of FacetList:// +
-      * **''eraseSupersets([[common:Set Types#Set | Set]] s)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''s'' : filter for removal +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Remove all supersets of a given set +
-      * **''eraseSubsets([[common:Set Types#Set | Set]] s)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''s'' : filter for removal +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  Remove all subsets of a given set +
-      * **''findSubsets([[common:Set Types#Set | Set]] s)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''s'' :  +
-        * //Returns:// [[common:Artificial#Iterator | Iterator]] +
-        *  Find all subsets of a given set. +
-      * **''n_vertices''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The number of vertices +
-      * **''insertMin([[common:Set Types#Set | Set]] f)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''f'' : facet to add +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Add a new facet if and only if there are no facets included in it.\\ If this holds, remove all facets including the new facet. +
-      * **''size''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The number of facets in the list. +
-      * **''find([[common:Set Types#Set | Set]] f)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''f'' : facet to find +
-        * //Returns:// [[common:Artificial#Iterator | Iterator]] +
-        *  Look up a facet. +
-      * **''insert([[common:Set Types#Set | Set]] f)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''f'' : facet to add. +
-        *  Add a new facet.  It may be a proper subset or a proper superset of existing facets.\\ It must not be empty or coincide with any existing facet. +
-      * **''findSupersets([[common:Set Types#Set | Set]] s)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''s'' :  +
-        * //Returns:// [[common:Artificial#Iterator | Iterator]] +
-        *  Find all supersets of a given set. +
-      * **''erase([[common:Set Types#Set | Set]] f)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''f'' : facet to remove +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Remove a facet. +
-      * **''insertMax([[common:Set Types#Set | Set]] f)''** +
-        * //Parameters:// +
-          * [[common:Set Types#Set | Set]] ''f'' : facet to add +
-        * //Returns:// [[common:Basic Types#Bool | Bool]] +
-        *  Add a new facet if and only if there are no facets including it.\\ If this holds, remove all facets that are included in the new one. +
- +
-{{anchor:HashSet:}} **''HashSet<Element>''** +
-    * //Template Parameters:// +
-      * ''Element'' :  +
-  *  An unordered set of elements based on a hash table.\\ Can be traversed as a normal containerbut the order of elements is not stable across polymake sessions,\\ even if the set is restored from the same data file every time. +
-  * //Methods of HashSet:// +
-      * **''size''** +
-        * //Returns:// [[common:Basic Types#Int | Int]] +
-        *  The cardinality of the set. +
- +
----- +
-==== Visualization ==== +
- These property_types are for visualization. +
-{{anchor:HSV:}} **''HSV''** +
-  *  A color described as a Hue-Saturation-Value triple.\\ Is convertible to and from an RGB representation. +
- +
-{{anchor:Color:}} **''Color''** +
-  *  This is a pseudo-type for documentation purposes only.\\ A function expecting an argument or option of type //Color// can digest an object of type [[/common/property_types/Visualization/RGB]] or [[/common/property_types/Visualization/HSV]]\\ as well as a string with an RGB value in hex notation "#RRGGBB" or a symbolic color name. +
- +
-{{anchor:Flexible:}} **''Flexible''** +
-  *  This is a pseudo-type for documentation purposes only.\\ Many options of visualization functions modifying the appearance of some set of graphical elements\\ like points, edges, facets, etc. accept a wide range of possible values, allowing for different grades\\ of flexibility (and complexity):\\  SCALAR  the same attribute value is applied to all elements\\  ARRAY   each element gets its individual attribute value\\  HASH    elements found in the hash get their individual attribute values, for the rest the appropriate default applies\\  SUB     a piece of code computing the attribute value for the given element\\ Unless specified explicitly in the detailed option description, the indices, keys, or\\ subroutine arguments used for retrieval of the attribute values are just the zero-based ordinal numbers of the elements.+
  
-{{anchor:RGB:}} **''RGB''** +\\ 
-  *  A color described as a Red-Green-Blue triple.\\ Can be constructed from a list of three integral values from the range 0..255,\\ or hex triplet with a leading # symbol,\\ or a list of three floating-point values from the range 0..1,\\ or a symbolic name from the X11 color names.+{{anchor:intersectionform:}} **''IntersectionForm''** 
 +  *  Parity and signature of the intersection form of closed oriented 4k-manifold.\\ See ''[[playground/playground/SimplicialComplex#INTERSECTION_FORM |INTERSECTION_FORM]]''.
  
 +\\
 +{{anchor:homologygroup:}} **''HomologyGroup''**
 +  *  A group is encoded as a sequence ( { (t<sub>1</sub> m<sub>1</sub>) ...  (t<sub>n</sub>  m<sub>n</sub>) } f) of non-negative integers,\\ with t<sub>1</sub> > t<sub>2</sub> > ... > t<sub>n</sub> > 1, plus an extra non-negative integer f.\\ The group is isomorphic to (Z/t<sub>1</sub>)<sup>m<sub>1</sub></sup> &times; ... &times; (Z/t<sub>n</sub>)<sup>m<sub>n</sub></sup> &times; Z<sup>f</sup>, \\ where Z<sup>0</sup> is the trivial group.\\ Access methods: //torsion// delivers the list of Z-groups, //betti_number// the number f.