Libraries and Packages Organization

simplices in simplexArray are redundant, as the information they contain is implicit in their order in the array and the pointers in structured . The next pointers will be necessary for reordering the filtration, however. Also, if only a single simplex enters at a time, structured is not necessary, so it is not used. A reordering algorithm changes the next pointers, as well as the point- ers in simplices to derive a reordered filtration. The algorithm always recovers the initial filtration before reordering. The recovery is through ac- cessing structured , or assuming that a single simplex enters at each time slot whenever structured is NULL . Topology To compute persistence, filterT requires some topological func- tionality from the derived ADTs. Recall from Section 7.2.1 that the persistence algorithm searches for the youngest simplex in a list of positive simplices Γ. Initially, Γ is a subset of the boundary of a negative simplex. To compute Γ, we need a routine that gives us the faces of a simplex. We also need both the faces and cofaces of a simplex for the union-find algorithm. To identify simplices, the derived ADTs must assign a unique index to each simplex and store it in the cIndex connectivity index field. Each derived ADT will use its own scheme to compute this index. Geometry To visualize persistent complexes, filterT also requires some geometric functionality from the derived ADTs. There are two main routines: an initialization procedure and a routine to draw a simplex. This design has the drawback that rendering code is included in each derived ADT. However, the design allows each type of filtration to optimize simplex rendering.

11.4.2 Alphashape

The alphashape filtration provides topological and geometric primitives for filterT by using Mücke’s alf library. The module encapsulates the edge- facet data structure and the filtration, as represented by the master list. The simplices store an index into the master list in the cIndex field. The module utilizes edge-facet primitives to quickly compute the faces and cofaces of a simplex, when required. To render simplices efficiently, alphashape takes advantage of the Vertex Array functionality in OpenGL Woo et al., 1997. The coordinates of vertices are stored in a single array in the alf library. In its initialization routine, the module activates the array through a glVertexPointer call and computes