old_code/current_load.py
def binaryGetStateAtTime(self, atTime):
        """Get the state vector at the specified time by binary search.
        """
        self.checkAndChangeLoads(atTime, None)

        klo = CurrentLoad.startIndex
        khi = len(self.svrdb)
        while khi > klo + 1:
            k = (klo + khi) / 2
            if atTime >= self.stateTime(k):
                klo = k
            else:
                khi = k
        self.currentStateIndex = klo
        return self.svrdb[self.currentStateIndex]
Get the state vector at the specified time by binary search.
        
Get the state vector at the specified time by binary search.
Get the state vector at the specified time by binary search .
def binaryGetStateAtTime(self, atTime):
        self.checkAndChangeLoads(atTime, None)
        klo = CurrentLoad.startIndex
        khi = len(self.svrdb)
        while khi > klo + 1:
            k = (klo + khi) / 2
            if atTime >= self.stateTime(k):
                klo = k
            else:
                khi = k
        self.currentStateIndex = klo
        return self.svrdb[self.currentStateIndex]
def binaryGetStateAtTime ( self , atTime ) : self . checkAndChangeLoads ( atTime , None ) klo = CurrentLoad . startIndex khi = len ( self . svrdb ) while khi > klo + 1 : k = ( klo + khi ) / 2 if atTime >= self . stateTime ( k ) : klo = k else : khi = k self . currentStateIndex = klo return self . svrdb [ self . currentStateIndex ]
Get the state vector at the specified time by binary search.
Get the state vector at the specified time by binary search .
"""Get the state vector at the specified time by binary search.
        """
self
atTime