  Connection matrices are a generalization of Morse boundary operators from the
classical Morse theory for gradient vector fields. Developing an efficient
computational framework for connection matrices is particularly important in
the context of a rapidly growing data science that requires new mathematical
tools for discrete data. Toward this goal, the classical theory for connection
matrices has been adapted to combinatorial frameworks that facilitate
computation. We develop an efficient persistence-like algorithm to compute a
connection matrix from a given combinatorial (multi) vector field on a
simplicial complex. This algorithm requires a single-pass, improving upon a
known algorithm that runs an implicit recursion executing two-passes at each
level. Overall, the new algorithm is more simple, direct, and efficient than
the state-of-the-art. Because of the algorithm's similarity to the persistence
algorithm, one may take advantage of various software optimizations from
topological data analysis.
