Component Tree Enumeration Algorithm

Fig. 10.8. Complex K 1123 of the filtration for data set 1grm top has 1 component and 34 basis cycles. Complex K 8168 of 1hck has 2 components and 17 cycles. Complex K 90000 of TAO bottom has 1 component and 237 cycles. In each case, the spanning surfaces are rendered transparently. Part Three Applications 11 Software I devote this chapter to a brief description of the implementation of some of the algorithms in Part Two. After discussing the programming methodology, I give an overview of the organization of the code and sketch some of the fun- damental data structures. Finally, I introduce a software program, CView, for viewing persistent simplicial complexes, homology cycles and their manifolds, and Morse complexes of grid data.

11.1 Methodology

Computer science solves problems by translating them into the language of very fast machines. We could claim that fast programs are the primary goal of this field. Fast software enables a user to quickly scrutinize a problem, observe patterns, gather data, and conjecture. There are two components to fast software: efficient data structures and algorithms, grounded in theory, and lean implementations, tailored to computer architectures. Knuth observes that “the best theory is inspired by practice, and the best practice is inspired by theory Knuth, 1996.” I apply this observation not only to my work in gen- eral, but also to implementations in particular. The theory of practice in com- puter science has provided numerous abstractions to tackle the complexity of programming, from high-level languages, compilers, and interpreters, to the recent advent of “patterns.” Most of these abstractions, however, depend on extra levels of indirection, consume memory for the services they provide, and yield bloated and slow programs. We can only realize the goal of fast software by selective use of the theory of programming, constructing enough scaffold- ing to manage complexity without sacrificing performance. Consequently, I use ideas from Object-Oriented Programming OOP Meyer, 2000 and construct Abstract Data Types ADTs Roberts, 1997. Rather than implementing in an OOP language, I use the ANSI C program- 183