Diff of /src/classify_m.cc [r78] .. [r79]  Maximize  Restore

Switch to side-by-side view

--- a/src/classify_m.cc
+++ b/src/classify_m.cc
@@ -2,6 +2,7 @@
 #include <string.h>
 #include <stdio.h>
 
+#include "full_util.h"
 #include "agf_lib.h"
 
 using namespace std;
@@ -122,14 +123,7 @@
   if (opt_args.normfile!=NULL) {
     mat=read_stats2(opt_args.normfile, ave, nvar1, nvar2);
 
-    for (dim_ta i=0; i<nvar1; i++) {
-      if (ave[i]!=0) {
-        fprintf(stderr, "classify_m: Translation of feature data not supported in multi-borders.  Linear transformation only.\n");
-        exit(PARAMETER_OUT_OF_RANGE);
-      }
-    }
-
-    errcode=classifier->ltran(mat, nvar1, nvar2, opt_args.uflag);
+    errcode=classifier->ltran(mat, ave, nvar1, nvar2, opt_args.uflag);
     if (errcode!=0) exit(errcode);
 
     if (classifier->n_feat() != nvar) {
@@ -196,7 +190,11 @@
   delete [] test;
   delete [] outfile;
   delete [] confile;
-  if (opt_args.normfile!=NULL) delete [] opt_args.normfile;
+  if (opt_args.normfile!=NULL) {
+    delete [] opt_args.normfile;
+    delete_matrix(mat);
+    delete [] ave;
+  }
 
   delete classifier;