Definition at line 10 of file EI_Lib.py.
◆ __init__()
def python.EI_Lib.IOV.__init__ |
( |
|
self | ) |
|
◆ add()
def python.EI_Lib.IOV.add |
( |
|
self, |
|
|
|
key, |
|
|
|
value, |
|
|
|
interval |
|
) |
| |
Definition at line 55 of file EI_Lib.py.
55 def add(self, key, value, interval):
56 if key
not in self._iovs:
60 if len(interval) != 4:
61 raise TypeError(
"interval must contain 4 elements")
63 raise TypeError(
"interval must be a tuple or list")
68 for number
in interval:
69 interval2.append(
int(number))
71 raise TypeError(
"interval ranges must be a integers or longs")
73 self._iovs[key].
append((interval2, value))
◆ cmpBN()
def python.EI_Lib.IOV.cmpBN |
( |
|
self, |
|
|
|
a, |
|
|
|
b |
|
) |
| |
Definition at line 18 of file EI_Lib.py.
18 def cmpBN(self, a, b):
28 raise TypeError(
"element must be a tuple with two components")
◆ dump()
def python.EI_Lib.IOV.dump |
( |
|
self | ) |
|
Definition at line 75 of file EI_Lib.py.
78 for e
in self._iovs[k]:
◆ get()
def python.EI_Lib.IOV.get |
( |
|
self, |
|
|
|
key, |
|
|
|
point |
|
) |
| |
Definition at line 81 of file EI_Lib.py.
81 def get(self, key, point):
82 if key
not in self._iovs:
84 if key
in self._cached:
85 i, v = self._cached[key]
86 if self.isInInterval(point, i):
88 ivalues = self._iovs[key]
90 if self.isInInterval(point, i):
91 self._cached[key] = (i, v)
◆ isInInterval()
def python.EI_Lib.IOV.isInInterval |
( |
|
self, |
|
|
|
point, |
|
|
|
interval |
|
) |
| |
Definition at line 36 of file EI_Lib.py.
36 def isInInterval(self, point, interval):
39 if len(interval) != 4:
40 raise TypeError(
"interval must contain 4 elements")
42 raise TypeError(
"interval must be a tuple or list")
50 if self.cmpBN(point, i1) >= 0
and self.cmpBN(point, i2) < 0:
◆ _cached
dictionary python.EI_Lib.IOV._cached = {} |
|
staticprivate |
◆ _iovs
dictionary python.EI_Lib.IOV._iovs = {} |
|
staticprivate |
The documentation for this class was generated from the following file: