[[application: topaz]]

# application: topaz

The TOPology Application Zoo deals with abstract simplicial complexes. A complex is given as a list of facets. You can ask for its global properties (manifold recognition, homology groups, etc.), explore the local vertex environment (stars, links, etc.), and make a lot of constructions.

The visualization means are constrained, as they are mostly based on the GRAPH (1-skeleton) of a complex.

imports from: common, graph

## Objects

- ###
  MixedGraph

  The nodes of the mixed graph are the nodes of the primal GRAPH and the DUAL_GRAPH. Additional to the primal and dual edges, there is an edge between a primal and a dual node iff the primal node represents a vertex of the corresponding facet of the dual node.

  derived from: graph::Graph<Undirected>

  #### Properties of MixedGraph

  - EDGE_WEIGHTS: common::EdgeMap<Undirected, Float>

    Associated edge labels (weights) of the MixedGraph.

- ###
  SimplicialComplex

  An abstract simplicial complex represented by its facets.

  #### Properties of SimplicialComplex

  - FOLDABLE: common::Bool

    Alias for property BALANCED.

  - ###
    Basic properties

  - BOUNDARY: SimplicialComplex

    Codimension-1-faces of a PSEUDO_MANIFOLD which are contained in one facet only.

  - DIM: common::Int

    Maximal dimension of the FACETS, where the dimension of a facet is defined as the number of its vertices minus one.

  - DUAL_GRAPH: graph::Graph<Undirected>

    The graph of facet neighborhood. Two FACETS are neighbors if they share a (d-1)-dimensional face.

    #### Properties of DUAL_GRAPH

    - COLORING: common::NodeMap<Undirected, Int>

      UNDOCUMENTED

  - FACETS: common::Array<Set<Int>>

    Faces which are maximal with respect to inclusion, encoded as their ordered set of vertices. The vertices must be numbered 0, ..., n-1.

  - GRAPH: graph::Graph<Undirected>

    The subcomplex consisting of all 1-faces.

  - HASSE_DIAGRAM: graph::FaceLattice

    The face lattice of the simplical complex organized as a directed graph. Each node corresponds to some face of the simplical complex. It is represented as the list of vertices comprising the face. The outgoing arcs point to the containing faces of the next dimension. An artificial top node is added to represent the entire complex.

  - INPUT_FACES: common::Array<Set<Int>>

    Any description of the faces of a simplicial complex. Redundancy allowed.

  - N_FACETS: common::Int

    Number of FACETS.

  - N_VERTICES: common::Int

    Number of vertices.

  - PURE: common::Bool

    A simplicial complex is pure if all its facets have the same dimension.

  - VERTEX_INDICES: common::Array<Int>

    Indices of the VERTICES from INPUT_FACES.

  - VERTEX_LABELS: common::Array<String>

    Labels of the vertices.

- ###
  Combinatorics

- BALANCED: common::Bool

  True if GRAPH is (DIM + 1)-colorable.

- COLORING: common::Array<Int>

  A coloring of the vertices.

- F2_VECTOR: common::Matrix<Int>

  fik is the number of incident pairs of i-faces and k-faces; the main diagonal contains the F_VECTOR.

- F_VECTOR: common::Array<Int>

  fk is the number of k-faces, for k = 0,... , d, where d is the dimension.

- MINIMAL_NON_FACES: common::Array<Set<Int>>

  Inclusion minimal non-faces (vertex subsets which are not faces of the simplicial complex).

- N_MINIMAL_NON_FACES: common::Int

  Number of MINIMAL_NON_FACES.

- ODD_SUBCOMPLEX: SimplicialComplex

  Subcomplex generated by faces of codimension 2 that are contained in an odd number of faces of codimension 1.

- PROJ_DICTIONARY: common::Array<Int>

  For each vertex the corresponding vertex of facet 0 with respect to the action of the group of projectivities.

- PROJ_ORBITS: common::PowerSet<Int>

  Orbit decomposition of the group of projectivities acting on the set of vertices of facet 0.

- ###
  Geometric Complexes

