Changeset: b82510a12199 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b82510a12199
Modified Files:
        monetdb5/extras/crackers/crackers_holistic.c
        monetdb5/extras/crackers/crackers_selecthol_ops.mx
Branch: holindex
Log Message:

The same initialization function will be used both in the 1st and in the 2nd 
cost model.


diffs (70 lines):

diff --git a/monetdb5/extras/crackers/crackers_holistic.c 
b/monetdb5/extras/crackers/crackers_holistic.c
--- a/monetdb5/extras/crackers/crackers_holistic.c
+++ b/monetdb5/extras/crackers/crackers_holistic.c
@@ -43,7 +43,6 @@ getFrequencyStruct(char which)
        return *theNode;
 }
 
-/*this function pushes nodes in the list in the second experiment (2nd cost 
model)*/
 void 
 push(int bat_id,FrequencyNode* head)
 {
@@ -58,7 +57,7 @@ push(int bat_id,FrequencyNode* head)
        head->next=new_node; 
 }
 
-/*this function pushes nodes in the list in the first experiment (1st cost 
model)*/
+/*this function pushes nodes in the list in the first and the second 
experiment (1st & 2nd cost model)*/
 void 
 push_2(int bat_id,FrequencyNode* head,int N,int L1)
 {
@@ -66,9 +65,9 @@ push_2(int bat_id,FrequencyNode* head,in
        new_node=(FrequencyNode *) GDKmalloc(sizeof(FrequencyNode));
        new_node->bid=bat_id;
        new_node->c=1;
-       new_node->f1=0;
+       new_node->f1=1;
        new_node->f2=0;
-       new_node->weight=N-L1;
+       new_node->weight=new_node->f1*(N-L1);
        new_node->next=head->next;
        head->next=new_node; 
 }
@@ -201,7 +200,6 @@ deleteNode(FrequencyNode* head,int bat_i
 
 }
 
-/*this function initializes the list in the second experiment (2nd cost 
model)*/
 str 
 CRKinitFrequencyStruct(int *vid,int *bid)
 {
@@ -213,7 +211,7 @@ CRKinitFrequencyStruct(int *vid,int *bid
 }
 
 
-/*this function initializes the list in the first experiment (1st cost model)*/
+/*this function initializes the list in the first & second experiment(1st & 
2nd cost model)*/
 str 
 CRKinitFrequencyStruct_2(int *vid,int *bid,int* N,int* L1)
 {
diff --git a/monetdb5/extras/crackers/crackers_selecthol_ops.mx 
b/monetdb5/extras/crackers/crackers_selecthol_ops.mx
--- a/monetdb5/extras/crackers/crackers_selecthol_ops.mx
+++ b/monetdb5/extras/crackers/crackers_selecthol_ops.mx
@@ -353,7 +353,7 @@ createView:
                        countBatElements=BATcount(b);
                        /*fprintf(stderr,"BATcount(b)=%d",countBatElements);*/
                        /*FN->f1 = FN->f1 + 1;*/
-                       FN->weight = changeWeight_1(FN,countBatElements,L1);    
+                       FN->weight = changeWeight_2(FN,countBatElements,L1);    
 
                        if ((c = BATdescriptor(CrackerIndex[m].cid)) == NULL)
                                throw(MAL, "crackers.crackRange", "Cannot 
access crack index");
@@ -566,7 +566,7 @@ createView:
        countBatElements=BATcount(b);
        /*fprintf(stderr,"BATcount(b)=%d\n",countBatElements);*/
        if(FN->weight >= 0)
-               FN->weight = changeWeight_1(FN,countBatElements,L1);
+               FN->weight = changeWeight_2(FN,countBatElements,L1);
        /*if(FN->weight <0)
                deleteNode(FrequencyStructA,FN->bid);
        */
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to