// Computing the prestige vector of a social network by power iteration // Finding the principal eigenvector (the eigenvector corresponding to the largest eigenvalue) // See http://www.cs.ccsu.edu/~markov/ccsu_courses/dmw2.ppt public class Eigenvector { static final double epsilon = 0.01; // convergency threshold static double lambda; // eigenvalue static private int[][] a = { {0,0,1}, // transposed adjaceny matrix {1,0,0}, // of the social network graph {1,1,0}, }; static double[] p = {1,1,1}; // initial eigenvector public static void main (String[] args) { double[] q; System.out.println(); for (int i=0;i