changeset 10:3ab41608a474

added ignore flag for first column of features (not working yet)
author mas01mc
date Thu, 26 Jul 2007 06:58:39 +0000
parents 378c2483c926
children 3d134836ea14
files audioDB.cpp audioDB.h gengetopt.in
diffstat 3 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.cpp	Wed Jul 25 16:06:21 2007 +0000
+++ b/audioDB.cpp	Thu Jul 26 06:58:39 2007 +0000
@@ -135,7 +135,8 @@
   isClient(0),
   isServer(0),
   port(0),
-  timesTol(0.1){
+  timesTol(0.1),
+  ignoreCols(0){
   
   if(processArgs(argc, argv)<0){
     printf("No command found.\n");
@@ -282,6 +283,15 @@
    }
    return 0;
  }
+ 
+ if(args_info.ignore_given){
+   ignoreCols=args_info.ignore_arg;
+   if(ignoreCols<0 || ignoreCols>100){
+     if(verbose)
+       cout << "warning: ignoring ignore which is out of range:" << ignoreCols << endl;
+     ignoreCols=0;
+   }
+ }
 
  if(args_info.BATCHINSERT_given){
    command=COM_BATCHINSERT;
--- a/audioDB.h	Wed Jul 25 16:06:21 2007 +0000
+++ b/audioDB.h	Thu Jul 26 06:58:39 2007 +0000
@@ -208,6 +208,7 @@
   unsigned isServer;
   unsigned port;
   double timesTol;
+  unsigned ignoreCols;
 
   // Timers
   struct timeval tv1;
--- a/gengetopt.in	Wed Jul 25 16:06:21 2007 +0000
+++ b/gengetopt.in	Thu Jul 26 06:58:39 2007 +0000
@@ -17,7 +17,8 @@
 #     -F --featureList featureList.txt 
 #     -K --keyList keyList.txt
 #     -T --timePointsList.txt
-#     -B --BATCHINSERT dbName 
+#     -B --BATCHINSERT dbName
+#     -g --ignore n feature columns 
 #
 #     -Q --QUERY {point|segment|sequence} 
 #     -p --qpoint - ordinal position of query vector in feature input file
@@ -48,6 +49,7 @@
 option "L2NORM" L "unit norm vectors and norm all future inserts." dependon="database" optional
 section "Database Insertion" sectiondesc="The following commands insert feature files, with optional keys and timestamps.\n"
 option "INSERT"      I "add feature vectors to an existing database." dependon="features" optional
+option "ignore"      g "ignore n columns" int typestr="num columns" default="0" dependon="features" optional hidden
 option "UPDATE"      U "replace inserted vectors associated with key with new input vectors." dependon="features" dependon="key" dependon="database" optional hidden
 option "features" f "binary series of vectors file {int sz:ieee double[][sz]:eof}." string typestr="filename" dependon="database" optional
 option "times"    t "list of time points (ascii) for feature vectors." string typestr="filename" dependon="features" optional