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: Compute the symplectic flow of the hamiltonian.
  
  Parameters
  ----------
  hamiltonian : callable
      The hamiltonian function from the tangent bundle to the reals.
  end_time : float
      The last time point until which to calculate the flow.
  n_steps : int
      Number of integration steps.
  
  Returns
  -------
  _ : array-like, shape[,n_steps]
      Given a state, 'symp_flow' returns a
      sequence with n_steps iterations of func.
docstr_tok: ["Compute","the","symplectic","flow","of","the","hamiltonian",".","Parameters","--","--","--","--","--","hamiltonian",":","callable","The","hamiltonian","function","from","the","tangent","bundle","to","the","reals",".","end_time",":","float","The","last","time","point","until","which","to","calculate","the","flow",".","n_steps",":","int","Number","of","integration","steps",".","Returns","--","--","--","-","_",":","array-like",",","shape","[",",","n_steps","]","Given","a","state",",","'symp_flow","'","returns","a","sequence","with","n_steps","iterations","of","func","."]
code: def symp_flow(self, hamiltonian, end_time=1.0, n_steps=20):
      r"""Compute the symplectic flow of the hamiltonian.
  
      Parameters
      ----------
      hamiltonian : callable
          The hamiltonian function from the tangent bundle to the reals.
      end_time : float
          The last time point until which to calculate the flow.
      n_steps : int
          Number of integration steps.
  
      Returns
      -------
      _ : array-like, shape[,n_steps]
          Given a state, 'symp_flow' returns a
          sequence with n_steps iterations of func.
      """
      step = self.symp_euler
      step_size = end_time / n_steps
      return self.iterate(step(hamiltonian, step_size), n_steps)
  
file_path: geomstats/geomstats/geometry/sub_riemannian_metric.py
imports: import geomstats.backend
label_desc: Use image node_id 15 for calling the SubRiemannianMetric obj's underlying member method code with example usage: obj.symp_flow(hamiltonian, end_time, n_steps) and returns: self