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:
authorJohn Langford <jl@hunch.net>2010-04-20 07:20:21 +0400
committerJohn Langford <jl@hunch.net>2010-04-20 07:20:21 +0400
commit82b18203557e8da5534cbe97053f7278ee27485a (patch)
treee7aa31f94f7e008223779f34ed94ac337914a67c /cache.cc
parent779c3433bc7819b082f8bb18ff10d74e51ae848b (diff)
deleted debian-specific and tweaked n/skip generation so it made sense. Must debug further.
Diffstat (limited to 'cache.cc')
-rw-r--r--cache.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/cache.cc b/cache.cc
index 420cf81b..e466a7f9 100644
--- a/cache.cc
+++ b/cache.cc
@@ -44,6 +44,7 @@ size_t read_cached_tag(io_buf& cache, example* ae)
int read_cached_features(parser* p, void* ec)
{
example* ae = (example*)ec;
+ ae->sorted = p->sorted_cache;
size_t mask = global.mask;
io_buf* input = p->input;
@@ -102,6 +103,8 @@ int read_cached_features(parser* p, void* ec)
}
size_t diff = f.weight_index >> 2;
int32_t s_diff = ZigZagDecode(diff);
+ if (s_diff < 0)
+ ae->sorted = false;
f.weight_index = last + s_diff;
last = f.weight_index;
f.weight_index = f.weight_index & mask;
@@ -113,14 +116,6 @@ int read_cached_features(parser* p, void* ec)
return total;
}
-int read_and_order_cached_features(parser* p, void* ec)
-{
- int ret = read_cached_features(p,ec);
- unique_sort_features(p,(example*)ec);
- return ret;
-}
-
-
char* run_len_encode(char *p, size_t i)
{// store an int 7 bits at a time.
while (i >= 128)