Package com.powsybl.openloadflow.graph
Class EvenShiloachGraphDecrementalConnectivity<V,E>
java.lang.Object
com.powsybl.openloadflow.graph.AbstractGraphConnectivity<V,E>
com.powsybl.openloadflow.graph.EvenShiloachGraphDecrementalConnectivity<V,E>
- All Implemented Interfaces:
GraphConnectivity<V,
E>
Implementing the Even-Shiloach algorithm (see https://dl.acm.org/doi/10.1145/322234.322235)
Due to time computation optimizations, this current implementation is only for graphs which initially have ONLY ONE
connected component. If more, an exception is thrown.
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>, Florian Dupuy <florian.dupuy at rte-france.com>
-
Field Summary
Fields inherited from class com.powsybl.openloadflow.graph.AbstractGraphConnectivity
componentSets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnectedComponent
(V vertex) Return the connected component set of given vertexgetNonConnectedVertices
(V vertex) protected int
getQuickComponentNumber
(V vertex) protected void
void
Start recording topological changes to undo them later by aGraphConnectivity.undoTemporaryChanges()
call.boolean
protected void
protected void
updateConnectivity
(EdgeAdd<V, E> edgeAdd) protected void
updateConnectivity
(EdgeRemove<V, E> edgeRemoval) protected void
updateConnectivity
(VertexAdd<V, E> vertexAdd) Methods inherited from class com.powsybl.openloadflow.graph.AbstractGraphConnectivity
addEdge, addVertex, checkSavedContext, checkVertex, getComponentNumber, getEdgesAddedToMainComponent, getEdgesRemovedFromMainComponent, getGraph, getModificationsContexts, getNbConnectedComponents, getSmallComponents, getVerticesAddedToMainComponent, getVerticesRemovedFromMainComponent, removeEdge, setMainComponentVertex, undoTemporaryChanges
-
Constructor Details
-
EvenShiloachGraphDecrementalConnectivity
public EvenShiloachGraphDecrementalConnectivity()
-
-
Method Details
-
updateConnectivity
- Specified by:
updateConnectivity
in classAbstractGraphConnectivity<V,
E>
-
updateConnectivity
- Specified by:
updateConnectivity
in classAbstractGraphConnectivity<V,
E>
-
updateConnectivity
- Specified by:
updateConnectivity
in classAbstractGraphConnectivity<V,
E>
-
resetConnectivity
- Specified by:
resetConnectivity
in classAbstractGraphConnectivity<V,
E>
-
updateComponents
protected void updateComponents()- Specified by:
updateComponents
in classAbstractGraphConnectivity<V,
E>
-
supportTemporaryChangesNesting
public boolean supportTemporaryChangesNesting() -
startTemporaryChanges
public void startTemporaryChanges()Description copied from interface:GraphConnectivity
Start recording topological changes to undo them later by aGraphConnectivity.undoTemporaryChanges()
call.- Specified by:
startTemporaryChanges
in interfaceGraphConnectivity<V,
E> - Overrides:
startTemporaryChanges
in classAbstractGraphConnectivity<V,
E>
-
getQuickComponentNumber
- Specified by:
getQuickComponentNumber
in classAbstractGraphConnectivity<V,
E>
-
getConnectedComponent
Description copied from interface:GraphConnectivity
Return the connected component set of given vertex- Specified by:
getConnectedComponent
in interfaceGraphConnectivity<V,
E> - Overrides:
getConnectedComponent
in classAbstractGraphConnectivity<V,
E>
-
getNonConnectedVertices
- Overrides:
getNonConnectedVertices
in classAbstractGraphConnectivity<V,
E>
-