Fork https://github.com/andreacarrara/pagerank/
A C++ single-file header-only pagerank library
//main.cpp
int main() {
pagerank::matrix::matrix_t matrix = {
{0, 1, 1, 1},
{1, 0, 0, 0},
{1, 0, 0, 0},
{1, 0, 0, 0},
};
auto score = pagerank::compute(matrix);
for (int i = 0; i < size; i++) {
std::cout << i << "-" << score[i] << std::endl;
}
}
0-0.479694
1-0.173435
2-0.173435
3-0.173435