Package org.goplanit.utils.graph
Class VertexUtils
- java.lang.Object
-
- org.goplanit.utils.graph.VertexUtils
-
public class VertexUtils extends Object
Utilities for vertices that ar unfit for inclusion in the class itself
-
-
Constructor Summary
Constructors Constructor Description VertexUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V extends Vertex,E extends Edge>
voidupdateVertexEdges(Iterable<V> vertices, Function<E,E> edgeToEdgeMapping, boolean removeMissingMappings)
Update the edges of all vertices based on the mapping provided (if any)
-
-
-
Method Detail
-
updateVertexEdges
public static <V extends Vertex,E extends Edge> void updateVertexEdges(Iterable<V> vertices, Function<E,E> edgeToEdgeMapping, boolean removeMissingMappings)
Update the edges of all vertices based on the mapping provided (if any)- Type Parameters:
V
- type of vertexE
- type of edge- Parameters:
vertices
- the vertices to updateedgeToEdgeMapping
- to use should contain original edge as currently used on vertex and then the value is the new edge to replace itremoveMissingMappings
- when true if there is no mapping, the edge is removed as adjacent to the vertex, otherwise they are left in-tact
-
-