From: Scott K. <sc...@po...> - 2014-10-20 04:06:35
|
Hi there, I'm implementing PageRank on an undirected graph with weighted edges. My understanding is that because my graph is undirected, the transition probabilities representing edge weights will be different depending on the origin vertex. This makes sense, since the probabilities must total 1 for the outbound edges of the vertex, but each incident vertex of the edge will have different requirements, meaning I can't have a common transition probabilities between them. (If this understanding is wrong, please correct me). So, instead of the first approach to edge weights where I had an edge, v1, v2, weight, I started playing with VEPair, to see if that would allow me to implement multiple weights for the same edge depending on the vertex. But I'm getting null pointer exceptions in the update method of PageRank because the call to transform in AbstractIterativeScorer is newing up a new VEPair, and since there is no hashCode or equals implementation on the VEPair class, new instances with identical underlying values are not coming back from the transformer. If I *don't* key my transformer via VEPairs, but instead use simpler integers as before, everything works fine. I can override the required classes to make this work, but I wanted to check and see if I'm completely on the wrong track, since it seems funny that VEPair wouldn't be usable in transforms as is. It's quite possible that the mistake is on my end. Thanks a lot. -- Talk to you soon, Scott Klarenbach PointyHat Software Corp. www.pointyhat.ca p 604-568-4280 e sc...@po... 2404 Guelph Street Suite A Vancouver, BC, V5T3P3 _______________________________________ To iterate is human; to recur, divine |