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; }
MatchPosting* MatchPost_clone(MatchPosting *self) { MatchPosting *evil_twin = (MatchPosting*)VTable_Make_Obj(self->vtable); return MatchPost_init(evil_twin, self->sim); }
MatchPosting* MatchPost_new(Similarity *sim) { MatchPosting *self = (MatchPosting*)VTable_Make_Obj(&MATCHPOSTING); return MatchPost_init(self, sim); }