Hypothesis Test for Manifolds and Networks