- SIGNATURE: common::Int

  Signature of a geometric simplicial complex embedded in the integer lattice. Like DUAL_GRAPH_SIGNATURE, but only simplices with odd normalized volume are counted.

- VOLUME: common::Rational

  Volume of a geometric simplicial complex. FIXME: introduce type RealizedSimplicialComplex<Scalar=Rational> : SimplicialComplex

- ###
  Topology

  The following properties are topological invariants.

- BALL: common::Bool

  Heuristically true if the topological space homeomorphic to a ball. Similar remarks hold as for SPHERE.

- CLOSED_PSEUDO_MANIFOLD: common::Bool

  True if this is a PURE simplicial complex with the property that each ridge is contained in exactly two facets.

- COCYCLES: Array<CycleGroup>

  Representatives of cocycle groups, listed in increasing codimension order. Encoding similar to CYCLES.

- COHOMOLOGY: Array<HomologyGroup>

  Reduced cohomology groups, listed in increasing codimension order. Encoding similar to HOMOLOGY.

- CYCLES: Array<CycleGroup>

  Representatives of cycle groups, listed in increasing dimension order.

  The first component in each dimension is a matrix of integer coefficients, the second component is a vector of faces. To obtain the chains, one must (symbolically) multiply both components.

- EULER_CHARACTERISTIC: common::Int

  Reduced Euler characteristic. Alternating sum of the F_VECTOR minus 1.

- FUNDAMENTAL_GROUP: common::Tuple<Int, List<List<Tuple<Int, Int>>>>

  A finite representation of the fundamental group. The fundamental group is represented as a pair of an integer, the number of generators, and a list of relations. The generators are numbered consecutively starting with zero. A relation is encoded as a list of pairs, each pair consisting of a generator and its exponent.

  You may use the fundamental2gap method to produce a `GAP` file.

- FUNDAMENTAL_GROUP_GEN_LABELS: common::Array<String>

  Labels of the generators of the FUNDAMENTAL_GROUP. The labels can be chosen freely. If the FUNDAMENTAL_GROUP is computed by polymake, the generators correspond to the edges of the complex. Hence they are labeled `g` followed by the vertices of the edge, e.g. `g3_6` corresponds to the edge {3 6}.

- GENUS: common::Int

  The genus of a surface.

- HOMOLOGY: Array<HomologyGroup>

  Reduced simplicial homology groups H0, ..., Hd (integer coefficients), listed in increasing dimension order.

  Each group G is encoded as a sequence ( { (t1 m1) ... (tn mn) } f) of non-negative integers, with t1 > t2 > ... > n > 1, plus an extra non-negative integer f. The group G is isomorphic to (Z/t1)m1 × ... × (Z/tn)mn × Zf, where Z0 is the trivial group.

- INTERSECTION_FORM: IntersectionForm

  Parity and signature of the intersection form of a closed oriented 4-manifold.

- KNOT: common::Array<Set<Int>>

  Edge-subset of a 3-sphere which is a knot or link, that is, a collection of pairwise disjoint cycles.

- LOCALLY_STRONGLY_CONNECTED: common::Bool

  True if the vertex star of each vertex is DUAL_CONNECTED.

- MANIFOLD: common::Bool

  True if this is a compact simplicial manifold with boundary.

  Depends on heuristic SPHERE recognition.

- MORSE_MATCHING: graph::Graph<Undirected>

  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 (greedy). The alternative is to use a canceling algorithm due to Forman (cancel). Note 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

- MORSE_MATCHING_CRITICAL_FACES: common::Array<Set<Int>>

  The critical faces of the computed Morse matching, i.e., the faces not incident to any reoriented arc (not matched). FIXME: temporary

- MORSE_MATCHING_CRITICAL_FACE_VECTOR: common::Array<Int>

  The vector of critical faces in each dimension. FIXME: temporary

- MORSE_MATCHING_N_CRITICAL_FACES: common::Int

  Number of critical faces of the computed Morse matching. FIXME: temporary

- MORSE_MATCHING_SIZE: common::Int

  Size of the computed Morse matching. FIXME: temporary

