Revision 37aa99b9

View differences:

Matrix/matrix.h
38 38

  
39 39
void matrix_destroy(struct matrix **m);
40 40

  
41
/* TODO the functions below have not a test case */
42

  
41 43
int matrix_make_bidir(struct matrix * m);
42 44

  
45
matvalue matrix_sum_values(const struct matrix *m);
46

  
47
void matrix_divide(struct matrix *m, matvalue v);
48

  
43 49
#endif
overlay.c
98 98
//			fprintf(stderr, "[DEBUG] uniform overlay..\n");
99 99
			offers = matrix_ones(matrix_num_rows(A), 1);
100 100
		}
101
		matrix_divide(offers, matrix_sum_values(offers)/(*npeers - 1)); // normalize, just in case..
102
		printf("Total number of offers: %f\n", matrix_sum_values(offers)); 
101 103
		tokens_destroy(&inputfile, ntok);
102 104

  
103 105
		*neigh_size = -1;

Also available in: Unified diff