diff options
author | John Langford <jl@nyclamp.(none)> | 2014-01-09 00:01:11 +0400 |
---|---|---|
committer | John Langford <jl@nyclamp.(none)> | 2014-01-09 00:01:11 +0400 |
commit | 5336bffc0d67fb224c90553f4aceaea671bcbd77 (patch) | |
tree | fe79f7ea9074a37b356da7d984a08a216daea040 /vowpalwabbit/lrq.cc | |
parent | e258410d86feda58859ecc695940b816de26a8f2 (diff) |
finished void* removal in learner.h
Diffstat (limited to 'vowpalwabbit/lrq.cc')
-rw-r--r-- | vowpalwabbit/lrq.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vowpalwabbit/lrq.cc b/vowpalwabbit/lrq.cc index 8b9d0fee..7c19ce3f 100644 --- a/vowpalwabbit/lrq.cc +++ b/vowpalwabbit/lrq.cc @@ -62,9 +62,8 @@ namespace { namespace LRQ { template <bool is_learn> - void predict_or_learn(void* d, learner& base, example* ec) + void predict_or_learn(LRQstate* lrq, learner& base, example* ec) { - LRQstate* lrq = (LRQstate*) d; vw& all = *lrq->all; // Remember original features @@ -247,7 +246,9 @@ namespace LRQ { cerr<<endl; all.wpp = all.wpp * (1 + maxk); - learner* l = new learner(lrq, predict_or_learn<true>, predict_or_learn<false>, all.l, 1 + maxk); + learner* l = new learner(lrq, all.l, 1 + maxk); + l->set_learn<LRQstate, predict_or_learn<true> >(); + l->set_predict<LRQstate, predict_or_learn<false> >(); l->set_end_pass<LRQstate,reset_seed>(); // TODO: leaks memory ? |