Compare commits

...

2 Commits

Author SHA1 Message Date
ee3dac788e modified: dataset_for_anchor.txt 2025-06-04 11:09:07 +08:00
ea6b651e97 modified: anchor.py 2025-06-04 11:08:54 +08:00
2 changed files with 15 additions and 14 deletions

View File

@ -105,15 +105,18 @@ def handle_cas(args):
t_max = 0
t_min = float('inf')
for p in paths:
nt = p.split(':')
if len(nt) < 2:
continue
# observed adoption/participant
nodes = p.split(':')[0].split('/')
time_now = int(p.split(':')[1])
nodes =nt[0].split('/')
time_now = int(nt[1])
if time_now > t_max:
t_max = time_now
if time_now < t_min:
t_min = time_now
node = nodes[-1]
node_id = int(node)
node_id = node
if time_now > obs_time and obs_time != -1:
continue
@ -243,7 +246,7 @@ def get_t0(args):
if time_now < t_min:
t_min = time_now
node = nodes[-1]
node_id = int(node)
node_id = node
cas_set.add(node_id)
times.append(time_now)
counts.append(len(cas_set))
@ -506,5 +509,3 @@ if __name__ == '__main__':
prepare = get_t0(args)
analyse_result(A, user_event_dict, prepare, args)

File diff suppressed because one or more lines are too long