A fast algorithm for identifying Friends-of-Friends halos
arXiv:1607.03224
Abstract
We describe a simple and fast algorithm for identifying friends-of-friends features and prove its correctness. The algorithm avoids unnecessary expensive neighbor queries, uses minimal memory overhead, and rejects slowdown in high over-density regions. We define our algorithm formally based on pair enumeration, a problem that has been heavily studied in fast 2-point correlation codes and our reference implementation employs a dual KD-tree correlation function code. We construct features in a hierarchical tree structure, and use a splay operation to reduce the average cost of identifying the root of a feature from to ( is the size of a feature) without additional memory costs. This reduces the overall time complexity of merging trees from to , reducing the number of operations per splay by orders of magnitude. We next introduce a pruning operation that skips merge operations between two fully self-connected KD-tree nodes. This improves the robustness of the algorithm, reducing the number of merge operations in high density peaks from to . We show that for cosmological data set the algorithm eliminates more than half of merge operations for typically used linking lengths (relative to mean separation). Furthermore, our algorithm is extremely simple and easy to implement on top of an existing pair enumeration code, reusing the optimization effort that has been invested in fast correlation function codes.
arXiv comment11 pages, 6 figures. Published in Astronomy and Computing
References in corpus (9)
- Galaxies on FIRE (Feedback In Realistic Environments): Stellar Feedback Explains Cosmologically Inefficient Star Formation
- Enzo: An Adaptive Mesh Refinement Code for Astrophysics
- HOP: A New Group-Finding Algorithm for N-body Simulations
- FastPM: a new scheme for fast simulations of dark matter and halos
- The effects of baryon physics, black holes and AGN feedback on the mass distribution in clusters of galaxies
- Cluster Galaxy Dynamics and the Effects of Large Scale Environment
- Fast and accurate mock catalogue generation for low-mass galaxies
- Fast Algorithms and Efficient Statistics: N-point Correlation Functions
- ORCA: The Overdense Red-sequence Cluster Algorithm