Compare commits
	
		
			2 Commits
		
	
	
		
			ee7987aca4
			...
			ee3dac788e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ee3dac788e | |||
| ea6b651e97 | 
							
								
								
									
										13
									
								
								anchor.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								anchor.py
									
									
									
									
									
								
							| 
						 | 
					@ -105,15 +105,18 @@ def handle_cas(args):
 | 
				
			||||||
            t_max = 0
 | 
					            t_max = 0
 | 
				
			||||||
            t_min = float('inf')
 | 
					            t_min = float('inf')
 | 
				
			||||||
            for p in paths:
 | 
					            for p in paths:
 | 
				
			||||||
 | 
					                nt = p.split(':')
 | 
				
			||||||
 | 
					                if len(nt) < 2:
 | 
				
			||||||
 | 
					                    continue
 | 
				
			||||||
                # observed adoption/participant
 | 
					                # observed adoption/participant
 | 
				
			||||||
                nodes = p.split(':')[0].split('/')
 | 
					                nodes =nt[0].split('/')
 | 
				
			||||||
                time_now = int(p.split(':')[1])
 | 
					                time_now = int(nt[1])
 | 
				
			||||||
                if time_now > t_max:
 | 
					                if time_now > t_max:
 | 
				
			||||||
                    t_max = time_now
 | 
					                    t_max = time_now
 | 
				
			||||||
                if time_now < t_min:
 | 
					                if time_now < t_min:
 | 
				
			||||||
                    t_min = time_now
 | 
					                    t_min = time_now
 | 
				
			||||||
                node = nodes[-1]
 | 
					                node = nodes[-1]
 | 
				
			||||||
                node_id = int(node)
 | 
					                node_id = node
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                if time_now > obs_time and obs_time != -1:
 | 
					                if time_now > obs_time and obs_time != -1:
 | 
				
			||||||
                    continue
 | 
					                    continue
 | 
				
			||||||
| 
						 | 
					@ -243,7 +246,7 @@ def get_t0(args):
 | 
				
			||||||
                if time_now < t_min:
 | 
					                if time_now < t_min:
 | 
				
			||||||
                    t_min = time_now
 | 
					                    t_min = time_now
 | 
				
			||||||
                node = nodes[-1]
 | 
					                node = nodes[-1]
 | 
				
			||||||
                node_id = int(node)
 | 
					                node_id = node
 | 
				
			||||||
                cas_set.add(node_id) 
 | 
					                cas_set.add(node_id) 
 | 
				
			||||||
                times.append(time_now)
 | 
					                times.append(time_now)
 | 
				
			||||||
                counts.append(len(cas_set))
 | 
					                counts.append(len(cas_set))
 | 
				
			||||||
| 
						 | 
					@ -505,6 +508,4 @@ if __name__ == '__main__':
 | 
				
			||||||
    print("开始分析结果")
 | 
					    print("开始分析结果")
 | 
				
			||||||
    prepare = get_t0(args)
 | 
					    prepare = get_t0(args)
 | 
				
			||||||
    analyse_result(A, user_event_dict, prepare, args)
 | 
					    analyse_result(A, user_event_dict, prepare, args)
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user