Fast orthogonal factorization for sparse matrices : theory, implementation, and application