spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scharissis <stefano.charis...@gmail.com>
Subject graph.inDegrees including zero values
Date Sun, 25 Jan 2015 13:52:26 GMT
Hi,

If a vertex has no in-degree then Spark's GraphOp 'inDegree' does not return
it at all. Instead, it would be very useful to me to be able to have that
vertex returned with an in-degree of zero.
What's the best way to achieve this using the GraphX API?

For example, given a graph with nodes A,B,C, where A is connected to B and B
is connected to C like so:
A --> B --> 

graph.inDegrees returns:
B: 1
C: 1

But I would like:
A: 0
B: 1
C: 1


Cheers,
Stefano



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/graph-inDegrees-including-zero-values-tp21354.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message