Skip to main content

Computational Topology via Functional Programming: A Baseline Analysis

  • Conference paper
  • First Online:
Topological Methods in Data Analysis and Visualization III

Part of the book series: Mathematics and Visualization ((MATHVISUAL))

Abstract

Computational topology is of interest in visualization because it summarizes useful global properties of a dataset. The greatest need for such abstractions is in massive data, and to date most implementations have opted for low-level languages to obtain space and time-efficient implementations. Such code is complex, and is becoming even more so with the need to operate efficiently on a range of parallel hardware. Motivated by rapid advances in functional programming and compiler technology, this chapter investigates whether a shift in programming paradigm could reduce the complexity of the task. Focusing on contour tree generation as a case study, the chapter makes three contributions. First, it sets out the development of a concise functional implementation of the algorithm. Second, it shows that the sequential functional code can be tuned to match the performance of an imperative implementation, albeit at some cost in code clarity. Third, it outlines new possiblilities for parallelisation using functional tools, and notes similarities between functional abstractions and emerging ideas in extreme-scale visualization.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    This is a simplification. Technically, lazy evaluation is the combination of normal order reduction with overwriting the root of reducible expressions to ensure that arguments are evaluated at most once.

  2. 2.

    www.volvis.org

  3. 3.

    Timings were performed on an Apple MacBook, measured using the unix ‘time’ command. Programs were compiled with -O2 -prof -rtsopts -auto-all -rtsopts, enabling optimization and run-time profiling.

References

  1. L. Arge, M. Revsbaek, Robust on-line computation of reeb graphs: simplicity and speed. Algorithms Comput. 5878, 1155–1165 (2009)

    Article  Google Scholar 

  2. J. Backus, Can programming be liberated from the von Neumann style? A functional style and its algebra of programs. Commun. ACM 21(8), 75–94 (1978)

    MathSciNet  Google Scholar 

  3. H. Carr, J. Snoeyink, U. Axen, Computing contour trees in all dimensions. Comput. Geom. 24(2), 75–94 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  4. M. Chakravarty, G. Keller, S. Lee, T. McDonell, V. Grover, Accelerating haskell array codes with multicore GPUs, in Proceedings of the Declarative Aspects of Multicore Programming, Austin (ACM, 2011), pp. 3–14

    Google Scholar 

  5. C. Chiw, G. Kindlmann, J. Reppy, L. Samuels, N. Seltzer, Diderot: a parallel DSL for image analysis and visualization, in Proceedings of the Conference on Programming Language Design and Implementation, Beijing (ACM, 2012), pp. 111–120

    Google Scholar 

  6. Data.IntMap, www.haskell.org/ghc/docs/7.4-latest/html/libraries/containers-0.4.2.1/Data-IntMap.html. Last accessed Nov 2012

  7. D. Duke, R. Borgo, C. Runciman, M. Wallace, Huge data but small programs: visualization design via multiple embedded DSLs, in Proceedings of the Practical Applications of Declarative Languages, Savannah, vol. 5418 (Springer, 2009), pp. 31–45

    Google Scholar 

  8. D. Duke, H. Carr, A. Knoll, N. Schunck, H. Nam, A. Staszczak, Visualizing nuclear scission through a multifield extension of topological analysis. Trans. Vis. Comput. Graph. 18(12), 2033–2040 (2012)

    Article  Google Scholar 

  9. D. Duke, M. Wallace, R. Borgo, C. Runciman, Fine-grained visualization pipelines and lazy functional languages. Trans. Vis. Comput. Graph. 12(5), 973–980 (2006)

    Article  Google Scholar 

  10. D. Günther, J. Reininghaus, H. Wagner, I. Hotz, Efficient computation of 3D morse-smale complexes and persistent homology using discrete morse theory. Vis. Comput. 28(10), 959–969 (2012)

    Article  Google Scholar 

  11. B. Lippmeier, M. Chakravarty, G. Keller, S. Peyton Jones, Guiding parallel array fusion with indexed types, in Proceedings of the Haskell Symposium, Copenhagen (ACM, 2012), pp. 25–36

    Google Scholar 

  12. S. Maadasamy, H. Doraiswamy, V. Natarajan, A hybrid parallel algorithm for computing and tracking level set topology, in International Conference on High Performance Computing, Pune (IEEE, 2012)

    Google Scholar 

  13. S. Marlow, P. Maier, H.W. Loidl, M. Aswad, P. Trinder, Seq no more: better strategies for parallel haskell, in Proceedings of the Haskell Symposium, Baltimore (ACM, 2010), pp. 91–102

    Google Scholar 

  14. S. Marlow, R. Newton, S. Peyton Jones, A monad for deterministic parallelism, in Proceedings of the Haskell Symposium, Tokyo (ACM, 2011), pp. 71–82

    Google Scholar 

  15. J. Meredith, S. Ahern, D. Pugmire, R. Sisneros, EAVL: the extreme-scale analysis and visualization library, in Eurographics Symposium on Parallel Graphics and Visualization, Cagliari, 2012

    Google Scholar 

  16. K. Moreland, U. Ayachit, B. Geveci, K.L. Ma, Dax toolkit: a proposed framework for data analysis and visualization at extreme scale, in Symposium on Large Data Analysis and Visualization, Providence (IEEE Computer Society, 2011), pp. 97–104

    Google Scholar 

  17. B. O’Sullivan, J. Goerzen, D. Stewart, Real World Haskell (O’Reilly Media, Sebastopol, 2008)

    Google Scholar 

  18. V. Pascucci, K. Cole-McLaughlin, Parallel computation of the topology of level sets. Algorithmica 38(1), 249–268 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  19. V. Pascucci, G. Scorzelli, P.T. Bremer, A. Mascarenhas, Robust on-line computation of reeb graphs: simplicity and speed. Trans. Graph. 26(3), 58 (2007)

    Google Scholar 

  20. N. Shivashankar, M. Senthilnathan, V. Natarajan, Parallel computation of 2D morse-smale complexes. Trans. Vis. Comput. Graph. 18(10), 1757–1770 (2012)

    Article  Google Scholar 

  21. The Haskell Programming Language, www.haskell.org. Last accessed Nov 2012

Download references

Acknowledgements

Support for this work was provided by the UK Engineering and Physical Sciences Research Council under Grant EP/J013072/1.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to David Duke .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Duke, D., Carr, H. (2014). Computational Topology via Functional Programming: A Baseline Analysis. In: Bremer, PT., Hotz, I., Pascucci, V., Peikert, R. (eds) Topological Methods in Data Analysis and Visualization III. Mathematics and Visualization. Springer, Cham. https://doi.org/10.1007/978-3-319-04099-8_5

Download citation

Publish with us

Policies and ethics