Graph computations.
The implemented methods are:
- Vertex Smoothing in python
Smoothing out or smoothing a vertex w with regards to the pair of edges (e1, e2) incident on w, removes both edges containing w and replaces (e1, e2) with a new edge that connects the other endpoints of the pair.
For example, the simple connected graph with two edges, e1 {u,w} and e2 {w,v}:
has a vertex (namely w) that can be smoothed away, resulting in:
The service vertex_smoothing requires mainly:
- links, a collection of record, representing the links in the considered graph, could be in the form of a list, a Spark RDD or a Spark DataFrame;
- vertices_to_remove, a collection of named nodes to smooth out.
Each record inside the links collection should contain the specification of a single link, that is:
- the source information;
- the target information;
- the link between the source and the target information.
Each point above could be represented as the user wants. Indeed, the user has also to provide the way to retrieve all these information through the source_getter, target_getter, link_getter parameters.