next | previous | forward | backward | up | index | toc

# nextChain -- iterates over the chains of a chordal network

## Synopsis

• Usage:
C = nextChain(N)
C' = nextChain(C,N)
(C,data) = nextChain(cdim,N)
C' = nextChain(C,data,cdim,N)
• Inputs:
• N, an instance of the type ChordalNet,
• C, an instance of the type ChordalNetChain, an initial chain (optional)
• cdim, an integer, codimension of the chain (optional)
• data, , cached data from previous computations (if codimension is specified)
• Outputs:
• C', an instance of the type ChordalNetChain, the next chain of the chordal network, if any
• data, , cached data for future computations (if codimension is specified)

## Description

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