summaryrefslogtreecommitdiff
path: root/utils/feature_vector.h
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-11 02:37:10 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-11 02:37:10 +0000
commit80686d4e567bae579ea39e009826a2de92cd4ace (patch)
treec3c35fcba57dde423a248f38aa121ad197c79734 /utils/feature_vector.h
parent3c85c407c333899f6b4bc26632d312b8e568b638 (diff)
major refactor, break bad circular deps
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@509 ec762483-ff6d-05da-a07a-a48fb63a330f
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