class documentation

class CostPerformanceDatabase:

View In Hierarchy

Maintain a database of maximal (cost,performance) pairs.

Method __init__ Create an empty database.
Method add Add new entry with cost c and performance p.
Method best Return (cost,performance) pair with largest cost not exceeding c.
Instance Variable _M Undocumented
def __init__(self):

Create an empty database.

def add(self, c, p):

Add new entry with cost c and performance p.

def best(self, c):

Return (cost,performance) pair with largest cost not exceeding c.

Return None if there is no such pair.

_M =

Undocumented