Qurak

Analyze social networks

Esempio 6 passi, eseguiti in ordine in una sola sessione. Ogni passo è stato eseguito sul motore e l'output qui sotto è ciò che ha prodotto.

Passo 1
g = ExampleData[{"NetworkGraph", "ZacharyKarateClub"}]
Output
Graph[<34>, <78>]
Passo 2
VertexCount[g]
Output
34
Passo 3
EdgeCount[g]
Output
78
Passo 4
With[{d = DegreeCentrality[g]}, Pick[VertexList[g], d, Max[d]]]
Output
{34}
Passo 5
Part[VertexList[g], Reverse[Ordering[BetweennessCentrality[g]]][[ ;; 2]]]
Output
{1, 34}
Passo 6
Pick[VertexList[g], DegreeCentrality[g], 0 | 1]
Output
{12}

Funzioni usate

Ricette correlate

Tutte le ricette · Guida delle funzioni · Usa questo da un client MCP