Hi Bin, VD and ED are ClassTags, you could treat them as placeholder, or template T in C (not 100% clear).
You do not need convert graph[String, Double] to Graph[VD,ED]. Check ClassTag’s definition in Scala could help. Best, On Jul 1, 2014, at 4:49 AM, Bin WU <bw...@connect.ust.hk> wrote: > Hi all, > > I am a newbie to graphx. > > I am currently having troubles understanding the types "VD" and "ED". I > notice that "VD" and "ED" are widely used in graphx implementation, but I > don't know why and how I am supposed to use them. > > Specifically, say I have constructed a graph "graph : Graph[String, Double]", > when, why, and how should I transform it into the type Graph[VD, ED]? > > Also, I don't know what package should I import. I have imported: > > " > import org.apache.spark.graphx._ > import org.apache.spark.rdd.RDD" > > But the two types "VD" and "ED" are still not found. > > Sorry for the stupid question. > > Thanks in advance! > > Best, > Ben