CyclicStreamTools(S, ST)

stream.spad line 487 [edit on github]

This package provides tools for working with cyclic streams.

computeCycleEntry: (ST, ST) -> ST

computeCycleEntry(x, cycElt), where cycElt is a pointer to a node in the cyclic part of the cyclic stream x, returns a pointer to the first node in the cycle

computeCycleLength: ST -> NonNegativeInteger

computeCycleLength(s) returns the length of the cycle of a cyclic stream t, where s is a pointer to a node in the cyclic part of t.

cycleElt: ST -> Union(ST, failed)

cycleElt(s) returns a pointer to a node in the cycle if the stream s is cyclic and returns “failed” if s is not cyclic