Characterization of solution sets of convex optimization problems in Riemannian manifolds