-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
58 lines (45 loc) · 945 Bytes
/
main.cpp
File metadata and controls
58 lines (45 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <malloc.h>
#include <time.h>
#include "Allvars.h"
#include "Prototypes.h"
int main(void){
int i,j,l,Newindex,flag=0;
int row,column,m,n;
int trash;
int ncon;
ReadParameters("./data/InitialParam.param");
allocate_variables();
#ifdef PROBE
file = fopen("./data/NodesDegree.txt","r");
#else
file = fopen("./data/NodesDegree2.txt","r");
#endif
for(i=0;i<Netwk.Nnodes;i++)
{
fscanf(file,"%d %d",&Netwk.indegree[i],&Netwk.outdegree[i]);
Netwk.id = i;
}
ordinal_assign();
InitMatrixCij();
// makeCIJ_degreefixed();
MakeCIJ_Fast();
#ifdef PROBE
// Showing Edge vector
printf("\nEdge Matrix:\n");
for(i=0;i<Netwk.Nedges;i++){
printf("%d ",Netwk.edges[0][i] );
}
printf("\n");
for(i=0;i<Netwk.Nedges;i++){
printf("%d ",Netwk.edges[1][i] );
}
printf("\n");
#endif
PrintResults("basic");
free_memory();
fclose(file);
}