Mercurial > hg > Members > nobuyasu > TPPageRank
diff src/pagerank/TPReadWikiLink.java @ 8:4d1885a2fa36 draft
fix method of calculation for computing PageRank.
author | one |
---|---|
date | Wed, 05 Sep 2012 17:19:59 +0900 |
parents | c7b139ff27e2 |
children | 9787663edb54 |
line wrap: on
line diff
--- a/src/pagerank/TPReadWikiLink.java Wed Sep 05 16:34:47 2012 +0900 +++ b/src/pagerank/TPReadWikiLink.java Wed Sep 05 17:19:59 2012 +0900 @@ -35,18 +35,20 @@ in.close(); LinkToVertex ltv = new LinkToVertex(graph); +// ltv.initPageRankAllVertex(); final long AllVertexNumber = ltv.searchAllVertices(); HashMap<String, WikiPage> wikiHash = ltv.getWikiPageHash(); System.out.println("AllVertexNumber = "+AllVertexNumber); - String nodeIds[] = {"1574", "2829", "2850", "3618"}; - writeComputeTransition(ltv, nodeIds, 50); - -// FileOutputStream fos = new FileOutputStream(new File("./resources/wikiPageRank.log")); -// descendingOrder(wikiHash, fos); - - - + +// String nodeIds[] = {"1574", "2829", "2850", "3618"}; +// writeComputeTransition(ltv, nodeIds, 50); + + + FileOutputStream fos = new FileOutputStream(new File("./resources/wikiPageRank.log")); + descendingOrder(wikiHash, fos); + + FileOutputStream out = new FileOutputStream(new File(fileDB)); GraphMLWriter.outputGraph(graph, out); out.close();