Class BaseIntrusiveEdgesSpecifics<V,​E,​IE extends org.jgrapht.graph.IntrusiveEdge>

    • Field Detail

      • edgeMap

        protected Map<E,​IE extends org.jgrapht.graph.IntrusiveEdge> edgeMap
      • unmodifiableEdgeSet

        protected transient Set<E> unmodifiableEdgeSet
    • Constructor Detail

      • BaseIntrusiveEdgesSpecifics

        public BaseIntrusiveEdgesSpecifics​(Map<E,​IE> edgeMap)
        Constructor
        Parameters:
        edgeMap - the map to use for storage
    • Method Detail

      • containsEdge

        public boolean containsEdge​(E e)
        Check if an edge exists
        Parameters:
        e - the edge
        Returns:
        true if the edge exists, false otherwise
      • getEdgeSet

        public Set<E> getEdgeSet()
        Get the edge set.
        Returns:
        an unmodifiable edge set
      • remove

        public void remove​(E e)
        Remove an edge.
        Parameters:
        e - the edge
      • getEdgeSource

        public V getEdgeSource​(E e)
        Get the source of an edge.
        Parameters:
        e - the edge
        Returns:
        the source vertex of an edge
      • getEdgeTarget

        public V getEdgeTarget​(E e)
        Get the target of an edge.
        Parameters:
        e - the edge
        Returns:
        the target vertex of an edge
      • getEdgeWeight

        public double getEdgeWeight​(E e)
        Get the weight of an edge.
        Parameters:
        e - the edge
        Returns:
        the weight of an edge
      • setEdgeWeight

        public void setEdgeWeight​(E e,
                                  double weight)
        Set the weight of an edge
        Parameters:
        e - the edge
        weight - the new weight
      • add

        public abstract boolean add​(E e,
                                    V sourceVertex,
                                    V targetVertex)
        Add a new edge
        Parameters:
        e - the edge
        sourceVertex - the source vertex of the edge
        targetVertex - the target vertex of the edge
        Returns:
        true if the edge was added, false if the edge was already present
      • addIntrusiveEdge

        protected boolean addIntrusiveEdge​(E edge,
                                           V sourceVertex,
                                           V targetVertex,
                                           IE e)
      • getIntrusiveEdge

        protected abstract IE getIntrusiveEdge​(E e)
        Get the intrusive edge of an edge.
        Parameters:
        e - the edge
        Returns:
        the intrusive edge