Ray theory for an anisotropic inhomogeneous elastic medium