- ORIENTATION: common::Array<Bool>

  An orientation of the facets of an ORIENTED_PSEUDO_MANIFOLD, such that the induced orientations of a common ridge of two neighboring facets cancel each other out. Each facet is marked with true if the orientation is given by the increasing vertex ordering and is marked with false if the orientation is obtained from the increasing vertex ordering by a transposition.

- ORIENTED_PSEUDO_MANIFOLD: common::Bool

  True if this is a PSEUDO_MANIFOLD with top level homology isomorphic to Z.

- PSEUDO_MANIFOLD: common::Bool

  True if this is a PURE simplicial complex with the property that each ridge is contained in either one or two facets.

- SPHERE: common::Bool

  If true then the space is homeomorphic to a sphere. However, recognizing spheres is undecidable in dimensions >= 5, and all known algorithms in dimension 3 are of outrageous complexity. We therefore use the flip-heuristics by Bjoerner and Lutz. This means that if this property is false then the space still might be a sphere.

- STIEFEL_WHITNEY: common::Array<PowerSet<Int>>

  Mod 2 cycle representation of Stiefel-Whitney classes. Each cycle is represented as a set of simplices.

- SURFACE: common::Bool

  True if this is a CONNECTED MANIFOLD of dimension 2.

- ###
  Visualization

- GEOMETRIC_REALIZATION: common::Matrix<Rational>

  Coordinates for the vertices of the simplicial complex, such that the complex is embedded without crossings in some Re. Vector (x1, .... xe) represents a point in Euclidean e-space.

- G_DIM: common::Int

  Dimension e of the space in which the GEOMETRIC_REALIZATION of the complex is embedded.

- MIXED_GRAPH: MixedGraph

  The nodes of the mixed graph are the nodes of the primal GRAPH and the DUAL_GRAPH. Additional to the primal and dual edges, there is an edge between a primal and a dual node iff the primal node represents a vertex of the corresponding facet of the dual node. FIXME: temporary

#### User Methods of SimplicialComplex

- BIPARTITE ()

  True if GRAPH is a bipartite.

- CONNECTED ()

  True if the GRAPH is a connected graph.

- CONNECTED_COMPONENTS ()

  The connected components of the GRAPH, encoded as node sets.

- CONNECTIVITY ()

  Node connectivity of the GRAPH, that is, the minimal number of nodes to be removed from the graph such that the result is disconnected.

- DUAL_BIPARTITE ()

  True if DUAL_GRAPH is a bipartite.

- DUAL_CONNECTED ()

  True if the DUAL_GRAPH is a connected graph.

- DUAL_CONNECTED_COMPONENTS ()

  The connected components of the DUAL_GRAPH, encoded as node sets.

- DUAL_CONNECTIVITY ()

  Node connectivity of the DUAL_GRAPH. Dual to CONNECTIVITY.

- DUAL_GRAPH_SIGNATURE ()

  Difference of the black and white nodes if the DUAL_GRAPH is BIPARTITE. Otherwise -1.

- DUAL_MAX_CLIQUES ()

  The maximal cliques of the DUAL_GRAPH, encoded as node sets.

- GRAPH_SIGNATURE ()

  Difference of the black and white nodes if the GRAPH is BIPARTITE. Otherwise -1.

- labeled_vertices (label ...) → Set<Int>

  Find the vertices by given labels.

  ##### Parameters

  String | label ... | vertex labels

  ##### Returns

  Set<Int> | vertex indices

- MAX_CLIQUES ()

  The maximal cliques of the GRAPH, encoded as node sets.

- N_CONNECTED_COMPONENTS ()

  Number of connected components of the GRAPH.

- VERTEX_DEGREES ()

  Degrees of vertices in the GRAPH.

- ###
  Topology

- fundamental2gap ()

  Writes the FUNDAMENTAL_GROUP using FUNDAMENTAL_GROUP_GEN_LABELS to the given file in GAP input format.

- ###
  Visualization

