Time-varying graphs and dynamic networks