org.eclipse.viatra.query.runtime.base.itc.igraph

## Interface IBiDirectionalGraphDataSource<V>

- Type Parameters:
    `V` - the type of the nodes in the graph
  All Superinterfaces:
    IGraphDataSource<V>, java.io.Serializable
  All Known Implementing Classes:
    Graph, IBiDirectionalWrapper

      public interface IBiDirectionalGraphDataSource<V>
      extends IGraphDataSource<V>

  A bi-directional graph data source supports all operations that an `IGraphDataSource` does, but it also makes it possible to query the incoming edges of nodes, not only the outgoing edges.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<V,java.lang.Integer>` | `getSourceNodes(V target)` Returns the source nodes for the given target node.

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.base.itc.igraph.IGraphDataSource

      `attachAsFirstObserver, attachObserver, detachObserver, getAllNodes, getTargetNodes`

- - ### Method Detail

    - #### getSourceNodes

          java.util.Map<V,java.lang.Integer> getSourceNodes(V target)

      Returns the source nodes for the given target node. The returned data structure is a map because of potential parallel edges in the graph data source. The values in the returned map represent the count of the given (source, target) edge. The method must not return null.
      Parameters:
        `target` - the target node
      Returns:
        the source nodes with their count values
      Since:
        1.6