Package com.powsybl.openloadflow.graph
Class MinimumSpanningTreeGraphDecrementalConnectivity<V>
- java.lang.Object
-
- com.powsybl.openloadflow.graph.MinimumSpanningTreeGraphDecrementalConnectivity<V>
-
- All Implemented Interfaces:
GraphDecrementalConnectivity<V>
public class MinimumSpanningTreeGraphDecrementalConnectivity<V> extends Object implements GraphDecrementalConnectivity<V>
- Author:
- Florian Dupuy
-
-
Constructor Summary
Constructors Constructor Description MinimumSpanningTreeGraphDecrementalConnectivity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEdge(V vertex1, V vertex2)
void
addVertex(V vertex)
void
cut(V vertex1, V vertex2)
Cut one edge between given verticesint
getComponentNumber(V vertex)
Return the number of the connected component containing the given vertex, knowing that the number represents the size ranking of the related connected component in the graph, 0 being the main connected component.Set<V>
getConnectedComponent(V vertex)
Set<V>
getNonConnectedVertices(V vertex)
List<Set<V>>
getSmallComponents()
Return the collection of "small" connected components, meaning all the connected components except the biggest one (size-wise).void
reset()
Reset all the cut done previously in the graph
-
-
-
Method Detail
-
addVertex
public void addVertex(V vertex)
- Specified by:
addVertex
in interfaceGraphDecrementalConnectivity<V>
-
addEdge
public void addEdge(V vertex1, V vertex2)
- Specified by:
addEdge
in interfaceGraphDecrementalConnectivity<V>
-
cut
public void cut(V vertex1, V vertex2)
Description copied from interface:GraphDecrementalConnectivity
Cut one edge between given vertices- Specified by:
cut
in interfaceGraphDecrementalConnectivity<V>
- Parameters:
vertex1
- first vertex, from or towards which the edge has been constructedvertex2
- second vertex, towards or from which the edge has been constructed
-
reset
public void reset()
Description copied from interface:GraphDecrementalConnectivity
Reset all the cut done previously in the graph- Specified by:
reset
in interfaceGraphDecrementalConnectivity<V>
-
getComponentNumber
public int getComponentNumber(V vertex)
Description copied from interface:GraphDecrementalConnectivity
Return the number of the connected component containing the given vertex, knowing that the number represents the size ranking of the related connected component in the graph, 0 being the main connected component. Hence, the greater the component number is, the smaller the number of vertices in that component.- Specified by:
getComponentNumber
in interfaceGraphDecrementalConnectivity<V>
- Parameters:
vertex
- the vertex whose connected component number is looked for- Returns:
- the number of the related connected component
-
getSmallComponents
public List<Set<V>> getSmallComponents()
Description copied from interface:GraphDecrementalConnectivity
Return the collection of "small" connected components, meaning all the connected components except the biggest one (size-wise).- Specified by:
getSmallComponents
in interfaceGraphDecrementalConnectivity<V>
- Returns:
- the collection of small connected components
-
getConnectedComponent
public Set<V> getConnectedComponent(V vertex)
- Specified by:
getConnectedComponent
in interfaceGraphDecrementalConnectivity<V>
-
getNonConnectedVertices
public Set<V> getNonConnectedVertices(V vertex)
- Specified by:
getNonConnectedVertices
in interfaceGraphDecrementalConnectivity<V>
-
-