Efficient algorithms for inferences on grassmann manifolds | Synapse