diff options
author | John Langford <jl@hunch.net> | 2011-03-27 21:29:37 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2011-03-27 21:29:37 +0400 |
commit | ec17e4c603242c5185e4e018183adf1dc110f930 (patch) | |
tree | f2609f0a96b373e9e8f1d1b68cfcf8c716407e28 /parser.cc | |
parent | 7d5ef416fa695802caafb16136c6b749112ea19b (diff) |
made --ignore fast and updated LDA code.
Diffstat (limited to 'parser.cc')
-rw-r--r-- | parser.cc | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -545,17 +545,16 @@ void setup_example(parser* p, example* ae) p->t += ae->global_weight; ae->example_t = p->t; - if (! global.ignore.empty()) + if (global.ignore_some) { for (size_t* i = ae->indices.begin; i != ae->indices.end; i++) - for (vector<unsigned char>::iterator j = global.ignore.begin(); j != global.ignore.end();j++) - if (*i == *j) - {//delete namespace - ae->atomics[*i].erase(); - memmove(i,i+1,ae->indices.end - (i+1)); - ae->indices.end--; - i--; - } + if (global.ignore[*i]) + {//delete namespace + ae->atomics[*i].erase(); + memmove(i,i+1,ae->indices.end - (i+1)); + ae->indices.end--; + i--; + } } //add constant feature |