Qurak

Degree centrality in social networks

Esempio 3 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", "FamilyGathering"}];

Nessun output - questo passo prepara qualcosa per il successivo.

Passo 2
Part[VertexList[g], Ordering[EigenvectorCentrality[g], All, Greater]]
Output
VertexList[ExampleData[{NetworkGraph, FamilyGathering}]]
Passo 3
cc = DegreeCentrality[g];
HighlightGraph[g, Table[Style[VertexList[g][[i]], ColorData["TemperatureMap"][cc[[i]] / Max[cc]]], {i, VertexCount[g]}], ImageSize -> 300]
Output
HighlightGraph[ExampleData[{NetworkGraph, FamilyGathering}], Table[VertexList[g][[i]], {i, VertexCount[g]}], ImageSize -> 300]

Funzioni usate

Ricette correlate

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