Computing the Structural Index