- VISUAL () → Visual::SimplicialComplex

  Visualizes the complex.

  If G_DIM < 4, the GRAPH and the facets are visualized using the GEOMETRIC_REALIZATION.

  Otherwise, the spring embedder and the GRAPH are used to produce coordinates for the visualization.

  If JavaView is used to visualize the complex, all faces of one facet build a geometry in the jvx-file, so you may use Method -> Effect -> Explode Group of Geometries in the JavaView menu.

  ##### Options

  Bool | mixed_graph | use the MIXED_GRAPH for the spring embedder
  Int | seed | random seed value for the string embedder
  option list: | Visual::Polygon::decorations
  option list: | Visual::Graph::decorations

  ##### Returns

  Visual::SimplicialComplex |

- VISUAL_DUAL_GRAPH () → Visual::SimplicialComplex

  Uses the spring embedder to visualize the DUAL_GRAPH.

  ##### Options

  Int | seed | random seed value for the string embedder
  option list: | Visual::Graph::decorations

  ##### Returns

  Visual::SimplicialComplex |

- VISUAL_FACE_LATTICE () → Visual::SimplicialComplexLattice

  Visualize the HASSE_DIAGRAM of a simplicial complex as a multi-layer graph.

  ##### Options

  Int | seed | random seed value for the node placement
  option list: | Visual::Lattice::decorations

  ##### Returns

  Visual::SimplicialComplexLattice |

- VISUAL_GRAPH () → Visual::SimplicialComplex

  Uses the spring embedder to visualize the GRAPH.

  ##### Options

  Int | seed | random seed value for the string embedder
  option list: | Visual::Graph::decorations

  ##### Returns

  Visual::SimplicialComplex |

- VISUAL_MIXED_GRAPH ()

  Uses the spring embedder to visualize the MIXED_GRAPH.

  ##### Options

  Int | seed | random seed value for the string embedder
  option list: | Visual::Graph::decorations

#### Permutations of SimplicialComplex

- FacetPerm
  UNDOCUMENTED

  #### Properties of FacetPerm

  - PERMUTATION: common::Array<Int>

    Transforming FACETS from this into basic object

- VertexPerm
  UNDOCUMENTED

  #### Properties of VertexPerm

  - PERMUTATION: common::Array<Int>

    Transforming vertices from this into basic object.

- ###
  Visual::SimplicialComplex

  Visualization of the simplicial complex.

  #### User Methods of Visual::SimplicialComplex

  - FACES (PROPERTY_NAME)

    Add faces with optional different graphical attributes.

    ##### Parameters

    String | PROPERTY_NAME | or [ Faces ]

    ##### Options

    option list: | Visual::Polygon::decorations

  - MORSE_MATCHING ()

    Add the MORSE_MATCHING to the visualization of the SimplicialComplex.

    ##### Options

    option list: | Visual::Graph::decorations

  - SUBCOMPLEX (PROPERTY_NAME)

    Add a subcomplex with optional different graphical attributes.

    ##### Parameters

    String | PROPERTY_NAME | or [ Facets ]

    ##### Options

    option list: | Visual::Polygon::decorations
    option list: | Visual::Graph::decorations
    option list: | Visual::PointSet::decorations

- ###
  Visual::SimplicialComplexLattice

  Visualization of the HASSE_DIAGRAM of a simplicial complex as a multi-layer graph.

  #### User Methods of Visual::SimplicialComplexLattice

  - FACES (faces)

    Add distinguished faces with different graphical attributes NodeColor and NodeStyle.

    ##### Parameters

    Array<Set> | faces | (to be changed in the near future)

    ##### Options

    option list: | Visual::Lattice::decorations

  - SUBCOMPLEX (property)

    Add a subcomplex with different graphical attributes.

    ##### Parameters

    String | property | name of the subcomplex property (to be changed in the near future)

    ##### Options

    option list: | Visual::Lattice::decorations

## User Functions

- cap_product ()

  Compute and print all cap products of cohomology and homology cycles. args: Cocycles Cycles

