Skip to content

Commit d248a8f

Browse files
BF: updating active set
1 parent f432b42 commit d248a8f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

selectiveInference/src/debias.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,20 @@ int update_ever_active(int coord,
6969
active_var = (*ever_active_ptr_tmp);
7070
if (active_var == coord) {
7171

72-
// Add it to the active set and increment the
73-
// number of active variables
74-
75-
ever_active_ptr_tmp = ((int *) ever_active_ptr + *nactive_ptr);
76-
*ever_active_ptr_tmp = coord;
77-
*nactive_ptr += 1;
78-
7972
return(1);
8073
}
8174
}
8275

76+
// If we have not returned yet, this variable
77+
// was not in ever_active
78+
79+
// Add it to the active set and increment the
80+
// number of active variables
81+
82+
ever_active_ptr_tmp = ((int *) ever_active_ptr + *nactive_ptr);
83+
*ever_active_ptr_tmp = coord;
84+
*nactive_ptr += 1;
85+
8386
return(0);
8487
}
8588

0 commit comments

Comments
 (0)