Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHal Daume III <me@hal3.name>2012-11-19 04:21:59 +0400
committerHal Daume III <me@hal3.name>2012-11-19 04:21:59 +0400
commitb8abe18c8544f443268382eabf789c5361d12dab (patch)
tree7db62a048254490db739e5014a80b975a68be37b /vowpalwabbit/vw.h
parent442a943a6018371ba667dbf3ec6ef8e360937213 (diff)
parent29b4523b4e931e4ce4d6bf3b50f8fa6a5771047f (diff)
merged john's changes, everything works except cubic features
Diffstat (limited to 'vowpalwabbit/vw.h')
-rw-r--r--vowpalwabbit/vw.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/vowpalwabbit/vw.h b/vowpalwabbit/vw.h
index bb635a1b..a4b8401b 100644
--- a/vowpalwabbit/vw.h
+++ b/vowpalwabbit/vw.h
@@ -1,10 +1,8 @@
/*
-Copyright (c) 2012 Microsoft. All rights reserved. The copyrights
-embodied in the content of this file are licensed under the BSD
-(revised) open source license
+Copyright (c) by respective owners including Yahoo!, Microsoft, and
+individual contributors. All rights reserved. Released under a BSD
+license as described in the file LICENSE.
*/
-
-
#ifndef VW_H
#define VW_H
@@ -46,7 +44,7 @@ namespace VW {
substring ss;
ss.begin = (char*)s.c_str();
ss.end = ss.begin + s.length();
- return all.p->hasher(ss,hash_base);
+ return (uint32_t)all.p->hasher(ss,hash_base);
}
//Then use it as the seed for hashing features.
inline uint32_t hash_feature(vw& all, string s, unsigned long u)
@@ -54,7 +52,7 @@ namespace VW {
substring ss;
ss.begin = (char*)s.c_str();
ss.end = ss.begin + s.length();
- return all.p->hasher(ss,u) & all.parse_mask;
+ return (uint32_t)(all.p->hasher(ss,u) & all.parse_mask);
}
inline uint32_t hash_feature_cstr(vw& all, char* fstr, unsigned long u)
@@ -62,7 +60,7 @@ namespace VW {
substring ss;
ss.begin = fstr;
ss.end = ss.begin + strlen(fstr);
- return all.p->hasher(ss,u) & all.parse_mask;
+ return (uint32_t)(all.p->hasher(ss,u) & all.parse_mask);
}
//after you create and fill feature_spaces, get an example with everything filled in.