Skip to content

Commit

Permalink
chore: update C core and adapt Graph.Chung_Lu to changes
Browse files Browse the repository at this point in the history
  • Loading branch information
szhorvat committed Jun 22, 2024
1 parent 3facf97 commit 96015ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/_igraph/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ int igraphmodule_PyObject_to_bliss_sh_t(PyObject *o,
int igraphmodule_PyObject_to_chung_lu_t(PyObject *o, igraph_chung_lu_t *result) {
static igraphmodule_enum_translation_table_entry_t chung_lu_tt[] = {
{"original", IGRAPH_CHUNG_LU_ORIGINAL},
{"grg", IGRAPH_CHUNG_LU_GRG},
{"maxent", IGRAPH_CHUNG_LU_MAXENT},
{"nr", IGRAPH_CHUNG_LU_NR},
{0,0}
};
Expand Down
10 changes: 5 additions & 5 deletions src/_igraph/graphobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -14495,8 +14495,8 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
METH_VARARGS | METH_CLASS | METH_KEYWORDS,
"Chung_Lu(out, in_=None, loops=True, variant=\"original\")\n--\n\n"
"Generates a Chung-Lu random graph.\n\n"
"In the Chung-Lu model, each pair of vertices M{i} and M{j} is connected with\n"
"independent probability M{p_{ij} = w_i w_j / S}, where M{w_i} is a weight\n"
"In the original Chung-Lu model, each pair of vertices M{i} and M{j} is connected\n"
"with independent probability M{p_{ij} = w_i w_j / S}, where M{w_i} is a weight\n"
"associated with vertex M{i} and M{S = \\sum_k w_k} is the sum of weights.\n"
"In the directed variant, vertices have both out-weights, M{w^\\text{out}},\n"
"and in-weights, M{w^\\text{in}}, with equal sums,\n"
Expand Down Expand Up @@ -14525,7 +14525,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
"variants become equivalent in the limit of sparse graphs where M{q_{ij}}\n"
"approaches zero. In the original Chung-Lu model, selectable by setting\n"
"C{variant} to C{\"original\"}, M{p_{ij} = min(q_{ij}, 1)}.\n"
"The C{\"grg\"} variant, often referred to a the generalized\n"
"The C{\"grg\"} variant, sometimes referred to a the generalized\n"
"random graph, uses M{p_{ij} = q_{ij} / (1 + q_{ij})}, and is equivalent\n"
"to a maximum entropy model (i.e. exponential random graph model) with\n"
"a constraint on expected degrees, see Park and Newman (2004), Section B,\n"
Expand Down Expand Up @@ -14565,8 +14565,8 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
" \n"
" - C{\"original\"} -- the original Chung-Lu model with\n"
" M{p_{ij} = min(1, q_{ij})}.\n"
" - C{\"grg\"} -- generalized random graph, a maximum entropy model with\n"
" a soft constraint on degrees, M{p_{ij} = q_{ij} / (1 + q_{ij})}\n"
" - C{\"maxent\"} -- maximum entropy model with fixed expected degrees\n"
" M{p_{ij} = q_{ij} / (1 + q_{ij})}\n"
" - C{\"nr\"} -- Norros and Reittu's model, M{p_{ij} = 1 - exp(-q_{ij})}\n"
},

Expand Down

0 comments on commit 96015ed

Please sign in to comment.