Changeset: 29a04b178d38 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29a04b178d38
Modified Files:
monetdb5/extras/rdf/rdfschema.c
monetdb5/extras/rdf/rdfschema.h
Branch: rdf
Log Message:
Only consider small CS for dimension CS.
In merging two CSs, if one of them is Dimension CS, then the merged CS is also
an dimension CS.
(This works particularly for LUBM).
Currently, only S1 allows merging for Dimension CS
diffs (48 lines):
diff --git a/monetdb5/extras/rdf/rdfschema.c b/monetdb5/extras/rdf/rdfschema.c
--- a/monetdb5/extras/rdf/rdfschema.c
+++ b/monetdb5/extras/rdf/rdfschema.c
@@ -542,7 +542,7 @@ void getIRNums(CSrel *csrelSet, CSset *f
for (i = 0; i < num; i++){
lastIRScores[i] = curIRScores[i];
}
-
+
/*
printf(" ======== After %d iteration \n", k);
for (i = 0; i < num; i++){
@@ -573,9 +573,12 @@ void updateFreqCStype(CSset *freqCSset,
printf("List of dimension tables: \n");
for (i = 0; i < num; i++){
+ #if ONLY_SMALLTBL_DIMENSIONTBL
+ if (freqCSset->items[i].support > MINIMUM_TABLE_SIZE) continue;
+ #endif
if (refCount[i] < freqCSset->items[i].support) continue;
if (curIRScores[i] < threshold) continue;
-
+
freqCSset->items[i].type = DIMENSIONCS;
//printf("A dimension CS with IR score = %f \n",
curIRScores[i]);
printf(" %d ", i);
@@ -1630,7 +1633,7 @@ CS* mergeTwoCSs(CS cs1, CS cs2, int freq
int numCombineP = 0;
CS *mergecs = (CS*) malloc (sizeof (CS));
- if (cs1.type == DIMENSIONCS && cs2.type == DIMENSIONCS)
+ if (cs1.type == DIMENSIONCS || cs2.type == DIMENSIONCS)
mergecs->type = DIMENSIONCS;
else
mergecs->type = (char)MERGECS;
diff --git a/monetdb5/extras/rdf/rdfschema.h b/monetdb5/extras/rdf/rdfschema.h
--- a/monetdb5/extras/rdf/rdfschema.h
+++ b/monetdb5/extras/rdf/rdfschema.h
@@ -135,7 +135,8 @@ typedef struct PropStat {
/* ---- For detecting dimension table */
#define NUM_ITERATION_FOR_IR 3 /* Number of iteration for
indirect referrences to a CS (table) */
-
+#define ONLY_SMALLTBL_DIMENSIONTBL 1 /* Only small tables are considered to
be dimension table
+ Small table is the one that have
support < MINIMUM_TABLE_SIZE */
#define IR_DIMENSION_THRESHOLD_PERCENTAGE 0.10
//#define IR_DIMENSION_THRESHOLD_PERCENTAGE 0.02 // Score of indirect
references that the CS can be considered as a dimension CS
//
IR_DIMENSION_THRESHOLD_PERCENTAGE * totalFrequency
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list