The issue is that there is no cross section of metrics, one from each 
manifold, which can all be grouped under the heading of RIEMANNIAN, same 
with LORENTZIAN, etc.  Each manifold will have its own set of idiosyncratic 
metrics, and the user might require the functionality of being able to 
customize their own metric for a manifold.  That's why it makes so much 
sense to attach the metric to the manifold when you instantiate it. 
 Manifolds are prototypical objects with lots of internal structure, and 
thus the code gets messy when you try to shoehorn them into the role of a 
datatype.

On Monday, January 18, 2016 at 2:33:10 PM UTC-8, Simon Danisch wrote:
>
> Am I missing something, or why isn't there this solution:
>
> @enum Metric RIEMANNIAN LORENTZIAN # ...
> immutable Sphere{Matric}
>     dim::Int
> end
> function metric(s::Sphere{RIEMANNIAN})
>
> end
> function metric(s::Sphere{LORENTZIAN})
>
> end
>

Reply via email to