/* This file is part of Pazpar2.
- Copyright (C) 2006-2008 Index Data
+ Copyright (C) 2006-2009 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
#include <config.h>
#endif
-#include <ctype.h>
#include <math.h>
#include <stdlib.h>
}
}
// Calculate relevance for each document
- for (i = 0; i < reclist->num_records; i++)
+ for (i = 0; i < reclist_get_num_records(reclist); i++)
{
int t;
- struct record_cluster *rec = reclist->flatlist[i];
+ struct record_cluster *rec = reclist_get_cluster(reclist, i);
float relevance;
relevance = 0;
for (t = 1; t < rel->vec_len; t++)
}
rec->relevance = (int) (relevance * 100000);
}
- reclist->pointer = 0;
+ reclist_rewind(reclist);
xfree(idfvec);
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+