diff options
author | Jake Hofman <jhofman+github@gmail.com> | 2011-08-03 23:39:34 +0400 |
---|---|---|
committer | John <jl@hunch.net> | 2011-08-04 04:08:12 +0400 |
commit | fc38a0610a06838555059fc68198eb794ebc55c6 (patch) | |
tree | 28730d926a80131c6937615d5e2b2e15b6cd649e /sender.cc | |
parent | f7c683ee47ed080521fd0a4c90169debb3df76cd (diff) |
persistent daemon should be working ...
Diffstat (limited to 'sender.cc')
-rw-r--r-- | sender.cc | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -94,13 +94,18 @@ void parse_send_args(po::variables_map& vm, vector<string> pairs) void send_features(int i, int j, io_buf *b, example* ec) { - output_byte(*b,ec->indices.index()); + // note: subtracting 1 b/c not sending constant + output_byte(*b,ec->indices.index()-1); - for (size_t* index = ec->indices.begin; index != ec->indices.end; index++) + for (size_t* index = ec->indices.begin; index != ec->indices.end; index++) { + if (*index == constant_namespace) + continue; + if (second_of_pair[*index]) output_features(*b, *index, ec->subsets[*index][j*d_1], ec->subsets[*index][(j+1)*d_1]); else output_features(*b, *index, ec->subsets[*index][i*d_2], ec->subsets[*index][(i+1)*d_2]); + } b->flush(); } |