Higher order linking numbers, curvature and holonomy