public Graph < K , VV , EV > addEdge ( Vertex < K , VV > source , Vertex < K , VV > target , EV edgeValue ) { Graph < K , VV , EV > partialGraph = fromCollection ( Arrays . asList ( source , target ) , Collections . singletonList ( new Edge <> ( source . f0 , target . f0 , edgeValue ) ) , this . context ) ; return this . union ( partialGraph ) ; }
Adds the given edge to the graph . If the source and target vertices do not exist in the graph they will also be added .