Lists/dictionaries/Lin-Kernighan

Alex cut_me_out at hotmail.com
Sun Sep 3 14:04:50 EDT 2000


Perhaps this automatically disqualifies me from contributing to your
problem, but what's k, here?

> If I use a list of [cost, label] lists I can use the sort method to
> identify the node with lowest cost, but updating the costs is less
> efficient.

A bit, but I'd be suprised if you could escape doing something like
this.  Perhaps by bucketing the (cost, list) pairs you could make the
updating more efficient.  That would depend on how well you know the
distribution of  costs, I suppose.

Alex.

-- 
The chain of destiny can only be grasped one link at a time.  
-- Sir Winston Churchill



More information about the Python-list mailing list