It would be nice if someone can review this with Google Pagerank and
Personal Vector.

-Edward

On Wed, Aug 13, 2008 at 8:24 PM, Apache Wiki <[EMAIL PROTECTED]> wrote:
> Dear Wiki user,
>
> You have subscribed to a wiki page or wiki category on "Hama Wiki" for change 
> notification.
>
> The following page has been changed by udanax:
> http://wiki.apache.org/hama/PageRank
>
> ------------------------------------------------------------------------------
> - Describe PageRank here.
> + {{{
> + public class PageRank {
>
> +   public static void main(String[] argv) {
> +     int[][] data = {
> +       { 2, 3, 4, 5, 7 },
> +       { 1 },
> +       { 1, 2 },
> +       { 2, 3, 5 },
> +       { 1, 3, 4, 6 },
> +       { 1, 5 },
> +       { 5 }
> +     };
> +
> +     double[][] a = new double[data.length][data.length];
> +     for (int i = 0; i < data.length; i++) {
> +       for (int j = 0; j < data[i].length; j++) {
> +         a[data[i][j] - 1][i] = 1.0 / data[i].length;
> +       }
> +     }
> +     double[] eigVector = new 
> Matrix(a).eigenDecomposition().getV().transpose().getArray()[0];
> +     double norm1 = new Matrix(eigVector , eigVector .length).norm1();
> +     for (int i = 0; i < eigVector.length; i++)
> +       System.out.println(eigVector[i] / norm1);
> +   }
> + }
> + }}}
> +
>



-- 
Best regards, Edward J. Yoon
[EMAIL PROTECTED]
http://blog.udanax.org

Reply via email to