Package pylal :: Module ligolw_dataUtils :: Class OffsetVector
[hide private]
[frames] | no frames]

Class OffsetVector

source code

object --+    
         |    
      dict --+
             |
            OffsetVector

Instance Methods [hide private]
new empty dictionary

__init__(self, offset_dict)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__eq__(self, other)
The default equality test is to consider two vectors to be equal only if all ifos are the same and all offsets are the same.
source code
 
__ne__(self, other)
x!=y
source code
 
__hash__(self)
hash(x)
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, 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__

Class Variables [hide private]
  weak_equality = False
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, offset_dict)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__eq__(self, other)
(Equality operator)

source code 

The default equality test is to consider two vectors to be equal only if all ifos are the same and all offsets are the same. If one vector is a subset of the other vector, they will not be considered equal. However, if the class attribute weak_equality is set to True, only offsets of the ifos that are both in self and other will be checked. For example: >>> a = OffsetVector({'H1': 0, 'L1': 5}) >>> b = OffsetVector({'H1': 0, 'L1': 5, 'V1': 10}) >>> a == b False >>> OffsetVector.weak_equality = True >>> a == b True

Overrides: dict.__eq__

__ne__(self, other)

source code 

x!=y

Overrides: dict.__ne__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)