January 2019
Beginner to intermediate
154 pages
4h 31m
English
The mapVertices() method can be used to map the properties of each vertex of a given graph. The following example shows the usage of mapVertices():
//Scala//Prefixing 'Hi' with each nameval newGraph = graph.mapVertices((VertexId, name) => "Hi "+name )
The mapVertices() operation is similar to the mapValues() transformation. In the previous example, we just added 'Hi' to each name of the vertex.
Read now
Unlock full access