addteedge
addteedge(od, i, tail, TYPE_CYCLETAIL);
addteedge(od, head, k, TYPE_CYCLEHEAD);
return addteedge(od, i, to, type);