# getEdge -- gets the n-th edge in a (hyper)graph

## Synopsis

• Usage:
E = getEdge(H,n)
• Inputs:
• H, ,
• n, an integer, an index of an edge in H
• Outputs:
• E, a list, the n-th edge of H

## Description

This function returns the n^{th} edge of the (hyper)graph.

 i1 : S = QQ[a..f]; i2 : g = cycle S o2 = Graph{edges => {{a, b}, {b, c}, {c, d}, {d, e}, {e, f}, {a, f}}} ring => S vertices => {a, b, c, d, e, f} o2 : Graph i3 : edges g o3 = {{a, b}, {b, c}, {c, d}, {d, e}, {e, f}, {a, f}} o3 : List i4 : getEdge (g,3) -- counting starts from 0, so the 4th element in the above list o4 = {d, e} o4 : List i5 : h = hyperGraph {a*b*c*d,d*e,a*f*c,a*d*f} o5 = HyperGraph{edges => {{a, b, c, d}, {d, e}, {a, c, f}, {a, d, f}}} ring => S vertices => {a, b, c, d, e, f} o5 : HyperGraph i6 : getEdge (h,0) -- first edge o6 = {a, b, c, d} o6 : List

• edges -- gets the edges of a (hyper)graph
• getEdgeIndex -- finds the index of an edge in a HyperGraph

## Ways to use getEdge :

• "getEdge(HyperGraph,ZZ)"

## For the programmer

The object getEdge is .