Hello Oleg,
> What if the manifold admits different metrics?
You can handle this in at least two ways:
Either create one factory for each metric (thinking of a factory as corresponding to one Riemannian manifold, so: different metric means different Riemannian manifold means different factory).
Or allow your factory to take an extra input to choose a specific metric (an optional flag if you will).
Either way, the factory should output one structure M that consistently describes one Riemannian manifold, with one specific metric. If you need to work with two metrics on a manifold, then create two structures, say, M1 and M2.
Best,
Nicolas