- homology (complex, co)

  Calculate the (co-)homology groups of a simplicial complex.

  ##### Parameters

  Array<Set<int>> | complex |
  Bool | co |

  ##### Options

  int | dim_low | narrows the dimension range of interest, with negative values being treated as co-dimensions
  int | dim_high | see dim_low

- homology_and_cycles (complex, co)

  Calculate the (co-)homology groups and cycle representatives of a simplicial complex.

  ##### Parameters

  Array<Set<int>> | complex |
  Bool | co |

  ##### Options

  int | dim_low | narrows the dimension range of interest, with negative values being treated as co-dimensions
  int | dim_high | see dim_low

- is_vertex_decomposition ()

  Check whether a given ordered subset of the vertex set is a vertex decomposition. Works for 1-, 2- and 3-manifolds only!

- mixed_graph ()

  Produces the mixed graph of a simplicial @a complex. args: complex [ edge_weight => VALUE ]

- ###
  Comparing

- find_facet_vertex_permutations (complex1, complex2) → Pair<Array<Int>, Array<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.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Returns

  Pair<Array<Int>, Array<int>> |

- isomorphic (complex1, complex2) → Bool

  Determine whether two given complexes are combinatorially isomorphic. The problem is reduced to graph isomorphism of the vertex-facet incidence graphs.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Returns

  Bool |

- pl_homeomorphic (complex1, complex2) → Bool

  Tries to determine wheter 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 computing, once 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+2 in the 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 a 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.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Options

  int | rounds |
  Bool | abs |
  int | obj |
  int | relax |
  int | heat |
  Bool | constant |
  Bool | allow_rev_move |
  int | min_n_facets |
  int | verbose |
  int | seed |
  Bool | quiet |
  Array<Int> | distribution |

  ##### Returns

  Bool |

- ###
  Producing a new simplicial complex from others

- alexander_dual (complex) → SimplicialComplex

  Computes the Alexander dual complex, that is, the complements of all non-faces. The vertex labels are preserved unless the nol flag is specified.

  ##### Parameters

  SimplicialComplex | complex |

  ##### Options

  Bool | nol |

  ##### Returns

  SimplicialComplex |

- balanced_prism (complex) → SimplicialComplex

  Produce a prism over a given SimplicialComplex.

  ##### Parameters

  SimplicialComplex | complex |

  ##### Options

  Bool | geom_real |

  ##### Returns

  SimplicialComplex |

- barycentric_subdivision (complex)

  Create a simplicial complex as a barycentric subdivision of a given complex. Each vertex in the new complex corresponds to a face in the old complex.

  ##### Parameters

  SimplicialComplex | complex |

  ##### Options

  Bool | relabel | generate vertex labels from the faces of the original complex.
  Bool | geom_real | read GEOMETRIC_REALIZATION of the input complex, compute the coordinates of the new vertices and store them as GEOMETRIC_REALIZATION of the produced complex.

- bistellar_simplification (complex) → SimplicialComplex

  Heuristic for simplifying the triangulation of the given manifold without changing its PL-type. The function uses 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 computing, once 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+2 in the 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 a 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.

  ##### Parameters

  SimplicialComplex | complex |

  ##### Options

  int | rounds |
  Bool | abs |
  int | obj |
  int | relax |
  int | heat |
  Bool | constant |
  Bool | allow_rev_move |
  int | min_n_facets |
  int | verbose |
  int | seed |
  Bool | quiet |
  Array<Int> | distribution |

  ##### Returns

  SimplicialComplex |

- cone (complex, k) → SimplicialComplex

  Produce the k-cone over a given simplicial complex.

  ##### Parameters

  SimplicialComplex | complex |
  int | k | default is 1

  ##### Options

  Array<String> | apex_labels | labels of the apex vertices. Default labels have the form `apex_0, apex_1, ...`. In the case the input complex has already vertex labels of this kind, the duplicates are avoided.
  Bool | nol | don't generate any vertex labels.

  ##### Returns

  SimplicialComplex |

- connected_sum (complex1, complex2, f_1, f_2)

  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 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.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |
  int | f_1 | default is 0
  int | f_2 | default is 0

  ##### Options

  Array<int> | permutation |
  Bool | no_lables |

