How to calculate the fractal dimension of a complex network: the box covering algorithm