Sparse Matrices in Java
Posted on 2005-04-03
I am struck with a problem.
What I have to do is....
I have a set of 10000 URLs(webpages). I have to build a DIRECTED GRAPH using the 10000 webpages. If there is a link in webpage A pointing to webpage B, then we include a edge in the graph from node A to node B and vice versa.
This is all like a sparse adjacency matrix. After I build the matrix, I have to do INTENSE calculations on the matrix.
One obvious solution to do this is by taking a node class which represents a webpage, and include two member vectors. One vector contains the urls(OUTLINKS) which this node point to and the other vector contains urls(INLINKS) which point to this node. After this I have to do INTENSE calculations, but in this method, it gets too slow and performance might be too bad.
What is the best way to do this?? Are there any tools which can make my work easy???
Hope I explained enough. I have to do all this is JAVA.