#include #include #include “float.h“#include #include #include #include #include #include #include #define alpha 0.10#define TN 25using namespace std;int N;int num =0;struct Node{ int number; int inDegree; int outDegree; double pagerank;};struct Edge{ int start; vector ends;};vector nodes;vector name;vector Edges;vector I;vector vaildNodes;double S = 0;void readfile(){ FILE* file; if(!(file = fopen(“wiki.graph““r“)))//设定为只读 return; char buffer[100000] = {0}; while(fgets(buffer100000file)) { char* p = strtok(buffer “:“); int id = atoi(p); nodes[id].n
共有 条评论
评论
共有 条评论