class_docstr: A replay buffer that stores and can sample whole episodes.
  
  This buffer only stores valid steps, and doesn't require paths to
  have a maximum length.
  
  Args:
      capacity_in_transitions (int): Total memory allocated for the buffer.
      env_spec (EnvSpec): Environment specification.
class_docstr_tok: ["A","replay","buffer","that","stores","and","can","sample","whole","episodes",".","This","buffer","only","stores","valid","steps",",","and","does","n't","require","paths","to","have","a","maximum","length",".","Args",":","capacity_in_transitions","(","int",")",":","Total","memory","allocated","for","the","buffer",".","env_spec","(","EnvSpec",")",":","Environment","specification","."]
docstr: Compute if two segments overlap.
  
  Args:
      seg_a (range): List of indices of the first segment.
      seg_b (range): List of indices of the second segment.
  
  Returns:
      bool: True iff the input ranges overlap at at least one index.
docstr_tok: ["Compute","if","two","segments","overlap",".","Args",":","seg_a","(","range",")",":","List","of","indices","of","the","first","segment",".","seg_b","(","range",")",":","List","of","indices","of","the","second","segment",".","Returns",":","bool",":","True","iff","the","input","ranges","overlap","at","at","least","one","index","."]
code: def _segments_overlap(seg_a, seg_b):
      """Compute if two segments overlap.
  
      Args:
          seg_a (range): List of indices of the first segment.
          seg_b (range): List of indices of the second segment.
  
      Returns:
          bool: True iff the input ranges overlap at at least one index.
  
      """
      # Empty segments never overlap.
      if not seg_a or not seg_b:
          return False
      first = seg_a
      second = seg_b
      if seg_b.start < seg_a.start:
          first, second = seg_b, seg_a
      assert first.start <= second.start
      return first.stop > second.start
  
file_path: garage/src/garage/replay_buffer/path_buffer.py
imports: import collections
  import numpy
  from garage import StepType, TimeStepBatch
label_desc: Use image node_id 11 for calling the PathBuffer obj's underlying member method code with example usage: obj._segments_overlap(seg_a, seg_b) and returns: unknown, False