interface EdgeCollectionTraversing {
    codirectedEdges(selector?: string): cytoscape.EdgeCollection;
    connectedNodes(selector?: string): cytoscape.NodeCollection;
    parallelEdges(selector?: string): cytoscape.EdgeCollection;
    sources(selector?: string): cytoscape.NodeCollection;
    targets(selector?: string): cytoscape.NodeCollection;
}

Hierarchy (view full)

Methods

  • Get edges codirected to those in the collection.

    Two edges are said to be codirected if they connect the same two nodes in the same direction: The edges have the same source and target. That is:

    • edge1.source().id() === edge2.source().id() && edge1.target().id() === edge2.target().id()

    Parameters

    • Optionalselector: string

      [optional] An optional selector that is used to filter the resultant collection.

    Returns cytoscape.EdgeCollection

  • Get edges parallel to those in the collection.

    Two edges are said to be parallel if they connect the same two nodes. Any two parallel edges may connect nodes in the same direction, in which case the edges share the same source and target. They may alternatively connect nodes in the opposite direction, in which case the source and target are reversed in the second edge. That is:

    • edge1.source().id() === edge2.source().id() && edge1.target().id() === edge2.target().id() OR
    • edge1.source().id() === edge2.target().id() && edge1.target().id() === edge2.source().id()

    Parameters

    • Optionalselector: string

      [optional] An optional selector that is used to filter the resultant collection.

    Returns cytoscape.EdgeCollection