This method produces the chains of a chordal network one at a time. It can also iterate only over chains of a specified codimension.
Returns "null" if none.
i1 : I = toLex edgeIdeal cycleGraph 9; o1 : Ideal of QQ[x ..x ] 1 9 |
i2 : N = chordalNet I; |
i3 : chordalTria N; |
i4 : codimCount N 8 7 6 5 o4 = t + 9t + 20t + 9t o4 : ZZ[t] |
i5 : nC = 0; |
i6 : C = nextChain N; |
i7 : while C=!=null do (C=nextChain(C,N); nC=nC+1;) |
i8 : nC o8 = 39 |
We can specify the codimension of the chains.
i9 : nC = 0; |
i10 : (C,data) = nextChain(5,N); |
i11 : while C=!=null do (C=nextChain(C,data,5,N); nC=nC+1;) |
i12 : nC o12 = 9 |
The object nextChain is a method function.