ePrivacy and GPDR Cookie Consent by Cookie Consent

Implementation of sets using sorted lists

Implementation of sets using sorted lists 1.1

Implementation of sets using sorted lists 1.1 Download Summary

  • Language: Python
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • License: Other Free / Open Source License - Python License
  • Databases: N/A
  • Downloads: 375
  • Released: Jun 7, 2007

Implementation of sets using sorted lists 1.1 Description

This script implements set operations using sorted lists as the underlying data structure.

Advantages:
- Space savings -- lists are much more compact than a dictionary based implementation.
- Flexibility -- elements do not need to be hashable, only __cmp__ is required.
- Fast operations depending on the underlying data patterns.
- Non-overlapping sets get united, intersected, or differenced with only log(N) element comparisons.Results are built using fast-slicing.
- Algorithms are designed to minimize the number of compares which can be expensive.
- Natural support for sets of sets. No special accomodation needs to be made to use a set or dict as a set member, but users need to be careful to not mutate a member of a set since that may breaks its sort invariant.
Disadvantages: 
-  Set construction uses list.sort() with potentially N log(N) comparisons.
- Membership testing and element addition use log(N) comparisons. Element addition uses list.insert() with takes O(N) time.

Implementation of sets using sorted lists 1.1 Keywords

free download

Implementation of sets using sorted lists Bookmark

Hyperlink code:
Hyperlink for Forum code:

Implementation of sets using sorted lists 1.1 Script Download Notice

Top 4 Download periodically updates information of Implementation of sets using sorted lists 1.1 script from the developer, but some information may be slightly out-of-date.

Our script download links are directly from our mirrors or publisher's website. Implementation of sets using sorted lists 1.1 torrent files or shared files from free file sharing and free upload services, including Rapidshare, MegaUpload, YouSendIt, MailBigFile, DropSend, HellShare, HotFile, FileServe, MediaMax, zUpload, MyOtherDrive, SendSpace, DepositFiles, Letitbit, LeapFile, DivShare or MediaFire, are not allowed!

Convex hull and diameter of 2d point sets

... points represented as pairs (x,y). The convex hull algorithm is Graham's scan, using a coordinate-based sorted order rather than the more commonly seen radial sorted order. A rotating calipers algorithm generates candidate pairs of vertices for the diameter ...
Python

Merging two sorted iterators

Merging two sorted iterators script provides a mergeiter() function that can merge two iterators into a single iterator. It uses generators, and guarantees constant memory use. ...
Python

Merging sorted iterables

This script helps you to merge sorted iterables, preserving ordering,without consuming iterables (and computing time) unnecessarily. ...
Python

Transposing a List of Lists

... script allows you to transpose a list of lists of different lengths. ...
Python

All k subsets from an n set

... n. There are two methods. The first operates on sets of integers of the form range(n). The seconds operates on arbitrary sets or lists. ...
Python