Class AbstractGraphConnectivity<V,​E>

    • Field Detail

      • componentSets

        protected List<Set<V>> componentSets
    • Constructor Detail

      • AbstractGraphConnectivity

        public AbstractGraphConnectivity()
    • Method Detail

      • updateConnectivity

        protected abstract void updateConnectivity​(EdgeRemove<V,​E> edgeRemove)
      • updateConnectivity

        protected abstract void updateConnectivity​(EdgeAdd<V,​E> edgeAdd)
      • updateConnectivity

        protected abstract void updateConnectivity​(VertexAdd<V,​E> vertexAdd)
      • updateComponents

        protected abstract void updateComponents()
      • getComponentNumber

        public int getComponentNumber​(V vertex)
        Description copied from interface: GraphConnectivity
        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 interface GraphConnectivity<V,​E>
        Parameters:
        vertex - the vertex whose connected component number is looked for
        Returns:
        the number of the related connected component
      • getQuickComponentNumber

        protected abstract int getQuickComponentNumber​(V vertex)
      • getSmallComponents

        protected Collection<Set<V>> getSmallComponents()
      • getNonConnectedVertices

        protected Set<V> getNonConnectedVertices​(V vertex)
      • getGraph

        public org.jgrapht.Graph<V,​E> getGraph()
      • checkSaved

        protected void checkSaved()
      • checkVertex

        protected void checkVertex​(V vertex)
      • getVerticesAddedToMainComponent

        public Set<V> getVerticesAddedToMainComponent()
        Description copied from interface: GraphConnectivity
        Return the vertices which were added to main component by last temporary changes. The main component is set by calling setMainComponentVertex, or if not set it is the biggest connected component.
        Specified by:
        getVerticesAddedToMainComponent in interface GraphConnectivity<V,​E>
      • getEdgesAddedToMainComponent

        public Set<E> getEdgesAddedToMainComponent()
        Description copied from interface: GraphConnectivity
        Return the edges which were added to main component by last temporary changes. The main component is set by calling setMainComponentVertex, or if not set it is the biggest connected component.
        Specified by:
        getEdgesAddedToMainComponent in interface GraphConnectivity<V,​E>
      • getVerticesRemovedFromMainComponent

        public Set<V> getVerticesRemovedFromMainComponent()
        Description copied from interface: GraphConnectivity
        Return the vertices which were removed from main component by last temporary changes. The main component is set by calling setMainComponentVertex, or if not set it is the biggest connected component.
        Specified by:
        getVerticesRemovedFromMainComponent in interface GraphConnectivity<V,​E>
      • getEdgesRemovedFromMainComponent

        public Set<E> getEdgesRemovedFromMainComponent()
        Description copied from interface: GraphConnectivity
        Return the edges which were removed from main component by last temporary changes. The main component is set by calling setMainComponentVertex, or if not set it is the biggest connected component.
        Specified by:
        getEdgesRemovedFromMainComponent in interface GraphConnectivity<V,​E>
      • setMainComponentVertex

        public void setMainComponentVertex​(V mainComponentVertex)
        Description copied from interface: GraphConnectivity
        Set the main component with given vertex. The connected component relative to this vertex is considered as being the main component. If not set, the main component is considered to be the biggest component. This main component cannot be changed if any temporary changes are ongoing.
        Specified by:
        setMainComponentVertex in interface GraphConnectivity<V,​E>
        Parameters:
        mainComponentVertex - vertex defining main component