| igraph Reference Manual |
|---|
int igraph_establishment_game(igraph_t *graph, igraph_integer_t nodes, igraph_integer_t types, igraph_integer_t k, igraph_vector_t *type_dist, igraph_matrix_t *pref_matrix, igraph_bool_t directed);
The simulation goes like this: a single vertex is added at each
time step. This new vertex tries to connect to k vertices in the
graph. The probability that such a connection is realized depends
on the types of the vertices involved.
Arguments:
|
Pointer to an uninitialized graph. |
|
The number of vertices in the graph. |
|
The number of vertex types. |
|
The number of connections tried in each time step. |
|
Vector giving the distribution of vertex types. |
|
Matrix giving the connection probabilities for different vertex types. |
|
Logical, whether to generate a directed graph. |
Returns:
Error code. |
Added in version 0.2.
Time complexity: O(|V|*k*log(|V|)), |V| is the number of vertices
and k is the k parameter.
<< 2.11. igraph_callaway_traits_game — Simulate a growing network with vertex types. |
2.13. igraph_preference_game — Generates a graph with vertex types and connection preferences >> |