diff options
author | Hal Daume III <me@hal3.name> | 2012-11-19 04:21:59 +0400 |
---|---|---|
committer | Hal Daume III <me@hal3.name> | 2012-11-19 04:21:59 +0400 |
commit | b8abe18c8544f443268382eabf789c5361d12dab (patch) | |
tree | 7db62a048254490db739e5014a80b975a68be37b /vowpalwabbit/vw.h | |
parent | 442a943a6018371ba667dbf3ec6ef8e360937213 (diff) | |
parent | 29b4523b4e931e4ce4d6bf3b50f8fa6a5771047f (diff) |
merged john's changes, everything works except cubic features
Diffstat (limited to 'vowpalwabbit/vw.h')
-rw-r--r-- | vowpalwabbit/vw.h | 14 |
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. |