Esempio n. 1
0
ScorePosting*
ScorePost_init(ScorePosting *self, Similarity *sim) {
    MatchPost_init((MatchPosting*)self, sim);
    ScorePostingIVARS *const ivars = ScorePost_IVARS(self);
    ivars->norm_decoder = Sim_Get_Norm_Decoder(sim);
    ivars->freq         = 0;
    ivars->weight       = 0.0;
    ivars->prox         = NULL;
    ivars->prox_cap     = 0;
    return self;
}
Esempio n. 2
0
MatchPosting*
MatchPost_clone(MatchPosting *self)
{
    MatchPosting *evil_twin = (MatchPosting*)VTable_Make_Obj(self->vtable);
    return MatchPost_init(evil_twin, self->sim);
}
Esempio n. 3
0
MatchPosting*
MatchPost_new(Similarity *sim)
{
    MatchPosting *self = (MatchPosting*)VTable_Make_Obj(&MATCHPOSTING);
    return MatchPost_init(self, sim);
}