generalized metric