瀏覽代碼

adapted code towards new gp-hik-core source code

Alexander Freytag 11 年之前
父節點
當前提交
8be6916d09
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      semseg/SemSegContextTree.cpp

+ 6 - 1
semseg/SemSegContextTree.cpp

@@ -1181,7 +1181,12 @@ void SemSegContextTree::train (const MultiDataset *md)
       }
     }
 
-    fasthik->train(globalCategorFeats, ys);
+    //NOTE
+    // Compiler doesn't know how to automatically convert
+    // std::vector<T*> to std::vector<T const*> because the way
+    // the template system works means that in theory the two may
+    // be specialised differently.  This is an explicit conversion.
+    fasthik->train( reinterpret_cast<vector<const NICE::SparseVector *>&>(globalCategorFeats), ys);
     
   }