class_docstr: Geometry on the Spider, induced by the rays Geometry.
class_docstr_tok: ["Geometry","on","the","Spider",",","induced","by","the","rays","Geometry","."]
docstr: Compute the distance between two Spider points.
  
  Parameters
  ----------
  initial_point : SpiderPoint
       Point in the Spider.
  end_point : SpiderPoint
       Point in the Spider.
  
  Returns
  -------
  geo: function
      Geodesic between two Spider Points.
docstr_tok: ["Compute","the","distance","between","two","Spider","points",".","Parameters","--","--","--","--","--","initial_point",":","SpiderPoint","Point","in","the","Spider",".","end_point",":","SpiderPoint","Point","in","the","Spider",".","Returns","--","--","--","-","geo",":","function","Geodesic","between","two","Spider","Points","."]
code: def _point_geodesic(self, initial_point, end_point):
      """Compute the distance between two Spider points.
  
      Parameters
      ----------
      initial_point : SpiderPoint
           Point in the Spider.
      end_point : SpiderPoint
           Point in the Spider.
  
      Returns
      -------
      geo: function
          Geodesic between two Spider Points.
      """
      if (
          initial_point.stratum == end_point.stratum
          or initial_point.stratum == 0
          or end_point.stratum == 0
      ):
          s = gs.maximum(initial_point.stratum, end_point.stratum)
  
          def ray_geo(t):
              g = self.ray_metric.geodesic(
                  initial_point=gs.array([initial_point.stratum_coord]),
                  end_point=gs.array([end_point.stratum_coord]),
              )
  
              x = g(t)
              return [
                  SpiderPoint(
                      stratum=s if xx[0] else 0, stratum_coord=xx[0]
                  )
                  for xx in x
              ]
  
          return ray_geo
  
      def ray_geo(t):
          g = self.ray_metric.geodesic(
              initial_point=gs.array([-initial_point.stratum_coord]),
              end_point=gs.array([end_point.stratum_coord]),
          )
          x = g(t)
          return [
              SpiderPoint(
                  stratum=initial_point.stratum, stratum_coord=-xx[0]
              )
              if xx < 0.0
              else SpiderPoint(
                  stratum=end_point.stratum, stratum_coord=xx[0]
              )
              for xx in x
          ]
  
      return ray_geo
  
imports: import geomstats.backend
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.stratified.point_set import Point, PointSet, PointSetMetric, _vectorize_point, broadcast_lists
label_desc: Use image node_id 5 for calling the SpiderMetric obj's underlying member method code with example usage: obj._point_geodesic(initial_point, end_point) and returns: ray_geo, ray_geo, unknown, unknown