Interface IntrusiveEdgesSpecifics<V,​E>

Type Parameters:
V - the graph vertex type
E - the graph edge type
All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
UniformIntrusiveEdgesSpecifics, WeightedIntrusiveEdgesSpecifics

public interface IntrusiveEdgesSpecifics<V,​E>
extends java.io.Serializable
An interface for the set of intrusive edges of a graph.

Since the library supports edges which can be any user defined object, we need to provide explicit support for storing vertex source, target and weight.

Author:
Dimitrios Michail
  • Method Summary

    Modifier and Type Method Description
    boolean add​(E e, V sourceVertex, V targetVertex)
    Add a new edge.
    boolean containsEdge​(E e)
    Check if an edge exists
    java.util.Set<E> getEdgeSet()
    Get the edge set
    V getEdgeSource​(E e)
    Get the source vertex of an edge.
    V getEdgeTarget​(E e)
    Get the target vertex of an edge.
    double getEdgeWeight​(E e)
    Get the weight of an edge.
    void remove​(E e)
    Remove an edge.
    void setEdgeWeight​(E e, double weight)
    Set the edge weight
  • Method Details

    • getEdgeSource

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

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

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

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

      java.util.Set<E> getEdgeSet()
      Get the edge set
      Returns:
      the edge set
    • remove

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

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

      void setEdgeWeight​(E e, double weight)
      Set the edge weight
      Parameters:
      e - the edge
      weight - the new weight