You need to make sure that the weights associated with vertices are never negative, otherwise you will get an error from the psumtree functions or worse (crash or misbehaviour).
If deg_coef
is negative, some of the weights will be negative as well. See here for the weight formula used by this function: Barabasi aging game crashes on negative index from psumtree_search · Issue #1618 · igraph/igraph · GitHub So no, you cannot safely remove the check, as it will lead to errors.
Of course you can implement a different formula for the weights if you like, and experiment. The formula you mention here (deg/n + 1
) is not the same as the one used by barabasi_aging_game()
.
I’m not sure I understand what you mean here, but be careful about what you mean by “random”. A die that lands on six 99% of the time is “random”, isn’t it? If you replace your random graph generator by such a die, will your results be meaningful?
Consider a non-preferential attachment where new nodes connect to any existing one with the same probability. Does it generate trees? Yes. Are they random? Sure, in some sense. Is every tree generated with the same probability? Not at all.