Revision 743e659d overlay.c

View differences:

overlay.c
16 16
#include "overlay.h"
17 17
#include "graph.h"
18 18
#include "sched.h"
19
#include "wuli.h"
19 20

  
20 21
extern float netload;
21 22

  
......
122 123
			offers = matrix_eigencentrality(A, NULL);
123 124
			overlay_matrix_optimize(&A, &offers);
124 125
		} else
125
		{
126
//			fprintf(stderr, "[DEBUG] uniform overlay..\n");
127
			offers = matrix_ones(matrix_num_rows(A), 1);
128
		}
126
			if (tokens_check(inputfile, ntok, "wuli") >= 0)
127
			{
128
				printf("Applying Wu-Li optimization...\n");
129
				offers = matrix_ones(matrix_num_rows(A), 1);
130
				overlay_matrix_wuli(&A, &offers, source_id);
131
			}
132
			else
133
			{
134
	//			fprintf(stderr, "[DEBUG] uniform overlay..\n");
135
				offers = matrix_ones(matrix_num_rows(A), 1);
136
			}
129 137
		matrix_shrink(&offers, source_id);
130 138
		matrix_divide(offers, matrix_sum_values(offers)/((*npeers - 1)*netload));
131 139
//		printf("Total number of offers: %f\n", matrix_sum_values(offers)); 

Also available in: Unified diff