Class VirtualEdge<V,​E>

  • Type Parameters:
    V - vertex type
    E - edge type
    All Implemented Interfaces:
    LE<V,​E>, SE<E>

    public class VirtualEdge<V,​E>
    extends LEI<V,​E>
    implements LE<V,​E>
    an edge that is not in the original graph, but is synthesized to replace one or more original graph edges.
    • Field Detail

      • weight

        protected int weight
    • Constructor Detail

      • VirtualEdge

        protected VirtualEdge​(LV<V> source,
                              LV<V> target)
    • Method Detail

      • of

        public static <V,​E> VirtualEdge<V,​E> of​(LV<V> source,
                                                            LV<V> target)
      • getWeight

        public int getWeight()
      • setWeight

        public void setWeight​(int weight)
      • equals

        public boolean equals​(Object o)
        two synthetic edges are created by splitting an existing SE<V,E> edge. This is a reference to that edge The edge what was split will gain an intermediate vertex between the source and target vertices each time it or one of its split-off edges is further split
        Overrides:
        equals in class LEI<V,​E>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class LEI<V,​E>