Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALBurst 2.0.7.1-da3b9d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Macros Modules Pages
lalburst.packing.Bin Class Reference

Detailed Description

Bin object for use in packing algorithm implementations.

A Bin instance has two attributes: size, which is the total "size" of the contents of the Bin, and objects, which is a list of the Bins contents.

Example:

‍strings = Bin() s = "hello" strings.add(s, len(s)) s.objects ['hello'] s.size 5

Definition at line 66 of file packing.py.

Inherits object.

Inherited by lalburst.cafe.LALCacheBin.

Public Member Functions

def __init__ (self)
 Initialize a new Bin instance. More...
 
def add (self, obj, size)
 Add the object, whose size is as given, to the bin. More...
 
def __iadd__ (self, other)
 Add the contents of another Bin object to this one. More...
 
def __lt__ (self, other)
 
def __le__ (self, other)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __ge__ (self, other)
 
def __gt__ (self, other)
 
def __repr__ (self)
 A representation of the Bin object. More...
 

Data Fields

 objects
 
 size
 

Constructor & Destructor Documentation

◆ __init__()

def lalburst.packing.Bin.__init__ (   self)

Initialize a new Bin instance.

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 70 of file packing.py.

Member Function Documentation

◆ add()

def lalburst.packing.Bin.add (   self,
  obj,
  size 
)

Add the object, whose size is as given, to the bin.

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 77 of file packing.py.

◆ __iadd__()

def lalburst.packing.Bin.__iadd__ (   self,
  other 
)

Add the contents of another Bin object to this one.

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 85 of file packing.py.

◆ __lt__()

def lalburst.packing.Bin.__lt__ (   self,
  other 
)

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 94 of file packing.py.

◆ __le__()

def lalburst.packing.Bin.__le__ (   self,
  other 
)

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 97 of file packing.py.

◆ __eq__()

def lalburst.packing.Bin.__eq__ (   self,
  other 
)

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 100 of file packing.py.

◆ __ne__()

def lalburst.packing.Bin.__ne__ (   self,
  other 
)

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 103 of file packing.py.

◆ __ge__()

def lalburst.packing.Bin.__ge__ (   self,
  other 
)

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 106 of file packing.py.

◆ __gt__()

def lalburst.packing.Bin.__gt__ (   self,
  other 
)

Reimplemented in lalburst.cafe.LALCacheBin.

Definition at line 109 of file packing.py.

◆ __repr__()

def lalburst.packing.Bin.__repr__ (   self)

A representation of the Bin object.

Definition at line 115 of file packing.py.

Field Documentation

◆ objects

lalburst.packing.Bin.objects

Definition at line 71 of file packing.py.

◆ size

lalburst.packing.Bin.size

Definition at line 72 of file packing.py.