Mercurial > hg > Members > nobuyasu > TPPageRank
comparison src/pagerank/TPReadWikiLink.java @ 11:8e3bb1843beb draft
add pipes.jar and GremlinSample.java
author | one |
---|---|
date | Wed, 05 Sep 2012 19:12:20 +0900 |
parents | c7a7c53702dd |
children | 0ef7268bbbac |
comparison
equal
deleted
inserted
replaced
10:c7a7c53702dd | 11:8e3bb1843beb |
---|---|
34 GraphMLReader.inputGraph(graph, in); | 34 GraphMLReader.inputGraph(graph, in); |
35 in.close(); | 35 in.close(); |
36 LinkToVertex ltv = new LinkToVertex(graph); | 36 LinkToVertex ltv = new LinkToVertex(graph); |
37 | 37 |
38 // ltv.initPageRankAllVertex(); | 38 // ltv.initPageRankAllVertex(); |
39 /* | |
39 final long AllVertexNumber = ltv.searchAllVertices(); | 40 final long AllVertexNumber = ltv.searchAllVertices(); |
40 HashMap<String, WikiPage> wikiHash = ltv.getWikiPageHash(); | 41 HashMap<String, WikiPage> wikiHash = ltv.getWikiPageHash(); |
41 System.out.println("AllVertexNumber = "+AllVertexNumber); | 42 System.out.println("AllVertexNumber = "+AllVertexNumber); |
42 | 43 */ |
43 /* | 44 /* |
44 String nodeIds[] = {"80", "290", "21", "164"}; | 45 String nodeIds[] = {"80", "290", "21", "164"}; |
45 writeComputeTransition(ltv, nodeIds, 50); | 46 writeComputeTransition(ltv, nodeIds, 50); |
46 | 47 |
47 */ | 48 */ |
48 | 49 /* |
49 FileOutputStream fos = new FileOutputStream(new File("./resources/wikiPageRank.log")); | 50 FileOutputStream fos = new FileOutputStream(new File("./resources/wikiPageRank.log")); |
50 descendingOrder(wikiHash, fos); | 51 descendingOrder(wikiHash, fos); |
52 */ | |
51 | 53 |
52 | 54 |
55 | |
53 FileOutputStream out = new FileOutputStream(new File(fileDB)); | 56 FileOutputStream out = new FileOutputStream(new File(fileDB)); |
54 GraphMLWriter.outputGraph(graph, out); | 57 GraphMLWriter.outputGraph(graph, out); |
55 out.close(); | 58 out.close(); |
56 | 59 |
57 | 60 |