Statistical mechanics methods for Networks