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>2013-03-20 17:58:26 +0400
committerJohn Langford <jl@hunch.net>2013-03-20 17:58:26 +0400
commitd47af73d45437d26374ec2eba96496d0cec44bd4 (patch)
treed70485be1895e0ea4130226b9f25cabc1f97d167 /vowpalwabbit/sender.cc
parent5d8a15985ecac279e8b08e49cc3e9af5b2af3a68 (diff)
make learner initialization functional
Diffstat (limited to 'vowpalwabbit/sender.cc')
-rw-r--r--vowpalwabbit/sender.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/vowpalwabbit/sender.cc b/vowpalwabbit/sender.cc
index 940bc2e9..3b7468d3 100644
--- a/vowpalwabbit/sender.cc
+++ b/vowpalwabbit/sender.cc
@@ -109,7 +109,7 @@ void send_features(io_buf *b, example* ec)
void learn(void* d, example*ec) { cout << "sender can't be used under reduction" << endl; }
void finish(void* d) { cout << "sender can't be used under reduction" << endl; }
- void setup(vw& all, po::variables_map& vm, vector<string> pairs)
+ learner setup(vw& all, po::variables_map& vm, vector<string> pairs)
{
sender* s = (sender*)calloc(1,sizeof(sender));
s->sd = -1;
@@ -120,8 +120,8 @@ void send_features(io_buf *b, example* ec)
}
sl_t sl = {NULL, save_load};
- learner ret = {s,drive_send,learn,finish,sl};
- all.l = ret;
+ learner l = {s,drive_send,learn,finish,sl};
+ return l;
}
}