EdgeIndex
EdgeIndex[g,e]
gives the integer index for the edge e in the graph g.
EdgeIndex[{vw,…},…]
uses rules vw to specify the graph g.
Details

- EdgeIndex is also known as edge ordering.
- EdgeIndex gives the ordering used in functions such as EdgeList and IncidenceMatrix.
- EdgeIndex[g,e] gives the position for an edge e in EdgeList[g].
- EdgeIndex[g,e] gives the column position for an edge e in IncidenceMatrix[g].

Examples
open allclose allBasic Examples (1)
Scope (4)
Properties & Relations (5)
The EdgeIndex of an edge corresponds to its position in EdgeList:
Sort the vertices in undirected edges for comparison:
EdgeIndex is typically faster than Position:
EdgeQ can be used to tell whether EdgeIndex will succeed:

Use VertexIndex to find the integer index of a vertex:
VertexIndex and EdgeIndex give the row and column ordering used in IncidenceMatrix:
Text
Wolfram Research (2010), EdgeIndex, Wolfram Language function, https://reference.wolfram.com/language/ref/EdgeIndex.html (updated 2015).
CMS
Wolfram Language. 2010. "EdgeIndex." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/EdgeIndex.html.
APA
Wolfram Language. (2010). EdgeIndex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EdgeIndex.html