chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:36:30 +08:00
commit 55ab4e4a73
473 changed files with 72932 additions and 0 deletions
@@ -0,0 +1,9 @@
#include "avg_degree.h"
#include "../../classes/graph.h"
py::object average_degree(py::object G) {
Graph& G_ = G.cast<Graph&>();
int n = G_.node.size();
int m = G.attr("number_of_edges")().cast<int>();
return py::cast(2.0 * m / n);
}