A couple of extra lines of code in a script.

This commit is contained in:
Einar Ryeng 2007-03-27 13:02:22 +00:00
parent 728c334e8a
commit a5c3a1f154

View File

@ -10,6 +10,8 @@ void print_terms();
void add_link(char*, char*);
struct node* get_bp();
struct node* get_term(char *);
float calc_ic(struct node *, unsigned int);
/* initialisation */
int godist_init() {
@ -68,6 +70,7 @@ int godist_init() {
print_term(get_term("GO:0050896"));
print_term(get_term("GO:0050789"));
calc_ic(get_bp(), 0xffff);
/* find_multi_parented();*/
}
@ -229,7 +232,12 @@ void find_multi_parented() {
}
}
float calc_ic(unsigned int evidence) {
float calc_ic(struct node *n, unsigned int evidence) {
int i;
float ann=0.0;
for (i=0; i<12; i++)
if (evidence & 1<<i)
ann += (float) n->acc_evidence[i];
printf("%f", ann);
}