- deletion (complex, face) → SimplicialComplex

  Remove the vertex star of a given face.

  ##### Parameters

  SimplicialComplex | complex |
  Set<Int> | face | specified by vertex indices. Please use labeled_vertices if you want to specify the face by vertex labels.

  ##### Options

  Bool | no_labels | do not write vertex labels.

  ##### Returns

  SimplicialComplex |

- disjoint_union (complex1, complex2)

  Produce the disjoint union of the two given complexes.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Options

  labels | creates | VERTEX_LABELS. The vertex labels are built from the original labels with a suffix `_1` or `_2` appended.

- edge_contraction (complex) → SimplicialComplex

  Heuristic for simplifying the triangulation of the given manifold without changing its PL-type. Choosing a random order of the vertices, the function tries to contract all incident edges.

  ##### Parameters

  SimplicialComplex | complex |

  ##### Options

  int | seed |

  ##### Returns

  SimplicialComplex |

- h_induced_quotient (C, vertices) → SimplicialComplex

  Let C be the given simplicial and A the subcomplex induced by the given vertices. Then this function produces a 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.

  ##### Parameters

  SimplicialComplex | C |
  Set<Int> | vertices |

  ##### Options

  Bool | no_labels | tells the client not to write any labels.
  String | apex |

  ##### Returns

  SimplicialComplex |

- induced_subcomplex (complex, vertices)

  Produce the subcomplex consisting of all faces which are contained in the given set of vertices.

  ##### Parameters

  SimplicialComplex | complex |
  Set<Int> | vertices |

  ##### Options

  Bool | no_label | tells the client not to create any labels.
  Bool | geom_real | tells the client to inherit the GEOMETRIC_REALIZATION.

- join_complexes (complex1, complex2) → SimplicialComplex

  Creates the join of complex1 and complex2.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Options

  Bool | labels | creates VERTEX_LABELS. The vertex labels are built from the original labels with a suffix `_1` or `_2` appended.

  ##### Returns

  SimplicialComplex |

- k_skeleton (complex, k) → SimplicialComplex

  Produce the k-skeleton.

  ##### Parameters

  SimplicialComplex | complex |
  int | k |

  ##### Options

  Bool | nol | suppresses creation of VERTEX_LABELS

  ##### Returns

  SimplicialComplex |

- link_complex (complex, face)

  Produce the link of a face of the complex

  ##### Parameters

  SimplicialComplex | complex |
  Set<int> | face |

  ##### Options

  Bool | no_labels | tells the client not to create any labels.

- simplicial_product (complex1, complex2)

  Computes the simplicial product of two complexes. Vertex orderings may be given as options.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Options

  Array<Int> | vertex_order1 |
  Array<Int> | vertex_order2 |
  Bool | geom_real |
  Bool | color_cons |
  Bool | no_labels |

- star (complex, face) → SimplicialComplex

  Produce the star of the face of the complex.

  ##### Parameters

  SimplicialComplex | complex |
  Set<int> | face |

  ##### Options

  Bool | labels | creates VERTEX_LABELS.

  ##### Returns

  SimplicialComplex |

- stellar_subdivision (complex, faces) → SimplicialComplex

  Computes the complex obtained by stellar subdivision of the given faces of the complex.

  ##### Parameters

  SimplicialComplex | complex |
  Array<Set<int>> | faces |

  ##### Options

  Bool | no_labels |
  Bool | geom_real |

  ##### Returns

  SimplicialComplex |

- stellar_subdivision (complex, faces) → SimplicialComplex

  Computes the complex obtained by stellar subdivision of the given faces of the complex.

  ##### Parameters

  SimplicialComplex | complex |
  Array<Set<int>> | faces |

  ##### Options

  Bool | no_labels |
  Bool | geom_real |

  ##### Returns

  SimplicialComplex |

