Centrality Computer Action

Within graph theory and network analysis, there are various measures of the centrality of a node within a graph that determine the relative importance of a node within the graph (for example, how important a person is within a social network).

In the visualizer, computing centrality is done through three different aspects that can be defined as follows:
Property Description
Centrality degree is defined as the number of links incident upon a node
Betweenness it depends on the shortest path on the graph. Nodes that occur on many shortest paths between other nodes have higher betweenness than those that do not
Closeness Nodes tend to have short distances to other nodes within the graph have higher closeness. Closeness is preferred in network analysis to mean shortest-path length, as it gives higher values to more central nodes, and so is usually positively associated with other measures such as the degree measure.
For more details about these computation techniques you can refer to the paper A Faster Algorithm for Betweenness Centrality by Ulrik Brandes

The Centrality Computer Action gives the user the possibility to check the most heavy node in his graph. When applying the compute process the appropriated node will be highlighted. This action is not exclusive and it is activated by default on the visualizer. The main property that should be set on the CentralityComputerData is the computeMode. This property can take one of these values:CentralityIndices.CENTRALITY_DEGREE or CentralityIndices.CLOSNESS_CENTRALITY or CentralityIndices.BETWEENESS_CENTRALITY

The following code shows how can user activate the CentralityComputerAction.

function ActivateCentralityAction(computeIndice:String):void
{
	var data:CentralityComputerActionData = new CentralityComputerActionData();
	switch(computeIndice)
	{
		case CentralityIndices.CENTRALITY_DEGREE: 
			data.computeMethod = CentralityIndices.CENTRALITY_DEGREE
			break;
		case CentralityIndices.CLOSNESS_CENTRALITY:
			data.computeMethod = CentralityIndices.CLOSNESS_CENTRALITY;
			break;
		case CentralityIndices.BETWEENESS_CENTRALITY:
			data.computeMethod = CentralityIndices.BETWEENESS_CENTRALITY;
			break;
	}
	
	visualizer.activateAction(CentralityComputerAction.ID,data);
}