(self,times)
mu must be less than 0.
mu must be less than 0.
mu must be less than 0 .
def _generate_sample_path_with_absorption(self,times):
        "mu must be less than 0."
        if self.mu>=0:
            print "Attn: mu must be less than 0. It is currently %f."%self.mu
        else:
            if not self.conditional:
                path=[]
                X=self.startPosition
                t=self.startTime
                tauEst=times[-1]+1
                for time in times:
                    delta = float(time - t)
                    if tauEst>times[-1]:
                        p_a = gammaincc(abs(self.mu),0.5*X/(delta))
                        if np.random.rand() < p_a:
                            tauEst = time
                    if time<tauEst:
                        Y = self.InGamma.rvs(abs(self.mu),0.5*X/(delta))
                        X = self.Gamma.rvs(Y+1)*2*delta
                    else:
                        X=0
                    t=time
                    path.append((t,X))
            else:
                path = bridge_creation(self, times, 1)
            return  [(p[0],self.rescalePath(p[1])) for p in path]
def _generate_sample_path_with_absorption ( self , times ) : if self . mu >= 0 : print "Attn: mu must be less than 0. It is currently %f." % self . mu else : if not self . conditional : path = [ ] X = self . startPosition t = self . startTime tauEst = times [ - 1 ] + 1 for time in times : delta = float ( time - t ) if tauEst > times [ - 1 ] : p_a = gammaincc ( abs ( self . mu ) , 0.5 * X / ( delta ) ) if np . random . rand ( ) < p_a : tauEst = time if time < tauEst : Y = self . InGamma . rvs ( abs ( self . mu ) , 0.5 * X / ( delta ) ) X = self . Gamma . rvs ( Y + 1 ) * 2 * delta else : X = 0 t = time path . append ( ( t , X ) ) else : path = bridge_creation ( self , times , 1 ) return [ ( p [ 0 ] , self . rescalePath ( p [ 1 ] ) ) for p in path ]