- suspension (complex, k)

  Produce the k-suspension over a given simplicial complex.

  ##### Parameters

  SimplicialComplex | complex |
  Int | k | default value is 1

  ##### Options

  Array<String> | labels | for the apices. By default apices are labeled with `apex_0+`, `apex_0-`, `apex_1+`, etc. If one of the specified labels already exists, a unique one is made by appending `_i` where i is some small number.
  Bool | nol | do not produce any labels.

- union (complex1, complex2) → SimplicialComplex

  Produce the union of the two given complexes, identifying vertices with equal labels.

  ##### Parameters

  SimplicialComplex | complex1 |
  SimplicialComplex | complex2 |

  ##### Options

  Bool | labels | creates VERTEX_LABELS.

  ##### Returns

  SimplicialComplex |

- ###
  Producing a simplicial complex from other objects

- clique_complex (graph) → SimplicialComplex

  Produce the clique complex of a given graph. If no_labels is set to 1, the labels are not copied.

  ##### Parameters

  Graph | graph |

  ##### Options

  Bool | no_labels |

  ##### Returns

  SimplicialComplex |

- crosscut_complex (p) → SimplicialComplex

  Produce the crosscut complex of the boundary of a polytope.

  ##### Parameters

  polytope::Polytope | p |

  ##### Options

  Bool | noc | suppresses copying the vertex coordinates to GEOMETRIC_REALIZATION

  ##### Returns

  SimplicialComplex |

- ###
  Producing from scratch

- ball (d) → SimplicialComplex

  A d-dimensional ball, realized as the d-simplex.

  ##### Parameters

  int | d | dimension

  ##### Returns

  SimplicialComplex |

- cube_complex ()

  Produces a triangulated pile of hypercubes: Each cube is split into d! tetrahedra, and the tetrahedra are all grouped around one of the diagonal axes of the cube. DOC_FIXME args: x_1, ... , x_d

- klein_bottle () → SimplicialComplex

  The Klein bottle.

  ##### Returns

  SimplicialComplex |

- projective_plane () → SimplicialComplex

  The projective plane.

  ##### Returns

  SimplicialComplex |

- rand_knot (n_edges) → SimplicialComplex

  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]3, 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. Default precision is set to 6 digits.

  ##### Parameters

  int | n_edges |

  ##### Options

  int | n_comp | number of components, default is 1.
  Bool | on_sphere |
  Bool | brownian |
  int | precision |
  int | seed |

  ##### Returns

  SimplicialComplex |

- simplex (d) → SimplicialComplex

  A simplex of dimension d.

  ##### Parameters

  int | d | dimension

  ##### Returns

  SimplicialComplex |

- sphere (d) → SimplicialComplex

  The d-dimansional sphere, realized as the boundary of the (d+1)-simplex.

  ##### Parameters

  int | d | dimension

  ##### Returns

  SimplicialComplex |

- surface (g) → SimplicialComplex

  Produce a surface of genus g. For g >= 0 the client produces an orientable surface, otherwise it produces a non-orientable one.

  ##### Parameters

  int | g | genus

  ##### Returns

  SimplicialComplex |

- torus () → SimplicialComplex

  The Császár Torus. Geometric realization by Frank Lutz, Electronic Geometry Model No. 2001.02.069

  ##### Returns

  SimplicialComplex |

- unknot (m, n)

  Produces a triangulated 3-sphere with the particular NASTY embedding of the unknot in its 1-skeleton. The parameters m >= 2 and n >= 1 determine how entangled the unknot is. eps determines the GEOMETRIC_REALIZATION.

  ##### Parameters

  int | m |
  int | n |

  ##### Options

  Rational | eps |

## Property Types

- ###
  Topology

- CycleGroup

  fields: coeff, faces (defined in homology.cc)

  derived from: common::Tuple<SparseMatrix<Integer, NonSymmetric>, Array<Set<Int>>>
- HomologyGroup

  fields: torsion, betti (defined in homology.cc)

  derived from: common::Tuple<List<Pair<Integer, Int>>, Int>
- IntersectionForm

  fields: parity, positive, negative (defined in intersection_form.cc)

  derived from: common::Tuple<Int, Int, Int>