Scale-free networks emerging from weighted random graphs.