class_docstr: Step sampler that does not require each step to be evaluated
class_docstr_tok: ["Step","sampler","that","does","not","require","each","step","to","be","evaluated"]
code: def continue_sampling(self, i):
      if i > 0:
          starti, _, _, _ = max(self.points)
          # fwd = True
          inside = i < starti
          more_possible = self.contourpath.samplingpath.fwd_possible
      else:
          starti, _, _, _ = min(self.points)
          # fwd = False
          inside = starti < i
          more_possible = self.contourpath.samplingpath.rwd_possible
  
      if inside:
          # interpolate point on track
          xj, vj, Lj, onpath = self.contourpath.interpolate(i)
          if self.log:
              print(
                  "target is on track, returning interpolation at %d..."
                  % i,
                  xj,
                  Lj,
              )
          return (xj, Lj), True
      elif more_possible:
          # we are not done:
          self.goals.insert(0, ("expand-to", i))
          if self.log:
              print("not done yet, continue expanding to %d..." % i)
          self.goals.append(("sample-at", i))
      else:
          # we are not done, but cannot reach the goal.
          # reverse. Find position from where to reverse
          if i > 0:
              starti, _, _, _ = max(self.points)
              reversei = starti + 1
          else:
              starti, _, _, _ = min(self.points)
              reversei = starti - 1
          if self.log:
              print("reversing at %d..." % starti)
          # how many steps are missing?
          self.nreverses += 1
          deltai = i - starti
          # request one less because one step is spent on
          # the outside try
          if self.log:
              print(
                  "   %d steps to do at %d -> [from %d, delta=%d] targeting %d."
                  % (
                      i - starti,
                      starti,
                      reversei,
                      deltai,
                      reversei - deltai,
                  )
              )
          # make this many steps in the other direction
          self.goals.append(("sample-at", reversei - deltai))
  
imports: import numpy
  from numpy.linalg import norm
  import matplotlib.pyplot
  from .samplingpath import angle, extrapolate_ahead
label_desc: Use image node_id 1 for calling the ClockedBisectSampler obj's underlying member method code with example usage: obj.continue_sampling(i) and returns: xj,  Lj,  True