class_docstr: Class for Sub-Riemannian metrics.
  
  This implementation assumes a bracket-generating distribution of constant dimension.
  
  Only one of the arguments 'cometric_matrix' and 'frame' can be different from
  None. If the frame is supplied, it is assumed orthonormal.
  
  Parameters
  ----------
  space : Manifold object
  cometric_matrix : callable
      Optional, default: 'None'
  
      The cometric matrix as a function of a point.
  
      You should pass :
          base_point : array-like, shape=[..., dim]
      It returns:
          _ : array-like, shape=[..., dim, dim]
  
  frame : callable
      Optional, default: 'None'
  
      Matrix representing the frame spanning the distribution,
      as a function of a point.
  
      You should pass:
          point : array-like, shape=[..., dim]
      It returns
          _ : array-like, shape=[..., dim, dist_dim]
              Frame field matrix. Each column is a vector field of the frame
              spanning the distribution.
class_docstr_tok: ["Class","for","Sub-Riemannian","metrics",".","This","implementation","assumes","a","bracket-generating","distribution","of","constant","dimension",".","Only","one","of","the","arguments","'cometric_matrix","'","and","'frame","'","can","be","different","from","None",".","If","the","frame","is","supplied",",","it","is","assumed","orthonormal",".","Parameters","--","--","--","--","--","space",":","Manifold","object","cometric_matrix",":","callable","Optional",",","default",":","'None'","The","cometric","matrix","as","a","function","of","a","point",".","You","should","pass",":","base_point",":","array-like",",","shape=","[","...",",","dim","]","It","returns",":","_",":","array-like",",","shape=","[","...",",","dim",",","dim","]","frame",":","callable","Optional",",","default",":","'None'","Matrix","representing","the","frame","spanning","the","distribution",",","as","a","function","of","a","point",".","You","should","pass",":","point",":","array-like",",","shape=","[","...",",","dim","]","It","returns","_",":","array-like",",","shape=","[","...",",","dim",",","dist_dim","]","Frame","field","matrix",".","Each","column","is","a","vector","field","of","the","frame","spanning","the","distribution","."]
docstr: Exponential map associated to the cometric.
  
  Exponential map at base_point of cotangent_vec computed by integration
  of the Hamiltonian equation (initial value problem), using the cometric.
  In the Riemannian case this yields the exponential associated to the
  Levi-Civita connection of the metric (the inverse of the cometric).
  
  Parameters
  ----------
  cotangent_vec : array-like, shape=[..., dim]
      Tangent vector at the base point.
  base_point : array-like, shape=[..., dim]
      Point on the manifold.
  n_steps : int
      Number of discrete time steps to take in the integration.
      Optional, default: N_STEPS.
  point_type : str, {'vector', 'matrix'}
      Type of representation used for points.
      Optional, default: None.
  
  Returns
  -------
  exp : array-like, shape=[..., dim]
      Point on the manifold.
docstr_tok: ["Exponential","map","associated","to","the","cometric",".","Exponential","map","at","base_point","of","cotangent_vec","computed","by","integration","of","the","Hamiltonian","equation","(","initial","value","problem",")",",","using","the","cometric",".","In","the","Riemannian","case","this","yields","the","exponential","associated","to","the","Levi-Civita","connection","of","the","metric","(","the","inverse","of","the","cometric",")",".","Parameters","--","--","--","--","--","cotangent_vec",":","array-like",",","shape=","[","...",",","dim","]","Tangent","vector","at","the","base","point",".","base_point",":","array-like",",","shape=","[","...",",","dim","]","Point","on","the","manifold",".","n_steps",":","int","Number","of","discrete","time","steps","to","take","in","the","integration",".","Optional",",","default",":","N_STEPS",".","point_type",":","str",",","{","'vector","'",",","'matrix","'","}","Type","of","representation","used","for","points",".","Optional",",","default",":","None",".","Returns","--","--","--","-","exp",":","array-like",",","shape=","[","...",",","dim","]","Point","on","the","manifold","."]
code: def exp(self, cotangent_vec, base_point, n_steps=20, **kwargs):
      """Exponential map associated to the cometric.
  
      Exponential map at base_point of cotangent_vec computed by integration
      of the Hamiltonian equation (initial value problem), using the cometric.
      In the Riemannian case this yields the exponential associated to the
      Levi-Civita connection of the metric (the inverse of the cometric).
  
      Parameters
      ----------
      cotangent_vec : array-like, shape=[..., dim]
          Tangent vector at the base point.
      base_point : array-like, shape=[..., dim]
          Point on the manifold.
      n_steps : int
          Number of discrete time steps to take in the integration.
          Optional, default: N_STEPS.
      point_type : str, {'vector', 'matrix'}
          Type of representation used for points.
          Optional, default: None.
  
      Returns
      -------
      exp : array-like, shape=[..., dim]
          Point on the manifold.
      """
      # TODO: add log (caveat in docstrings)
      # TODO: add distance (based on log - also caveat)
      base_point = gs.broadcast_to(base_point, cotangent_vec.shape)
  
      # TODO: integrate; allow euler
      initial_state = gs.stack([base_point, cotangent_vec])
  
      flow = self.symp_flow(self.hamiltonian, n_steps=n_steps)
  
      return flow(initial_state)[-1][0]
  
file_path: geomstats/geomstats/geometry/sub_riemannian_metric.py
imports: import geomstats.backend
label_desc: Use image node_id 16 for calling the SubRiemannianMetric obj's underlying member method code with example usage: obj.exp(cotangent_vec, base_point, n_steps) and returns: flow