summaryrefslogtreecommitdiff
path: root/utils/feature_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/feature_vector.h')
-rwxr-xr-xutils/feature_vector.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/feature_vector.h b/utils/feature_vector.h
new file mode 100755
index 00000000..be378a6a
--- /dev/null
+++ b/utils/feature_vector.h
@@ -0,0 +1,18 @@
+#ifndef _FEATURE_VECTOR_H_
+#define _FEATURE_VECTOR_H_
+
+#include <vector>
+#include "sparse_vector.h"
+#include "fdict.h"
+
+typedef double Featval;
+typedef SparseVectorList<Featval> FeatureVectorList;
+typedef SparseVector<Featval> FeatureVector;
+typedef SparseVector<Featval> WeightVector;
+typedef std::vector<Featval> DenseWeightVector;
+
+inline void sparse_to_dense(WeightVector const& wv,DenseWeightVector *dv) {
+ wv.init_vector(dv);
+}
+
+#endif