A dictionary associating a unique label and numeric offset with each
of a set of segmentlist objects.
This class implements a standard mapping interface, with additional
features added to assist with the manipulation of a collection of
segmentlist objects. In particular, methods for taking unions and
intersections of the lists in the dictionary are available, as well as
the ability to record and apply numeric offsets to the boundaries of the
segments in each list.
The numeric offsets are stored in the "offsets" attribute,
which itself is a dictionary, associating a number with each key in the
main dictionary. Assigning to one of the entries of the offsets
attribute has the effect of shifting the corresponding segmentlist from
its original position (not its current position) by the given amount.
|
__abs__(self)
Return a dictionary of the results of running .abs() on each of the
segmentlists. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
new empty dictionary
|
__init__(self,
*args)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all_intersects(self,
other)
Returns True if each segmentlist in self intersects the corresponding
segmentlist in other; returns False if this is not the case or if
self is empty. |
source code
|
|
|
all_intersects_all(self,
other)
Returns True if self and other have the same keys, and each
segmentlist intersects the corresponding segmentlist in the other;
returns False if this is not the case or if either dictionary is
empty. |
source code
|
|
|
coalesce(self)
Run .coalesce() on all segmentlists. |
source code
|
|
|
contract(self,
x)
Run .contract(x) on all segmentlists. |
source code
|
|
a shallow copy of D
|
copy(self,
keys=None)
Return a copy of the segmentlistdict object. |
source code
|
|
|
extend(self,
other)
Appends the segmentlists from other to the corresponding segmentlists
in self, adding new segmentslists to self as needed. |
source code
|
|
|
extent(self)
Return a dictionary of the results of running .extent() on each of
the segmentlists. |
source code
|
|
|
extent_all(self)
Return the result of running .extent() on the union of all lists in
the dictionary. |
source code
|
|
|
extract_common(self,
keys)
Return a new segmentlistdict containing only those segmentlists
associated with the keys in keys, with each set to their mutual
intersection. |
source code
|
|
|
find(self,
item)
Return a dictionary of the results of running .find() on each of the
segmentlists. |
source code
|
|
|
intersection(self,
keys)
Return the intersection of the segmentlists associated with the keys
in keys. |
source code
|
|
|
intersects(self,
other)
Returns True if there exists a segmentlist in self that intersects
the corresponding segmentlist in other; returns False otherwise. |
source code
|
|
|
intersects_all(self,
other)
Returns True if each segmentlist in other intersects the
corresponding segmentlist in self; returns False if this is not the
case, or if other is empty. |
source code
|
|
|
intersects_segment(self,
seg)
Returns True if any segmentlist in self intersects the segment,
otherwise returns False. |
source code
|
|
|
is_coincident(self,
other,
keys=None)
Return True if any segment in any list in self intersects any segment
in any list in other. |
source code
|
|
|
keys_at(self,
x)
Return a list of the keys for the segment lists that contain x. |
source code
|
|
|
map(self,
func)
Return a dictionary of the results of func applied to each of the
segmentlist objects in self. |
source code
|
|
|
protract(self,
x)
Run .protract(x) on all segmentlists. |
source code
|
|
|
union(self,
keys)
Return the union of the segmentlists associated with the keys in
keys. |
source code
|
|
Inherited from dict :
__cmp__ ,
__contains__ ,
__eq__ ,
__ge__ ,
__getattribute__ ,
__getitem__ ,
__gt__ ,
__iter__ ,
__le__ ,
__len__ ,
__lt__ ,
__ne__ ,
__repr__ ,
__sizeof__ ,
clear ,
fromkeys ,
get ,
has_key ,
items ,
iteritems ,
iterkeys ,
itervalues ,
keys ,
pop ,
popitem ,
setdefault ,
update ,
values ,
viewitems ,
viewkeys ,
viewvalues
Inherited from object :
__delattr__ ,
__format__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__ ,
__subclasshook__
|