Changeset: baf530118f87 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=baf530118f87
Added Files:
        monetdb5/extras/rdf/rdfparams.c
        monetdb5/extras/rdf/rdfparams.h
Modified Files:
        monetdb5/extras/rdf/rdfschema.c
Branch: rdf
Log Message:

Add missing files


diffs (148 lines):

diff --git a/monetdb5/extras/rdf/rdfparams.c b/monetdb5/extras/rdf/rdfparams.c
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/rdf/rdfparams.c
@@ -0,0 +1,65 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
+/* This contains graph algorithms for the graph formed by CS's and their 
relationships */
+
+#include "monetdb_config.h"
+#include "mal_exception.h"
+#include "url.h"
+#include "tokenizer.h"
+#include <gdk.h>
+#include <rdfparams.h>
+#include <string.h>
+
+int dimensionFactor; 
+float ontologySimThreshold; 
+
+void createDefaultParamsFile(void){
+       
+       FILE *paramFile;
+       
+       paramFile = fopen("params.ini", "wt");
+       
+       fprintf(paramFile, "dimensionFactor 3\n");
+       fprintf(paramFile, "ontologySimThreshold 0.8\n");
+
+       fclose(paramFile); 
+}
+
+void readParamsInput(void){
+       FILE *pf;
+       char variable[80];
+       char value[80];
+
+       pf = fopen("params.ini","r");
+
+       while (!feof(pf)){
+               if(fscanf(pf, "%s %s", variable, value) == 2){
+                       if (strcmp(variable, "dimensionFactor") == 0){
+                               dimensionFactor = atoi(value);
+                               printf("dimensionFactor = 
%d\n",dimensionFactor);
+                       }
+                       else if (strcmp(variable, "ontologySimThreshold") == 0){
+                               ontologySimThreshold = atof(value);
+                               printf("ontologySimThreshold = 
%f\n",ontologySimThreshold);
+                       }
+               }
+       }
+
+}
diff --git a/monetdb5/extras/rdf/rdfparams.h b/monetdb5/extras/rdf/rdfparams.h
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/rdf/rdfparams.h
@@ -0,0 +1,43 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2013 MonetDB B.V.
+ * All Rights Reserved.
+ */
+
+#ifndef _RDFPARAMS_H_
+#define _RDFPARAMS_H_
+
+#ifdef WIN32
+#ifndef LIBRDF
+#define rdf_export extern __declspec(dllimport)
+#else
+#define rdf_export extern __declspec(dllexport)
+#endif
+#else
+#define rdf_export extern
+#endif
+
+
+extern int dimensionFactor; 
+extern float ontologySimThreshold;
+
+rdf_export void
+createDefaultParamsFile(void);
+
+rdf_export void
+readParamsInput(void);
+
+#endif /* _RDFPARAMS_H_ */
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
@@ -563,7 +563,7 @@ void getIRNums(CSrel *csrelSet, CSset *f
 
 
 static 
-void updateFreqCStype(CSset *freqCSset, int num,  float *curIRScores, int 
*refCount, int nIterIR){
+void updateFreqCStype(CSset *freqCSset, int num,  float *curIRScores, int 
*refCount){
 
        int     i; 
        int     numDimensionCS = 0; 
@@ -9399,7 +9399,7 @@ RDFextractCSwithTypes(int *ret, bat *sba
 
        getOrigRefCount(csrelSet, freqCSset, freqCSset->numCSadded, refCount);  
        getIRNums(csrelSet, freqCSset, freqCSset->numCSadded, refCount, 
curIRScores, nIterIR);  
-       updateFreqCStype(freqCSset, freqCSset->numCSadded, curIRScores, 
refCount, nIterIR);
+       updateFreqCStype(freqCSset, freqCSset->numCSadded, curIRScores, 
refCount);
 
        free(refCount); 
        free(curIRScores);
@@ -9603,7 +9603,7 @@ RDFextractCSwithTypes(int *ret, bat *sba
 
        getOrigRefCount(*csRelMergeFreqSet, freqCSset, freqCSset->numCSadded, 
refCount);  
        getIRNums(*csRelMergeFreqSet, freqCSset, freqCSset->numCSadded, 
refCount, curIRScores, nIterIR);  
-       updateFreqCStype(freqCSset, freqCSset->numCSadded, curIRScores, 
refCount, nIterIR);
+       updateFreqCStype(freqCSset, freqCSset->numCSadded, curIRScores, 
refCount);
 
        free(refCount); 
        free(curIRScores);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to