Class EigenvectorCentrality<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.vertex.MatrixBasedVertexMetric<U>
es.uam.eps.ir.relison.sna.metrics.vertex.EigenvectorCentrality<U>
- All Implemented Interfaces:
VertexMetric<U>
public class EigenvectorCentrality<U> extends MatrixBasedVertexMetric<U>
Finds the eigenvector centrality of the network, which measures the importance of a node
based on the importance of its neighbors. It is the solution to equation Ax = kx, where
k is the largest eigenvalue of the adjacency matrix A.
Reference: Bonacich, P.F. Power and centrality: A family of measures. American Journal of Sociology 92 (5), pp. 1170-1182 (1987)
-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientationorientThe orientation of the paths. -
Constructor Summary
Constructors Constructor Description EigenvectorCentrality()Constructor.EigenvectorCentrality(EdgeOrientation orient)Constructor.EigenvectorCentrality(MatrixLibrary library)Constructor.EigenvectorCentrality(MatrixLibrary library, EdgeOrientation orient)Constructor. -
Method Summary
Modifier and Type Method Description protected double[]getCOLTScores(Graph<U> graph)Obtains the values of the metric for the different users using the COLT library.protected double[]getJBLASScores(Graph<U> graph)Obtains the values of the metric for the different users using the JBLAS library.protected double[]getMTJScores(Graph<U> graph)Obtains the values of the metric for the different users using the MTJ library.Methods inherited from class es.uam.eps.ir.relison.sna.metrics.vertex.MatrixBasedVertexMetric
compute, compute, compute, getScoresMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.relison.sna.metrics.VertexMetric
averageValue, averageValue
-
Field Details
-
orient
The orientation of the paths.
-
-
Constructor Details
-
EigenvectorCentrality
Constructor.- Parameters:
library- the matrix library to use.orient- the orientation to choose for the adjacency matrix.
-
EigenvectorCentrality
Constructor. It takes the paths leading to the users (right eigenvector - Orientation OUT).- Parameters:
library- the matrix library to use.
-
EigenvectorCentrality
Constructor. It uses the default matrix libraries.- Parameters:
orient- the orientation to choose for the adjacency matrix.
-
EigenvectorCentrality
public EigenvectorCentrality()Constructor. It uses the default matrix libraries and considers the paths leading to the users (right eigenvector - Orientation OUT).
-
-
Method Details
-
getJBLASScores
Description copied from class:MatrixBasedVertexMetricObtains the values of the metric for the different users using the JBLAS library.- Specified by:
getJBLASScoresin classMatrixBasedVertexMetric<U>- Parameters:
graph- the network.- Returns:
- an array containing the value of the metric for each user.
-
getMTJScores
Description copied from class:MatrixBasedVertexMetricObtains the values of the metric for the different users using the MTJ library.- Specified by:
getMTJScoresin classMatrixBasedVertexMetric<U>- Parameters:
graph- the network.- Returns:
- an array containing the value of the metric for each user.
-
getCOLTScores
Description copied from class:MatrixBasedVertexMetricObtains the values of the metric for the different users using the COLT library.- Specified by:
getCOLTScoresin classMatrixBasedVertexMetric<U>- Parameters:
graph- the network.- Returns:
- an array containing the value of the metric for each user.
-