summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMendes Oulamara <oulamara@clipper.ens.fr>2013-12-04 16:55:08 +0100
committerMendes Oulamara <oulamara@clipper.ens.fr>2013-12-04 16:55:08 +0100
commit765da0b81086f2c025258507c0ee27e3b3900dfb (patch)
tree7513dd07806a4a44e0d17fbf8a45244b1d9823e1
parent78bac8d58b3ed8d5cdb575c6e3ebd99773e5b336 (diff)
downloadAlgoProg-Projet-765da0b81086f2c025258507c0ee27e3b3900dfb.tar.gz
AlgoProg-Projet-765da0b81086f2c025258507c0ee27e3b3900dfb.zip
Change meaning of heuritic in the elt_of_set_heur function
-rw-r--r--set_bitsets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/set_bitsets.c b/set_bitsets.c
index 53af83a..2c85277 100644
--- a/set_bitsets.c
+++ b/set_bitsets.c
@@ -132,8 +132,8 @@ int elt_of_set(const set s){
int elt_of_set_heur(const set s, int h){
int N=nbCells(s.N), i;
- if(s.tab[h/SCOD]>>(h%SCOD+1) !=0)
- return h + dyadic_val(s.tab[h/SCOD]>>(h%SCOD+1)) + 1;
+ if(s.tab[h/SCOD]>>(h%SCOD) !=0)
+ return h + dyadic_val(s.tab[h/SCOD]>>(h%SCOD)) ;
for(i=0; i<N; i++)
if(s.tab[(i+h/SCOD+1)%N] != 0)