IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
IMP.isd.utils.Pipe Class Reference

implements a FIFO pipe that merges lists (see self.put) More...

Inherits object.

Detailed Description

implements a FIFO pipe that merges lists (see self.put)

Note
This class is only available in Python.

Definition at line 188 of file utils.py.

Public Member Functions

def append
 x must be a list and will be appended to the end of the pipe, dropping rightmost elements if necessary More...
 
def get
 returns the oldest element, without popping it out of the pipe. More...
 
def put
 if x is subscriptable, insert its contents at the beginning of the pipe. More...
 

Member Function Documentation

def IMP.isd.utils.Pipe.append (   self,
  x 
)

x must be a list and will be appended to the end of the pipe, dropping rightmost elements if necessary

Definition at line 213 of file utils.py.

def IMP.isd.utils.Pipe.get (   self)

returns the oldest element, without popping it out of the pipe.

Popping occurs in the put() method

Definition at line 220 of file utils.py.

def IMP.isd.utils.Pipe.put (   self,
  x 
)

if x is subscriptable, insert its contents at the beginning of the pipe.

Else insert the element itself. If the pipe is full, drop the oldest element.

Definition at line 197 of file utils.py.


The documentation for this class was generated from the following file: