Skip to content
This repository
tree: 059bd826b5
Fetching contributors…

Cannot retrieve contributors at this time

file 36 lines (30 sloc) 1.031 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
/*
Copyright (c) by respective owners including Yahoo!, Microsoft, and
individual contributors. All rights reserved. Released under a BSD
license as described in the file LICENSE.
*/
#ifndef SL_H
#define SL_H

#include "io.h"
#include "parse_primitives.h"
#include "global_data.h"
#include "example.h"

struct label_data {
  float label;
  float weight;
  float initial;
};

void return_simple_example(vw& all, example* ec);

size_t read_cached_simple_label(shared_data* sd, void* v, io_buf& cache);
void cache_simple_label(void* v, io_buf& cache);
void default_simple_label(void* v);
void parse_simple_label(shared_data* sd, void* v, v_array<substring>& words);
void delete_simple_label(void* v);
float get_weight(void* v);
float get_initial(void* v);
const label_parser simple_label = {default_simple_label, parse_simple_label,
cache_simple_label, read_cached_simple_label,
delete_simple_label, get_weight, get_initial,
sizeof(label_data)};

float query_decision(vw& all, example* ec, float k);

#endif
Something went wrong with that request. Please try again.