spark-betweenness icon indicating copy to clipboard operation
spark-betweenness copied to clipboard

How to print sortedVBC?

Open yponcet opened this issue 7 years ago • 3 comments

Hi, I am trying to print the sortedVBC. I do not get errors by building the .jar file, but anything is shown when I run it. Please, this is my source code to do so:

val graph = Graph(vertices, edges, defaultVertex)

val k = 3

val kBCGraph = KBetweenness.run(graph, k)
   
val verticesBetweenness = kBCGraph.vertices.collect()
  
val sortedVBC = verticesBetweenness.sortWith((x,y) => x._1 < y._1)

println(s"${sortedVBC(0)._1} should equal (1L)")

Best and thanks in advance

yponcet avatar Mar 05 '17 03:03 yponcet