Length of a curve in generalized metric space