Qurak

Degree centrality in social networks

Exemplo 3 passos, executados em ordem numa sessão. Cada passo foi executado no motor e a saída abaixo é o que ele produziu.

Passo 1
g = ExampleData[{"NetworkGraph", "FamilyGathering"}];

Sem saída - este passo prepara algo para o próximo.

Passo 2
Part[VertexList[g], Ordering[EigenvectorCentrality[g], All, Greater]]
Saída
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]
Saída
HighlightGraph[ExampleData[{NetworkGraph, FamilyGathering}], Table[VertexList[g][[i]], {i, VertexCount[g]}], ImageSize -> 300]

Funções usadas

Receitas relacionadas

Todas as receitas · Referência de funções · Usar isto de um cliente MCP