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>2011-03-27 21:29:37 +0400
committerJohn Langford <jl@hunch.net>2011-03-27 21:29:37 +0400
commitec17e4c603242c5185e4e018183adf1dc110f930 (patch)
treef2609f0a96b373e9e8f1d1b68cfcf8c716407e28 /parser.cc
parent7d5ef416fa695802caafb16136c6b749112ea19b (diff)
made --ignore fast and updated LDA code.
Diffstat (limited to 'parser.cc')
-rw-r--r--parser.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/parser.cc b/parser.cc
index 3671229c..600d5bac 100644
--- a/parser.cc
+++ b/parser.cc
@@ -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