Class UniformIntrusiveEdgesSpecifics<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:
    Serializable, IntrusiveEdgesSpecifics<V,​E>

    public class UniformIntrusiveEdgesSpecifics<V,​E>
    extends BaseIntrusiveEdgesSpecifics<V,​E,​org.jgrapht.graph.IntrusiveEdge>
    implements IntrusiveEdgesSpecifics<V,​E>
    An uniform weights variant of the intrusive edges specifics.

    The implementation optimizes the use of DefaultEdge and subclasses. For other custom user edge types, a map is used to store vertex source and target.

    Barak Naveh, Dimitrios Michail
    See Also:
    Serialized Form
    • Constructor Detail

      • UniformIntrusiveEdgesSpecifics

        public UniformIntrusiveEdgesSpecifics​(Map<E,​org.jgrapht.graph.IntrusiveEdge> map)
        map - the map to use for storage
    • Method Detail

      • add

        public boolean add​(E e,
                           V sourceVertex,
                           V targetVertex)
        Description copied from class: BaseIntrusiveEdgesSpecifics
        Add a new edge
        Specified by:
        add in interface IntrusiveEdgesSpecifics<V,​E>
        Specified by:
        add in class BaseIntrusiveEdgesSpecifics<V,​E,​org.jgrapht.graph.IntrusiveEdge>
        e - the edge
        sourceVertex - the source vertex of the edge
        targetVertex - the target vertex of the edge
        true if the edge was added, false if the edge was already present